Background technology
Development along with Internet, the Internet user needs a kind of convenient means that can exchange and obtain information whenever and wherever possible mutually more and more urgently, One Number Link You is just in order to satisfy this demand of user, on the basis of merging conventional telecommunications technology and IP technology, a kind of novelty business of being developed.The core idea of One Number Link You is to distribute an ONLY number to each user, no matter he is telephone subscriber or pc user, also no matter whether this user surfs the Net, by the ONLY system with use the ONLY number just can will call out and this ONLY user's landline telephone (office phone, home phone number), mobile phone (mobile phone), pager, PC etc. couple together, promptly realize phone to phone, phone to PC, PC to phone, four kinds of business of Pc to PC.
Problems such as the mapping problems of the number issues that One Number Link You solves when being pc user, ordinary telephone subscriber intercommunication, charging problem, a plurality of telephone numbers and user move.Use One Number Link You, the user only need apply for an ONLY number (a kind of virtual-number, as a special service number 166 add 8 bit digital that comprise area code * * * * * * * *), after this no matter where this user walks, and other users can be by using equipment such as telephone set, PC and relating to him by the means of using this ONLY number.ONLY user receives the means of information can be according to user's oneself setting, sets up in real time with the mode of phone, PC and calling subscriber and gets in touch, and also can listen to message in the mode of Voice Mailbox.
Realize One Number Link You, one ONLY server (ONLY Server) and a client server (User Server need be set, but breviaty is US), the ONLY server is used to finish the control that continues of all service-users, no matter be telephone subscriber or pc user, as long as dialed called subscriber's ONLY number, this calling just will be routed to earlier on the ONLY server, carry out the follow-up operation that continues by the ONLY server again, to guarantee pc user and Phone user's unified management; The policy control that client server (US) is responsible for calling out, policy control can be by customization (as the rules of calling forward on busy), and are kept in the ONLY database.Have ONLY to call out when arriving, the ONLY server is inquired about to client server, and client server obtains the call path that this user customizes in advance by accessing database, transfers on the corresponding verbal system again.If call out on plain old telephone or the mobile phone, then the ONLY server makes a call to the on-site IP phone gateway of called number (GW); If call out pc client, then the ONLY server directly makes a call to called party terminal; If need message, then the ONLY server transfers the call on the user's voice mailbox.
Realize the networking structure and the call flow of One Number Link You shown in Fig. 1, calling part user is called out the ONLY number, the calling meeting of all-calls ONLY number all is routed on the ONLY server 104 through gateway (GW) 102 or 103, ONLY server 104 is to 105 requests of client server (US), client server (US) 105 Query Databases, obtain current actual phone number that should continue or IP address according to called subscriber's current state and log-on data, and return to ONLY server 104, ONLY server 104 under the support of gatekeeper 101 through gateway (GW) 102 or 103, public switched telephone network (PSTN) 109 or 123 is to called subscriber's actual phone number or directly make a call to the IP address.What client server (US) 105 returned to ONLY server 104 is one or more telephone numbers, the IP address that customizes in advance according to the called subscriber.
Authentication is important function part very in the One Number Link You with charging, occurs between ONLY server and the client server (US).Current international standard protocol about authentication and charging has RFC2138, RFC2139, it (is checking that existing remote dial access service authentication protocol (RADIUS:Remote Authentication Dial inUser Sevice) is mainly used in AAA in satisfied access and the Traditional IP communication service, the abbreviation of authorization and accounting function: Authentication, Authorization and Accouhting) realization of function, but, this agreement carries out the data message transmission because being based on User Datagram Protoco (UDP) (UDP:user datagram protocol), though the simple advantage of realization is arranged, but can not guarantee the reliability of data message transmission, and can't realize registering (registration) and nullifying to server, keep multiple function such as heartbeat between server and the client, thereby can't satisfy the needs of One Number Link You, promptly can not satisfy multi-functional authentication of One Number Link You and charging requirement.
Summary of the invention
The objective of the invention is in order to realize multiple function authentication and the charging requirement in the One Number Link You, and design authentication and charging method in a kind of internet one number link you (ONLY), needed registration, registration or cancellation in the One Number Link You be can satisfy, heartbeat connect, charge function with authentication etc., the reliability transmission of assurance data message kept.
Authentication and charging method in the internet one number link you of the present invention (ONLY), employing transmission control protocol (TCP) are transmitted logging request/cancellation and response message, heartbeat and are responded heartbeat response message, call request and response message, internet one number link you (ONLY) server notification and response message and charging request and response message and carry out between internet one number link you (ONLY) server and client server.
The technical scheme that realizes the object of the invention is such: authentication in a kind of internet one number link you and charging method is characterized in that may further comprise the steps:
A. after setting up transmission control protocol between internet one number link you server and client server and being connected, the internet one number link you server sends the logging request message to client server, client server judges when the legal and system of log-on message is not in a hurry to send it back to the internet one number link you server and should login response message, and client server sends the response message of login refusal to the internet one number link you server when judging the illegal or system busy of log-on message;
B. the internet one number link you server is after client server is logined successfully, internet one number link you startup of server heartbeat timer picks up counting, in the heart time interval, when the internet one number link you server is received any back message using of client server, the heartbeat timer resets, with timing time at the heartbeat timer reach heart time at interval after, when the internet one number link you server is not received any back message using of client server, send heartbeat message to client server, and send it back to the internet one number link you server by client server and to answer the heartbeat response message;
When C. the internet one number link you server receives call request from gateway, send the call request message to client server, client server sends it back to the internet one number link you server when judging that the legal and system of call request information is not in a hurry and answers the call answering message, and client server sends the response message of call denial to the internet one number link you server when judging the illegal or system busy of call request information;
D. after the internet one number link you server receives responding call response message from client server, the internet one number link you server directly makes a call to the called subscriber, calling out under the unsuccessful situation of called personal computer, the internet one number link you server sends internet one number link you server notification message to client server, again order by client server to the called personal computer information of giving notice, called personal computer is to give notice echo message and send the notice response message to the internet one number link you server by client server of client server;
E. call out when stopping, send the charging request message by the internet one number link you server to client server, generate charging bill for client server, client server receives the charging request message, send the charging response message to the internet one number link you server, for the corresponding charging request message of internet one number link you server deletion;
When F. the internet one number link you server is out of service, send the de-registration request message to client server, client server does not respond to the de-registration request message that receives.
At least include the identification number and the password of internet one number link you server in the logging request message in the described steps A; At least include heart time interval and maximum reattempt times in the described response login response message, include the cause information of login failure in the response message of described login refusal at least.
Among the described step B, any back message using comprises any data message and response heartbeat response message.
Among the described step C, include calling party and callee's number information in the call request message at least; Described responding call response message includes whole called numbers that the callee customizes in advance at least; The response message of described call denial includes the cause information of call failure at least.
In the described step e, include charging identifier in the charging request message at least, generate according to call identification, charging identifier is absolute unique and printable.
Described according to call identification generation charging identifier, further comprise:
A. charging identifier is arranged to be made up of 32 printable characters, each character of charging identifier is represented with 4 binary digits;
B. get the call identification of being made up of 16 characters, each character of call identification is represented with 8 binary digits;
C. allow each call identification character corresponding with two charging identifier characters, represent 4 binary digits of a charging identifier character with high 4 correspondences in 8 binary digits of a call identification character, represent 4 binary digits of another charging identifier character with low 4 correspondences in 8 binary digits of this call identification character.
Multi-functional authentication of the present invention and charging method, international standard protocol RFC2138, RFC2139 with reference to relevant authentication and charging, transmission control protocol (TCP:Transfer ControlProtocol) is adopted in the transmission of message, satisfy needed registration in the One Number Link You, nullified, kept the function that heartbeat connects, charges and authenticate, guaranteed the reliability transmission of data message.
Embodiment
Referring to Fig. 1, say in principle, realize that One Number Link You and concrete network environment have nothing to do, can under different networks, realize, but in order to maximally utilise present existing IP gateway function, can adopt networking structure (one of ONLY system group network structure) as shown in Figure 1, on Internet, realize One Number Link You, implement new multi-functional authentication and charging method of the present invention.The effect of each building blocks of function is among the figure:
Gateway (GW:Gateway) 102,103 is finished the conversion of signaling and voice between public telephone switching network (PSTN) and the Internet (IP);
Gatekeeper (GK:Gatekeeper) 101 finishes functions such as access control, route querying, bandwidth control, mainly finishes according to telephone number query to corresponding called GW;
ONLY server (ONLY server) 104, be used to finish the conversion between H323, SIP (ip voice agreement) and MGCP (MGCP) agreement, general H323 agreement, ONLY server and IVR MS, VoiceMsg MS, Resident GW, the Fax S﹠amp of adopting between ONLY server and the GW; Adopt SIP or MGCP agreement between F, the PCC, ONLY server is responsible for finishing authentication and billing function alternately with User server simultaneously, ONLY server finishes the function of calling out control in the IP network, function is equivalent to the switch in the PSTN network, only be arranged in IP network, the technology that adopts is all relevant with IP, and ONLYserver is processing signaling only, not the processed voice Media Stream;
Client server (User Service) 105 receives the request of ONLY server 104, finishes authentication and billing function, comprises user profile registration, inquiry, modification, deletion etc.;
LIST SERVER (Index Server) 106 is Database Systems, finishes the preservation of user profile;
Web server (Web Server) 107 provides a kind of method that can carry out all families information registering, inquiry, modification, deletion street etc. by Web to the user;
Interactive Voice Response Media Server (IVR MSI:nteractive Voice Response MediaServer) 114 can receive user's button input and phonetic entry, makes different responses according to different application, as finishes telephone bank's function;
Voice mail media server (VoiceMsg MS:Voice Mes sage Media Server) 115, can finish the voice mail function on the IP network, the 108th, voice storage server (Content Server) provides the voice access service for 114,115;
Gateway in the body (Resident GW:Resident Gateway) 117, the characteristics of this gateway are the lines of can directly answering the call, and connect plain old telephone, do not need equipment such as switch;
Facsimile medium server (Fax S﹠amp is transmitted in storage; F:Fax Store and Forward Media Server) 116, can receive from GW or the next facsimile data of other IP terminal, and with it by rights,, forward as E-mail, common fax etc.;
Pc client (PCC:PC Client) 118 is a software that operates on the PC, is the software of realizing the pc client speech communication, can carry out voice call with miscellaneous equipment.
Telephone set shown in the figure (Telephone) 110,119, facsimile machine (Fax) 111,120, portable computer (Laptop computer) 113,122 and modulator-demodulator (Modem) 112,121 are ustomer premises access equipment.
Referring to Fig. 2, and in conjunction with referring to Fig. 1, a kind of basic procedure of this One Number Link You net shown in the figure.
(1) calling subscriber picks up the telephone, and dials called ONLY user's ONLY number, as 16612345678, after the PSTN switch receives this ONLY number 16612345678, according to the predefined route of this ONLY number user, with this telephone connection to GW;
(2) GW receives this calling, gives GK with 16612345678 numbers, the request routing resolution;
(3) GK returns the IP address of ONLY Server to GW;
(4) GW makes a call to ONLY Server;
(5) ONLY Server receives calling, sends the call request message to US, is about to the 16612345678ONLY number and gives US and carry out FH-number transform;
(6) US becomes the in esse number that can relate to the called subscriber with virtual ONLY FH-number transform, suppose this user when customization at first with 16612345678 PCs that correspond to him, then US returns IP address and the port numbers that contains user's PC in the responding call response message of ONLY Server;
(7) after ONLY Server judges that the number that returns is PCC, make a call to PCC;
(8) if PCC this moment just in fire compartment wall, this call failure then;
(9) ONLY SERVER sends a notice message to US;
(10) US will give notice to PCC according to this message and user's setting, send corresponding message;
(11) PCC sends the notice response to US;
(12) US responds the back message using (response message) of giving notice to ONLY Server according to PCC user's notice, suppose that user's response is the interim mobile portable phone 01082881234 that requirement is called out him at this moment;
(13) after ONLY Server judges that the number that returns is the regular handset telephone number, give GK with this number and carry out routing resolution;
(14) GK carries out routing resolution, and returns the routing resolution result to ONLY Server, is the cell-phone number of a GW of Pekinese;
(15) ONLY Server makes a call to the GW of Pekinese, and GW breathes out to the PSTN network again, and making number is that called subscriber's phone of 01082881234 begins ring, and gateway connects to be set up;
(16) behind called subscriber's off-hook, speech channel is set up, and both sides can converse;
(17) both sides' communication process;
(18) when Called Onhook, speech channel disconnection, gateway are removed line;
(19) this moment, ONLY SERVER sent a charging request message to US, generated charging identifier (ID) when generating charging message;
(20) US sends the charging back message using to ONLY SERVER;
(21) The Calling Party Hooks On.
In said process, relate to three kinds of messages altogether: call request between ONLY SERVER and US and response message; Notice between ONLY SERVER, US and PCC and response message; And charging request and response message between ONLY SERVER and US.Transmission Control Protocol is adopted in the transmission of message.
About call request and response message.
ONLY Server sends call request to User Server, comprised the calling and called number in the solicited message, if User Server thinks that this call request information is legal, and there are not other abnormal conditions (as system busy), should echo reply (Ack) information, response message contains the tabulation of with good grounds called number translation, order is listed the called busy call transfer route that customizes in this tabulation when the application One Number Link You, as the telephone number of landline telephone 1, the telephone number of landline telephone 2 ... Mobile Directory Number ... the pager number ... the IP address of PC and port numbers etc.; If User Server thinks that this call request information is illegal, other abnormal conditions (as system busy) are perhaps arranged, then return refusal information (Rej) to ONLY Server, the call request of refusal ONLY Server, this returns the reason that should comprise the call request failure in the refusal information (Rej).
About notice and response message.
When ONLY Server sends call request and receives that the request of User Server corresponding call is by after replying (Ack) message to User Server, ONLY Server will directly call out called subscriber's (comprising telephone subscriber or pc user), calling out to the pc user under the unsuccessful situation, when having stoped the signaling incoming call of ONLY Server as pc user's fire compartment wall, this moment, ONLY Server should send a notification message to User Server, User Server will send corresponding message according to preestablishing to User ServerClient of this message and called subscriber, and send response message according to called subscriber's response to ONLY Server.
About request of chargeing and response message.
When calling stops, ONLY Server sends the charging request message to User Server, generate charging bill for UserServer, contain charging identifier (ID) in this charging request message, this charging ID is to utilize unique printable charging ID of the calling ID generation of gateway.Calling out ID produces according to the H323 agreement, form by 16 characters that not necessarily can print, charging ID of the present invention produces 32 the charging ID characters that can print according to 16 characters calling out ID, call out corresponding two charging ID characters of 1 character of ID with each, its corresponding relation is: each is called out the character of ID and is represented by 8 binary digits, with charging ID character of its high 4 correspondences, with its low charging ID character of 4 correspondences, the character of two charging ID is totally 4 scopes from 0 to 15 that binary digit is represented, can just with character 0-7, the A-F correspondence is set up relation one to one.After User Server receives the charging request message that ONLYServer sends, can respond charging message, for the corresponding charging request message of ONLYServer deletion to ONLY Server.
Referring to Fig. 3, the server of ONLY shown in the figure finishes the flow process that TCP is connected alternately with User server.
(1) after setting up TCP between ONLY SERVER and US and being connected, ONLY SERVER sends login (registration) request message to US;
(2) US carries out the legitimacy judgement according to user ID (ID) and password, and returns corresponding response message;
(3) after ONLY SERVER succeeds in registration, send heartbeat message to US;
(4) US responds the heartbeat response message to ONLY SERVER;
When (5) ONLY SERVER is out of service, send the de-registration request message to US.
Transmission Control Protocol is adopted in the transmission of above-mentioned message.
When ONLY Server started, ONLY Server sent logging request to User Server, had comprised sign (ID) number and the password of ONLY Server in the solicited message; If User Server thinks that this landing request information is legal, and do not have other abnormal conditions, when not being in a hurry, should return the response message that login is passed through as system, wherein contain heart time interval and maximum reattempt times, system enters heartbeat signal flow process and call flow (step 202); If User Server thinks that this landing request information is illegal, other abnormal conditions are perhaps arranged,, then return the response message of refusal login to ONLY Server as system busy, the login of refusal ONLYServer, the reason that should provide logging request to fail in this response message simultaneously.
ONLY Server should send heartbeat message behind the idle certain hour of the communication link between ONLY Server and User Server interval.After system enters the heartbeat signal flow process, starting the heartbeat timer picks up counting, heart time interval and maximum reattempt times are specified in the logging request response message that ONLY Server provides at User Server and are provided, as default value is to send once in 10 seconds, maximum reattempt times are 5, in the heartbeat timer picks up counting to 10 seconds, if ONLY Server does not receive any message from User Server, then send heartbeat message, send and still do not receive to reply for 5 times and think that then User Server has fault, in the heartbeat timer picks up counting to 10 seconds, if ONLY Server receives any message from User Server, the heartbeat timer that then resets restarts timing.
When ONLY Server is out of service, ONLY Server sends de-registration request to User Server, User Server should think that ONLY Server has broken away from logging status after receiving this message, and this moment, UserServer did not need to send response message to ONLY Server again.
The present invention is by this multi-functional authentication and the charging process that comprises registration, cancellation, heartbeat etc., realized the information interaction between the ONLY Server and User Server in the One Number Link You, has that transmission is reliable, fast high-efficient advantage.
Multi-functional authentication of the present invention and charging method adopt Transmission Control Protocol as host-host protocol, and use six types message to realize that multiple between ONLY Server and the User Server is applied in the One Number Link You alternately, has fabulous practicality.Also can be applicable to simultaneously in the IP communication new business.