Background technology
Along with communication system increasingly extensive application in every field such as economic and social life, communication network itself is also among fast development, what communication network carried out the transition to NGN.NGN (next generation network) employing just gradually is the network configuration that a kind of carrying and control are separated, wherein the logic networking of user interactions class application can be referring to Fig. 1, application server 1 (Application Server wherein, be called for short AS) and the application 21 of operation thereon, use 22 ..., use 2n (Application, abbreviation App) provides various application for the user service; For AS provides network capabilities, this network capabilities comprises calling control and the medium interaction capabilities under the talk various network protocols to gateway 3 (Gateway is called for short GW); Media Resource Server 41, Media Resource Server 42 ..., Media Resource Server 4n (Media Resource Server is called for short MRS) is used to provide the media resource ability; And soft switch 5 (SoftSwitch) is used to provide the calling control ability. when commencing business, App21, App 22 ..., App 2n is deployed on the AS1, App21, App 22 ..., the needed media resource of App 2n be deployed to MRS41, MRS42 ..., on the MRS4n, App21, App 22 ..., user interactions (the User Interaction of App 2n by GW3, be called for short UI) interface to MRS41, MRS42 ..., the operation of MRS4n request media resource ability, for example playback, collect the digits, operations such as video playback and recording.
In actual applications, some App have characteristics such as telephone traffic is big, cross-region networking, must dispose a plurality of MRS could realize, from demands such as load sharing, resource distribution and operation management, just require GW to be routed to request flexibly on the MRS of appointment.
A kind of OSA/Parlay application interface is arranged now, is the application programming interfaces that are widely used between GW and the AS, has wherein defined the UI interface, and this UI interface is not supported the characteristic of the flexible route of many MRS, can't specify the purpose MRS of this operation when commencing business.
In order when commencing business a plurality of MRS to be specified, the someone has proposed the routing plan of polling mode, specifically can employing modes such as order poll or random polling realize that this polling mode has certain requirement to MRS: promptly each MRS is equal to.That is to say: each MRS requires to be connected with the GW existence, and the disposal ability requirement is identical, and the application resource of being disposed is also identical, and these require for the application service provider relatively harsher, are unfavorable for launching flexibly serving.
Summary of the invention
The objective of the invention is at having the defective that polling mode is difficult to flexibly many MRS be carried out professional route now, a kind of method of Media Resource Server being carried out route has been proposed, less demanding to each MRS, when commencing business, route media Resource Server that can fast and flexible.
For achieving the above object, the invention provides and a kind of Media Resource Server is carried out the method for route, it may further comprise the steps:
Step 1, gateway obtains the Media Resource Server sign of application program, and inquire about predefined home address mapping table, to obtain the Media Resource Server address of described Media Resource Server sign, this Media Resource Server sign is arranged in the request that described gateway calls media resource;
Step 2, described gateway be according to described Media Resource Server address architecture message, and be routed to described Media Resource Server address.
In technique scheme, the operation of the predefined home address of the described inquiry mapping table in the described step 1 is specially: the home address mapping table that inquiry is represented with database table structure or non-database table structure.Before step 1, can also comprise following operation:
Step 11, described gateway judge whether described application program has specified the Media Resource Server sign, are execution in step 1 then; Otherwise execution in step 12;
Step 12, inquire about predefined Media Resource Server route and distribution rule table acquisition Media Resource Server sign according to application message, described application message is the combination in any of one of soft switch numbering, application reference number, media resource coding, Subscriber Number or station address or above-mentioned information.
Also comprise following operation before the step 11: described gateway loads described home address mapping table and Media Resource Server route and distribution rule table.
Wherein step 12 can be specially:
Step 121, described gateway obtains available Media Resource Server index according to application message (being specially soft switch numbering, application reference number and media resource coding) inquiry Media Resource Server routing rule table;
Step 122, described gateway obtain Media Resource Server list information and operational mode according to described Media Resource Server search index Media Resource Server distribution rule table, and identify according to the Media Resource Server of Operation Mode Selection described request.
In technique scheme, the operation according to the Media Resource Server of Operation Mode Selection described request sign described in the described step 122 is specially:
When described operational mode is an independent mode, then select first Media Resource Server sign in the described Media Resource Server distribution rule table;
When described operational mode is a main-standby mode, then select first Media Resource Server sign in the described Media Resource Server distribution rule table, if described first Media Resource Server is unavailable, then select second Media Resource Server sign;
When described operational mode is the load sharing mode, then select the whole Media Resource Server signs in the described Media Resource Server distribution rule table, and carry out load sharing according to polling mode or weight mode.
Based on above-mentioned technical scheme, the present invention has the following advantages:
1, among the present invention in advance at different application settings MRS routing rule tables, obtain the MRS address by gateway according to application message again, thereby realized the flexible route of gateway Media Resource Server.
2, the present invention selects the Media Resource Server address flexibly according to the difference of sharing mode, can make the media resource of service provider according to the flexible application deployment of different situations, and a plurality of Media Resource Servers are carried out networking and operation management.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Embodiment
For application being carried out media resource deployment flexibly, the present invention has improved the routing mode of existing poll MRS, utilize the solicited message of the application that gateway receives, select suitable MRS according to predefined MRS route and mapping table, thereby realized flexible route to MRS, especially for various resource requirement is had business than big-difference, the present invention realizes De Gengjia than existing mode.
As shown in Figure 2, the basic procedure schematic diagram for the present invention carries out the method for route to Media Resource Server may further comprise the steps:
Step 101, the user interactions interface (UI) of gateway (GW) receives the request that application program (App) is called media resource;
Step 102, gateway is according to the predefined home address of the sign of the MRS in above-mentioned request inquiry mapping table, the MRS address that obtains the MRS sign of request;
Step 103, gateway is routed to the MRS address then according to the MRS address architecture message that obtains.
Embodiment one
As shown in Figure 3, Media Resource Server is carried out the schematic flow sheet of embodiment one of the method for route for the present invention, may further comprise the steps:
Step 201, the UI of gateway receives the request that App calls media resource, provide on the implementation of UI operation-interface to App at gateway, can utilize the UI interface of OSA/Parlay definition, wherein UICall to as if be tied on the call object, just can directly obtain the soft switch numbering of current calling and the application numbers that current calling is triggered according to call object, again according to playback, playback collects the digits, parameter in UI such as the recording operation obtains the media resource coding, the soft switch numbering of current calling, application numbers, media resource is encoded to the application message that step 203 provides inquiry MRS routing rule table;
Whether step 202 has directly specified the MRS sign by App, if specified, then execution in step 205, otherwise execution in step 203;
Step 203, gateway is according to the application message that obtains in the step 201, be soft switch numbering, application numbers and media resource coding, the MRS routing rule table (MRSRouting) that is stored in the gateway is inquired about, obtain this and call out available MRS index, in MRS routing rule table, soft switch numbering, application numbers and media resource coding can define the data as asterisk wildcard, for example table 1 (all adopting the Integer integer to represent):
Table 1:MRSRouting table
Field name |
Implication |
Type |
SoftSwitchNo |
The soft switch numbering triggers the Softswitch of current calling and numbers;-1 represents all soft switch. |
Integer |
AppID |
Application numbers is used for a plurality of application and adopts identical voice numbering situation;-1 all App of expression |
Integer |
resourceID |
Media resource coding, for example coding of resources such as audio frequency, video, data |
Integer |
MRSIndex |
The MRS index |
Integer |
It is all effective to all soft switch that soft switch numbering (SoftSwitchNo) is configured to-1 expression, it is all effective to all application numbers that application numbers (AppID) is configured to-1 expression, just expression is all effective to all media resource codings and media resource coding (resourceID) is configured to NULL, when gateway inquiry MRSRouting table, the coupling of field and input data in the his-and-hers watches, now non-wildcard data are mated, if do not mate, just use the wildcard data to mate, just do not think and search failure if there is coupling once more, return miscue;
Step 204, gateway sees the following form 2 according to MRS search index MRS distribution rule table (MRSInfo), obtains concrete MRS list information and MRS operational mode, if the MRS operational mode is an independent mode, then purpose MRS is first MRS numbering in the MRSInto table; If the MRS operational mode is a main-standby mode, then purpose MRS is first MRS numbering in the MRSInto table, if first MRS is unavailable, then selects second MRS numbering; If the operational mode of MRS is the load sharing mode, then purpose MRS is whole MRS numberings, need carry out load sharing by polling mode or weight mode, and the MRS numbering here is the MRS sign;
Table 2:MRSInfo table
Step 205, gateway is again according to obtaining MRS numbering inquiry home address mapping table (MRSAddress), to obtain the MRS address, specifically see table 3 for details, wherein the IP address adopts String (character string) form to represent, mapping relations in the gateway between pre-defined MRS numbering and the MRS address, and adopt database table to represent its structure, gateway can inquire the IP address and the port numbers of numbering corresponding to this MRS according to the MRS numbering;
Table 3:MRSAddress table
Field name |
Implication |
Type |
MRSID |
The MRS numbering |
Integer |
IP |
The IP address of MRS |
String |
Port |
The MRS port numbers |
Integer |
Step 206, gateway is constructed message according to IP address and the port numbers of the MRS that inquires, and is routed to this MRS address.
From the foregoing description, a lot of pre-set rule lists have been utilized, these rule lists should be set before step 201, promptly carry out such operation: gateway loads home address mapping table and Media Resource Server route and distribution rule table. and the representation of above related rule list is not limited to the database form, can also adopt other non-database forms to store.
Utilized the UI interface of existing OSA/Parlay definition in the step 201, this UI interface is not made amendment, if but some App need be according to tactful route MRS, this strategy can directly be specified the MRS numbering that needs route, this just need expand the UICall object of OSA/Parlay definition, increase a MRSID parameter in interface, this MRSID parameter is used for indicating the purpose MRS numbering of this UI operation.
Embodiment two
As shown in Figure 4, Media Resource Server is carried out the schematic flow sheet of embodiment two of the method for route for the present invention, may further comprise the steps:
Step 301, gateway loads home address mapping table, MRS route and distribution rule table;
Step 302, the UI of gateway receives the request that App calls media resource, provide on the implementation of UI operation-interface to App at gateway, can adopt the UI interface of non-OSA/Parlay definition, gateway obtains application message from request, these application messages are except can adopting soft switch numbering, application numbers and media resource coding, can also adopt Subscriber Number, the perhaps prefix of this number, suffix, information such as user's IP address, every information that can identify this application request can be as application message;
Whether step 303 has directly specified the MRS sign by App, if specified, then execution in step 305, otherwise execution in step 304;
Step 304, gateway is according to the application message that obtains in the step 201, inquire about being stored in MRS routing rule table in the gateway, MRS distribution rule table (can with reference to a last embodiment), to obtain the MRS sign. this step is compared with the two-stage inquiry of a last embodiment, what adopt is the one-level query script, has simplified the operation of gateway;
Step 305, gateway are again according to obtaining MRS numbering inquiry home address mapping table (MRSAddress), to obtain the MRS address;
Step 306, gateway is constructed message according to IP address and the port numbers of the MRS that inquires, and is routed to this MRS address.
In the present embodiment, App need make the rule list of MRSID and gateway stored be consistent when the configuration mapping relations. in step 302, if adopt other forms of application message, when setting in advance rule list, also need to adjust corresponding mapping relations.
In advance at different application settings MRS routing rule tables, obtain the MRS address by gateway according to application message again among the present invention, thereby realized the flexible route of gateway Media Resource Server; The present invention selects the Media Resource Server address flexibly according to the difference of sharing mode, can make the media resource of service provider according to the flexible application deployment of different situations, and a plurality of Media Resource Servers are carried out networking and operation management.
Should be noted that at last: above embodiment is only in order to illustrate that technical scheme of the present invention is not intended to limit; Although with reference to preferred embodiment the present invention is had been described in detail, those of ordinary skill in the field are to be understood that: still can make amendment or the part technical characterictic is equal to replacement the specific embodiment of the present invention; And do not break away from the spirit of technical solution of the present invention, it all should be encompassed in the middle of the technical scheme scope that the present invention asks for protection.