A kind of implementation method of soft switch recording system Hot Spare
Technical field
The present invention relates to the soft switch communications field, particularly relate to the reality of centralized soft switch recording system Hot Spare
Existing method.
Background technology
Soft switchcall server, based on VOIP technology, passes through IP network, it is achieved that distributed deployment.In soft switch
In system, (Realtime Transport Protocol is real by RTP for the voice of terminal and terminal or gateway device
Time host-host protocol) in transmission over networks.In calling procedure, when calling is initiated in caller, hello protocol carries
SDP data in contain the IP address of caller Media Stream, RTP port.Softswitch is carrying out number
After the Call-Control1 operations such as analysis, Route Selection, the medium stream information of caller is transmitted to called.Called carry out
After media negotiation, the response message to calling carries the IP address of called Media Stream, RTP port, soft
Called medium stream information is forwarded again and gives caller by switching equipment, and so, both call sides just obtains the other side's
Medium stream information, thus voice just interacts between both call sides.In the process, Softswitch is only
Only serving the forwarding capability of medium stream information, Media Stream is not through Softswitch.
For the recording of soft switchcall server, general employing distributed way or centralized fashion.Distributed employing end
Port mirror image mode.Port Mirroring mode is by recording server and terminal or gateway deployment to same network exchange
On machine, on the port that Port Mirroring terminal or gateway connected to recording server connects, service of so recording
Device just can get the Media Stream of terminal or gateway, as shown in Figure 1.Centralized fashion uses media server
Mode, principle is the conferencing function that Softswitch utilizes media server, will be by recording user and media services
Certain port of device forms meeting, thus obtains by the Media Stream of recording user on a media server, such as Fig. 2
Shown in.
The most distributed or centralized, all there is once recording server and break down, may result in cannot
The problem of recording.
Summary of the invention
The present invention, on the basis of centralized record type, creates the record type of a kind of Hot Spare.The present invention carries
The high reliability of recording system, it is ensured that in the recording system of multiple stage recording server composition, separate unit recording clothes
After business device fault, recording system can also normally work.
The present invention is achieved through the following technical solutions: the implementation method of a kind of soft switch recording system Hot Spare,
Comprise the following steps:
S1: configuring the recording server of more than two in Softswitch, all recording servers are registered to soft
Switching equipment;
S2: calling subscribe initiates call request to Softswitch, carries SDP information in call request;Institute
The SDP information stated includes IP address and the RTP port of caller rtp streaming;
S3: after Softswitch receives message related to calls, analyzes calling subscribe and the service attribute of called subscriber, as
Really in calling subscribe and called subscriber, at least one party registers sound-recording business, then trigger sound-recording business logic, go to
S5;If calling subscribe and called subscriber are all not enrolled for sound-recording business, then go to S4;
After S4: soft exchange device controls calling subscribe and called subscriber carry out media negotiation, calling subscribe and called
User's normal talking, process ends;
S5: sound-recording business logic is to media server application at least 4 recording port, and judges that recording port is
No apply for successfully, if recording port application failure, then go to S4;If recording port application success, then
Go to S6;
S6: sound-recording business logic replys, to calling subscribe, the recording port letter that calling subscribe is distributed by media server
Breath;Meanwhile, initiate call request respectively to called subscriber and all recording servers, called subscriber is initiated
Call request comprises the recording port information that called subscriber is distributed by media server, recording server is initiated
Call request in comprise the recording port information that this recording server is distributed by media server;
S7: calling subscribe, called subscriber and all recording servers divide after receiving respective recording port information
Not Fa Song feedback information to sound-recording business logic;
After S8: sound-recording business logic receives the feedback information of calling subscribe, called subscriber and all recording servers,
All recording ports are formed meeting by notice media server;
Caller rtp streaming and called rtp streaming are separately sent to media services by S9: calling subscribe and called subscriber
The corresponding recording port of device;
The caller rtp streaming received and called rtp streaming are separately sent to each recording by S10: media server
Server;
The caller rtp streaming received and called rtp streaming are all preserved by S11: all recording servers.
Wherein, described sound-recording business logic is deployed in outside Softswitch inside or Softswitch.
Wherein, the Softswitch described in S5 to media server application at least 4 recording port is: soft
Switching equipment is that calling subscribe applies for 1 recording port, and called subscriber applies for 1 recording port, each recording
Server correspondence application one recording port.
Wherein, the connection shape of sound-recording business logical check media server and recording server is also included after S4
State, if media server connection status is abnormal, or all of recording server connection status is the most abnormal,
Then perform S4;If media server is normal and at least one recording server is normal, then perform S5.
Wherein, also include after S6, S7 or S8 that Softswitch will service with recording on media server
The recording port of device communication is set to ReceiveOnly pattern.
The present invention compares the advantage of background technology and is:
Present invention employs centralized record type, compare with distributed way, effectively reduce recording system
Cost;As long as multiple stage recording server there being a recording server normally work, just can preserve complete
Rtp streaming, thus improve the reliability of recording system, it is achieved the Hot Spare of the whole network recording system.
Accompanying drawing explanation
Fig. 1 is the connection diagram of distributed recording system in background technology.
Fig. 2 is the connection diagram of centralised dictation system in background technology.
Fig. 3 is the connection diagram of the centralized recording heat standby system of the present invention.
Fig. 4 is the flow chart of the centralized recording heat standby system of the present invention.
Detailed description of the invention
With embodiment, the method for the invention is described in further detail below in conjunction with the accompanying drawings.
Example: combine Fig. 3 and Fig. 4, if calling subscribe is recording user, called subscriber is domestic consumer, joins
Put two recording servers.Then, the implementation method of a kind of soft switch recording system Hot Spare, comprise the following steps:
S1: configuring two recording servers in the data configuration of Softswitch, two recording servers are all noted
Volume is to Softswitch;
S2: calling subscribe initiates call request to Softswitch, carries calling number, called in call request
Number and SDP (Session Description Protocol, Session Description Protocol) information;
SDP information comprises: the IP address of caller rtp streaming, RTP port, voice coding/decoding capability.
S3: after Softswitch receives call request, first authenticates calling subscribe, authenticates by rear,
Configured by data base, check calling subscribe and the service attribute of called subscriber, if calling subscribe and called use
In family, at least one party registers and have activated sound-recording business, then trigger sound-recording business logic, go to S5;If it is main
Make user and called subscriber all be not enrolled for activating sound-recording business, then go to S4;
Sound-recording business logic can be deployed in Softswitch, it is also possible to is deployed in outside Softswitch.
After S4: soft exchange device controls calling subscribe and called subscriber carry out media negotiation, calling subscribe and called
User's normal talking, process ends;
S5: sound-recording business logical check media server and the connection status of recording server, if media services
Device connection status is abnormal, or all of recording server connection status is the most abnormal, then go to S4;As
Really media server is normal and at least one recording server is normal, then perform S6;
S6: sound-recording business logic is to media server application 4 recording port;
Softswitch be calling subscribe apply for 1 recording port, called subscriber apply for 1 recording port, two
Platform recording server correspondence application two recording port.
S7: media server distributes 4 recording ports, and media information is sent to sound-recording business logic;
Media information includes: the IP address of Media Stream, 4 RTP ports, voice coding/decoding capabilities;
Whether S8: sound-recording business logical judgment recording port is applied for successfully, if recording port application failure, then
Go to S4;If recording port application success, then go to S9;
S9: sound-recording business logic is replied media server to calling subscribe and replied media server pair to calling subscribe
The recording port information of calling subscribe's distribution;Meanwhile, initiate respectively to exhale to called subscriber and all recording servers
Cry request, in the call request that called subscriber is initiated, is comprised the recording end that called subscriber is distributed by media server
Message ceases, and comprised recording server what this recording server was distributed by media server in the call request initiate
Recording port information;
S10: calling subscribe, called subscriber and two recording servers after receiving respective recording port information,
Carry out media negotiation, and negotiation result is sent to sound-recording business logic;
S11: sound-recording business logic sends formation meeting to media server after receiving negotiation result and instructs, meanwhile,
The Media Stream transceiver mode arranging the COM1 between media server and recording server is ReceiveOnly
Pattern;
The Media Stream transceiver mode arranging COM1 between media server and recording server can also be
After S9 or S10.
Caller rtp streaming and called rtp streaming are separately sent to media clothes by S12: calling subscribe and called subscriber
The corresponding recording port of business device;
The caller rtp streaming received and called rtp streaming are separately sent to each recording by S13: media server
Server;
After S14: recording server receives caller rtp streaming and called rtp streaming, save as file.