CN111010374B - APP offline call implementation method, device, equipment and medium - Google Patents

APP offline call implementation method, device, equipment and medium Download PDF

Info

Publication number
CN111010374B
CN111010374B CN201911155804.8A CN201911155804A CN111010374B CN 111010374 B CN111010374 B CN 111010374B CN 201911155804 A CN201911155804 A CN 201911155804A CN 111010374 B CN111010374 B CN 111010374B
Authority
CN
China
Prior art keywords
app
registration
message
server
mobile equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911155804.8A
Other languages
Chinese (zh)
Other versions
CN111010374A (en
Inventor
张明发
黄志超
钟兴顺
王居辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ringslink Xiamen Network Communication Technologies Co ltd
Original Assignee
Ringslink Xiamen Network Communication Technologies Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ringslink Xiamen Network Communication Technologies Co ltd filed Critical Ringslink Xiamen Network Communication Technologies Co ltd
Priority to CN201911155804.8A priority Critical patent/CN111010374B/en
Publication of CN111010374A publication Critical patent/CN111010374A/en
Application granted granted Critical
Publication of CN111010374B publication Critical patent/CN111010374B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1096Supplementary features, e.g. call forwarding or call holding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/10Architectures or entities
    • H04L65/1053IP private branch exchange [PBX] functionality entities or arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1101Session protocols
    • H04L65/1104Session initiation protocol [SIP]

Abstract

The invention provides an APP offline call implementation method, device, equipment and medium, wherein the method comprises the following steps: when the APP of the mobile equipment end is started, receiving a registration message sent by the APP, replacing a Contact field in the registration message with an address of a push server, and forwarding the replaced registration message to a PBX server for registration; after the registration is finished, storing the registration information of the APP account into a registration state database, and issuing a final registration result to the APP; when the APP account is called, receiving an invitation message sent by a PBX server, inquiring whether the APP account is online or not in a registration state database according to the invitation message, and if so, forwarding the invitation message to the APP; if not, storing the invitation message inside, and triggering the push server to wake up the APP; after the APP is registered and awakened, the invitation message of the internal reservation is forwarded to the APP. The invention can reduce the coupling of function interaction, and has strong expansibility and strong real-time property.

Description

APP offline call implementation method, device, equipment and medium
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method, an apparatus, a device, and a medium for implementing an APP offline call.
Background
SIP (Session Initiation Protocol) is a multimedia communication Protocol established by IETF (Internet Engineering Task Force). It is a text-based application-layer control protocol for creating, modifying and releasing sessions of one or more participants. The present invention is widely applied to CS (Circuit Switched), NGN (Next Generation Network) and IMS (IP Multimedia Subsystem) networks, and can support and apply to Multimedia services such as voice, video, data, and the like, and also can apply to feature services such as Presence, Instant Message, and the like.
At present, in a communication network of SIP conversation, information interaction is carried out by an SIP PBX server and equipment, and an SIP account of normal equipment is registered online for a long time; however, for the mobile terminal device, it is a common state that the APP of the mobile terminal device is turned off offline; therefore, in order to avoid missing the call message due to offline shutdown of the APP of the mobile terminal device, it is necessary to provide a scheme capable of pushing the call message offline. At present, the scheme for implementing offline push of call messages in the market mainly integrates push services into a PBX server (i.e. an SIP APP supporting offline push is developed in cooperation with the PBX server), but the push scheme has the following defects: 1. the push service is directly developed and realized on the PBX server, so that the PBX servers of different manufacturers are difficult to be compatible; meanwhile, various services are realized on the PBX server, so that the coupling is strong, the realization is not flexible, and the maintenance cost is high; 2. the offline push of the mainstream PBX server mainly aims at notification type messages rather than call messages, and therefore, when the offline push of the call messages is performed, the instantaneity is poor.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method, an apparatus, a device and a medium for implementing APP offline call, which are used to solve the problems of strong coupling and poor real-time performance of the existing APP offline push call message.
In a first aspect, the present invention provides an APP offline call implementation method, where the method is used for a proxy server, and the method includes:
when the APP of the mobile equipment end is started, receiving a registration message sent by the APP, replacing a Contact field in the registration message with an address of a push server, and forwarding the replaced registration message to a PBX server for registration;
after the registration is finished, the registration information of the APP account is stored in a registration state database, and a final registration result is issued to the APP of the mobile equipment terminal;
when the APP account number of the mobile equipment end is called, receiving an invitation message sent by a PBX server, inquiring whether the corresponding APP account number is online or not in a registration state database according to the invitation message, and if the APP account number is online, forwarding the invitation message to the APP of the corresponding mobile equipment end; if the APP account is not on-line, the invitation message is stored inside, and a push server is triggered to wake up the APP of the mobile equipment end;
and after the APP registration of the mobile equipment end is awakened, forwarding the invitation message retained inside to the APP of the mobile equipment end.
Further, the method further comprises:
when the APP of the mobile equipment terminal exits, receiving logout information sent by the APP, and directly replying a first response message to the APP of the mobile equipment terminal according to the logout information, wherein the first response message informs the result of the logout of the APP;
and after the APP at the mobile equipment end exits, continuously and regularly sending a registration message to the PBX server to carry out keep-alive operation.
Further, the replacing the Contact field in the registration message with the address of the push server, and forwarding the replaced registration message to the PBX server for registration specifically includes:
after receiving the registration message, analyzing the registration message to obtain the address of the PBX server, replacing a Contact field in the registration message with the address of the push server, and forwarding the replaced registration message to the PBX server according to the analyzed address of the PBX server;
receiving a second response message returned by the PBX server according to the authentication information, and forwarding the second response message to the APP of the mobile equipment end, wherein the second response message is used for indicating the APP of the mobile equipment end to perform authentication operation;
receiving a registration message which is sent by the APP of the mobile equipment end based on the second response message and carries the authentication information, and forwarding the registration message carrying the authentication information to the PBX server so that the PBX server can verify the authentication information and generate a verification result;
and receiving a third response message returned by the PBX server based on the verification result, and forwarding the third response message to the APP at the mobile equipment terminal, wherein the third response message is used for informing the result of APP registration.
Further, if the APP account is not online, the invite message is retained internally, and triggering the push server to wake up the APP of the mobile device end specifically includes:
if the APP account is not on-line, directly replying a fourth response message to the PBX server, wherein the fourth response message is used for informing the PBX server to reserve the invitation message; meanwhile, the invitation message is stored inside, the notification message is pushed to the push server according to the address of the push server, so that the push server can forward the notification message to the third-party platform, and the APP registration of the mobile equipment end is awakened to be on-line through the third-party platform.
Further, after the storing the registration information of the APP account to the registration state database, the method further includes:
updating a client registration database according to the registration information, and matching whether the device number, the user name and the password of the APP exist or not, wherein the method specifically comprises the following steps:
when the equipment number of the APP exists in the client registration database and the equipment number is matched with the user name, if the registration is successful, no processing is performed; if the registration fails, removing the equipment number of the APP in the client registration database, and logging out the APP account number from the PBX server;
when the equipment number of the APP exists in the client registration database and the equipment number is not matched with the user name, the old user name is logged out of the PBX server and removed from the client registration database; meanwhile, adding a new user name into a client registration database, and registering the new user name to a PBX server;
when the device number of the APP does not exist in the client registration database, a user name and password request message is sent to the APP of the mobile device terminal; receiving a fifth response message returned by the APP of the mobile equipment terminal based on the user name and password request message, wherein the fifth response message carries the user name and the password; and storing the received user name and password in a client registration database, and sending registration information to the PBX server.
In a second aspect, the present invention provides an APP offline call implementation apparatus, where the apparatus is a proxy server, and the apparatus includes a registration module, an account storage module, a call processing module, and an invitation forwarding module;
the registration module is used for receiving a registration message sent by an APP when the APP at the mobile equipment end is started, replacing a Contact field in the registration message with an address of a push server, and forwarding the replaced registration message to a PBX server for registration;
the account number storage module is used for storing the registration information of the APP account number into a registration state database after registration is completed, and issuing a final registration result to the APP of the mobile equipment terminal;
the call processing module is used for receiving an invitation message sent by the PBX server when the APP account of the mobile equipment terminal is called, inquiring whether the corresponding APP account is online in the registration state database according to the invitation message, and if the APP account is online, forwarding the invitation message to the APP of the corresponding mobile equipment terminal; if the APP account is not on-line, the invitation message is stored inside, and a push server is triggered to wake up the APP of the mobile equipment end;
and the invitation forwarding module is used for forwarding the internally reserved invitation message to the APP of the mobile equipment terminal after the APP of the mobile equipment terminal is registered and awakened.
Further, the device also comprises a log-off module and a keep-alive module;
the logout module is used for receiving logout information sent by the APP when the APP at the mobile equipment terminal exits, and directly replying a first response message to the APP at the mobile equipment terminal according to the logout information, wherein the first response message informs the result of the logout of the APP;
and the keep-alive module is used for continuously sending the registration message to the PBX server at regular time for keep-alive operation after the APP at the mobile equipment end exits.
Further, in the registration module, the replacing, by the address of the push server, the Contact field in the registration message, and forwarding the replaced registration message to the PBX server for registration specifically includes:
after receiving the registration message, analyzing the registration message to obtain the address of the PBX server, replacing a Contact field in the registration message with the address of the push server, and forwarding the replaced registration message to the PBX server according to the analyzed address of the PBX server;
receiving a second response message returned by the PBX server according to the authentication information, and forwarding the second response message to the APP of the mobile equipment end, wherein the second response message is used for indicating the APP of the mobile equipment end to perform authentication operation;
receiving a registration message which is sent by the APP of the mobile equipment end based on the second response message and carries the authentication information, and forwarding the registration message carrying the authentication information to the PBX server so that the PBX server can verify the authentication information and generate a verification result;
receiving a third response message returned by the PBX server based on the verification result, and forwarding the third response message to the APP at the mobile equipment terminal, wherein the third response message is used for informing the result of APP registration;
in the call processing module, if the APP account is not online, the invite message is retained internally, and triggering the push server to wake up the APP of the mobile device end specifically includes:
if the APP account is not on-line, directly replying a fourth response message to the PBX server, wherein the fourth response message is used for informing the PBX server to reserve the invitation message; meanwhile, the invitation message is stored inside, the notification message is pushed to the push server according to the address of the push server, so that the push server can forward the notification message to the third-party platform, and the APP registration of the mobile equipment end is awakened to be on-line through the third-party platform.
In a third aspect, the present invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of the first aspect when executing the program.
In a fourth aspect, the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the first aspect.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
1. by independently outputting the push server and independently managing the push service by the push server, not only can the original service function of the PBX server be ensured not to be influenced, but also the coupling of function interaction can be reduced, the realization and the deployment are very simple, and the realization cost can be reduced; 2. the push server can be compatible with a third-party platform, has strong expansibility and can be well compatible with various common PBX servers in the market; 3. and the offline APP is awakened through the third-party platform, so that the real-time performance is strong.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
FIG. 1 is a schematic block diagram of the system of the present invention;
fig. 2 is an execution flowchart of an APP offline call implementation method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an APP offline call implementation apparatus in the second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a third embodiment of the invention;
fig. 5 is a schematic structural diagram of a medium according to a fourth embodiment of the present invention.
Fig. 6 is a timing diagram illustrating a registration process according to an embodiment of the present invention.
Fig. 7 is a timing diagram of a pinning process in accordance with a first embodiment of the present invention.
Fig. 8 is a timing diagram illustrating a process of obtaining a username and a password according to an embodiment of the present invention.
Fig. 9 is a timing diagram illustrating an offline called procedure according to an embodiment of the present invention.
Detailed Description
The embodiment of the application provides a method, a device, equipment and a medium for realizing APP offline calling, and is used for solving the problems of strong coupling and poor real-time performance of the existing APP offline push conversation message.
The technical scheme in the embodiment of the application has the following general idea: adding a service function of informing a push server to carry out offline message push on the basis of the original service function of the proxy server; meanwhile, a push server is added, and the push server pushes the offline message from the proxy server to the mobile equipment end through a third-party platform (such as Google), so that the requirement of normally establishing communication when the offline is met.
It should be noted that: under a normal scene, a PBX server in the SIP network can be used in cooperation with a proxy server, and the proxy server is only responsible for maintaining the account state of the equipment terminal; the invention adds the off-line message pushing service function into the proxy server and then deploys a pushing server, so that the PBX server only needs to pay attention to the main service function of the PBX server, and the attention to the message pushing service and the compatibility problem of a third-party platform of the mobile equipment are realized through the pushing server. The technical scheme of the invention has the following beneficial effects: 1. by independently outputting the push server and independently managing the push service by the push server, not only can the original service function of the PBX server be ensured not to be influenced, but also the coupling of function interaction can be reduced, the realization and the deployment are very simple, and the realization cost can be reduced; 2. the push server can be compatible with a third-party platform, has strong expansibility and can be well compatible with various common PBX servers in the market; 3. and the offline APP is awakened through the third-party platform, so that the real-time performance is strong.
Before introducing the specific embodiment, a system framework corresponding to the method of the embodiment of the present application is introduced, as shown in fig. 1, the system mainly includes six parts, namely a PBX server, a proxy server, a push server, a third-party platform, a mobile device, and a fixed device, where:
the PBX server can support a common sip server and is mainly responsible for user management, account state maintenance and conversation exchange functions.
The proxy server is mainly responsible for forwarding sip messages exchanged between the mobile equipment and the PBX server, maintaining the account state of the mobile equipment terminal and informing the push server of message push.
The push server is mainly responsible for sending the push message from the proxy server to the mobile equipment through various third-party platforms.
And the third-party platform is mainly responsible for pushing platform information of android and ios systems.
The mobile device, usually a mobile phone APP, interacts with the PBX server for sip messages by forwarding of the proxy server.
The fixed devices, usually indoor units, outdoor units, etc., are directly registered to the pbx server, and call other devices through the pbx server.
Example one
The embodiment provides an APP offline call implementation method, as shown in fig. 2, where the method is used for a proxy server, and the method includes:
when the APP at the mobile equipment end is started, receiving a registration message sent by the APP, replacing a Contact field in the registration message with an address of a push server, so that when the APP is offline, the message can be pushed to the APP through the push server according to the address of the push server, and the replaced registration message is forwarded to a PBX server for registration; the registration message is a Register message, the URL of the sip is the address of the pbx server, for example, the From field is the IP address of the sip, namely the user name @ pbx server;
after the registration is completed, storing the registration information of the APP account into a registration state database, and issuing a final registration result to the APP of the mobile equipment terminal, wherein the final registration result can be successful registration or failure registration, and the APP of the mobile equipment terminal can display the final registration result after receiving the final registration result;
when the APP account number of the mobile equipment end is called, receiving an invitation message (namely, invite message) sent by a PBX server, inquiring whether the corresponding APP account number is online or not in a registration state database according to the invitation message, and if the APP account number is online, forwarding the invitation message to the APP of the corresponding mobile equipment end; if the APP account is not on-line, the invitation message is stored inside, and a push server is triggered to wake up the APP of the mobile equipment end;
after the APP at the mobile equipment end is registered and awakened, the invitation message retained inside is forwarded to the APP at the mobile equipment end, so that the requirement that communication can be normally established even if the communication is offline is met.
In a first embodiment, the method further comprises:
when the APP of the mobile equipment terminal exits, receiving logout information sent by the APP, and directly replying a first response message to the APP of the mobile equipment terminal according to the logout information, wherein the first response message informs the result of the logout of the APP;
and after the APP at the mobile equipment end exits, continuously and regularly sending a registration message to the PBX server to carry out keep-alive operation.
In the first embodiment, the replacing the Contact field in the registration message with the address of the push server, and forwarding the replaced registration message to the PBX server for registration specifically includes:
after receiving the registration message, analyzing the registration message to obtain the address of the PBX server, replacing a Contact field in the registration message with the address of the push server, and forwarding the replaced registration message to the PBX server according to the analyzed address of the PBX server;
receiving a second response message returned by the PBX server according to the authentication information (that is, after receiving the registration message, the PBX server returns the second response message according to the authentication information), and forwarding the second response message to the APP of the mobile device end, where the second response message is used to instruct the APP of the mobile device end to perform an authentication operation;
receiving a registration message which is sent by the APP of the mobile equipment end and carries authentication information based on the second response message, forwarding the registration message carrying the authentication information to the PBX server so that the PBX server can verify the authentication information and generate a verification result, namely, after receiving the registration message carrying the authentication information, the PBX server can extract the authentication information from the registration message carrying the authentication information, compare the extracted authentication information with the authentication information of the PBX server and verify the authentication information, and if the authentication information passes, the registration is successful; if the verification is not passed, the registration is not successful;
and receiving a third response message returned by the PBX server based on the verification result, and forwarding the third response message to the APP at the mobile equipment terminal, wherein the third response message is used for informing the result of APP registration.
In the first embodiment, if the APP account is not online, the invitation message is retained inside, and triggering the push server to wake up the APP of the mobile device end specifically includes:
if the APP account is not on-line, directly replying a fourth response message to the PBX server, wherein the fourth response message is used for informing the PBX server to reserve the invitation message; meanwhile, the invitation message is stored inside, the notification message is pushed to the push server according to the address of the push server, so that the push server can forward the notification message to the third-party platform, and the APP registration of the mobile equipment end is awakened to be on-line through the third-party platform.
In the first embodiment, after the storing the registration information of the APP account in the registration state database, the method further includes:
updating a client registration database according to the registration information, and matching whether the device number, the user name and the password of the APP exist or not, wherein the method specifically comprises the following steps:
when the equipment number of the APP exists in the client registration database and the equipment number is matched with the user name, if the registration is successful, no processing is performed; if the registration fails, removing the equipment number of the APP in the client registration database, and logging out the APP account number from the PBX server;
when the equipment number of the APP exists in the client registration database and the equipment number is not matched with the user name, the old user name is logged out of the PBX server and removed from the client registration database; meanwhile, adding a new user name into a client registration database, and registering the new user name to a PBX server;
when the device number of the APP does not exist in the client registration database, a user name and password request message is sent to the APP of the mobile device terminal; receiving a fifth response message returned by the APP of the mobile equipment terminal based on the user name and password request message, wherein the fifth response message carries the user name and the password; and storing the received user name and password in a client registration database, and sending registration information to the PBX server.
The following describes several main interaction processes of the APP of the mobile device side and the proxy server to further explain the present invention:
1) registration procedure
Referring to fig. 6, the whole registration process is as follows:
1. after the app of the mobile device end is started, a Register message is sent to a proxy server (namely, a proxy server), the URL of the sip is the address of pbx server, for example, the From field is sip: user name @ pbx server IP address;
2. after receiving the Register message, the proxy server analyzes the address of the pbx server, then converts the contact field of the Register message into a push server IP and forwards the IP to the pbx server;
3. after receiving the Register message, the PBX server replies 401 response according to the authentication information;
4. the proxy server forwards the received response to the APP;
5. the APP sends a Register message carrying authentication information to the proxy server again;
6. the proxy server forwards the register message carrying the authentication information to pbx;
7. pbx the server replies 200 OK if the verification is passed after the authentication information is authenticated in advance, and replies 401 authentication information if the verification is failed;
8. after receiving the 200 OK response, the proxy service stores the registration information (including a user name, an IP address, a contact address, a validity period and the like) of the account number in a registration state database, and then forwards the 200 OK response message to the APP;
9. after receiving the 200 OK response, the APP displays that the registration is successful;
10. pbx after the server saves the registration information, it updates the client registration database, and whether the device number, user name and password of the matched APP exist:
(1) the device number of the APP exists in a client registration database, and when the device number of the APP is matched with the user name, if the registration is successful, the processing is not carried out; if the registration fails, removing the equipment number of the APP in the client registration database, and logging out the APP account number from the PBX server;
(2) the device number of the APP exists in a client registration database, and when the device number of the APP does not match with the user name, the old user name is logged out of the PBX server, and the old user name is removed from the client registration database; meanwhile, adding a new user name into a client registration database, and registering the new user name to a PBX server;
(3) when the device number of the APP is not in the client registration database, a user name and password request message is sent to the APP of the mobile device terminal; after receiving the user name and the password, storing the received user name and the password in a client registration database, and sending registration information to a PBX server;
11. after receiving the username and password request message, the APP replies a 200 ok response, and the body of the response carries the username and password.
Note: 1. at present, only when the device number of the APP is not matched with the user name and the device number is matched with the user name but the registration is failed, the client registration information in the client registration database is removed, and the keyword is the device number of the APP instead of the user name when the client registration information is removed; 2. when a plurality of apps register the same account, only one piece of client registration information is reserved, and the registration information contains a plurality of equipment numbers.
2) Logoff procedure
Referring to fig. 7, the whole logout process is as follows:
1. when the APP normally exits, an Unregister message is sent to a proxy server;
2. when receiving the Unregister message, the proxy server does not forward the Unregister message to the pbx server for authentication operation, but directly replies an APP response, and the specific flow is consistent with the standard flow;
3. the proxy server continues to send a Register message to the pbx server periodically for keep-alive operations.
Note: (1) when the proxy server receives the Unregister message, only the register database of the account is operated, but the database of the client is not operated, and the proxy server continues to maintain the register message; (2) for abnormal exit of the APP, another heartbeat mechanism (such as an option message) needs to be added; (3) when the app is restored to the factory setting or the account is emptied and the server is not notified, the proxy server client still registers to the pbx server, and when a call is received, the app is still waken up, but the call is kept until the caller hangs up because the app cannot be successfully registered.
3) Obtaining user name and password
Referring to fig. 8, the whole acquisition process is as follows:
1. the proxy server sends a Message to the APP, and the body carries an encryption mode and a temporary key;
2. after the APP of the mobile equipment terminal analyzes the body of the message, an encryption mode and a temporary key are obtained, and a user name and a password in the body are subjected to type encryption transmission;
3. after the proxy server receives the 200 response, the decryption body obtains the user name and the password, then adds the user name and the password to the proxy server, and sends the registration to the pbx server.
4) Online call flow
The online calling flow is consistent with the standard SIP calling flow, and no extension is made; the proxy server uses the route-record field to inform pbx the server to look up the forwarding routing information; when invite is forwarded, the contact field cannot be replaced.
5) Off-line called flow
Referring to fig. 9, the whole offline called process is as follows:
1. since the contact field of the register message sent by the app is modified when the Proxy server registers the account of the app with the pbx server, the pbx server sends an invite message to the Proxy server when the account of the app is called;
2. after receiving the invite message, the Proxy server queries a registration state database to acquire registration information of the account, directly replies 100 and 180 responses if the registration information is not displayed online, stores call information inside, and then informs the push server to forward and inform a third-party platform to wake up app for registration; wherein, the proxy server replies 180 to the PBX server, which aims to keep the current incoming call and further go down to process the off-line pushing and registering affairs;
3. after receiving the registration success, the Proxy server forwards the invite message which is kept before to the app, and then the flow is consistent with the normal call flow.
Based on the same inventive concept, the application also provides a device corresponding to the method in the first embodiment, which is detailed in the second embodiment.
Example two
In this embodiment, an APP offline call implementation apparatus is provided, as shown in fig. 3, where the apparatus is a proxy server, and the apparatus includes a registration module, an account storage module, a call processing module, and an invitation forwarding module;
the registration module is used for receiving a registration message sent by an APP when the APP at the mobile equipment end is started, replacing a Contact field in the registration message with an address of a push server, so that when the APP is offline, the message can be pushed to the APP through the push server according to the address of the push server, and the replaced registration message is forwarded to the PBX server for registration; the registration message is a Register message, the URL of the sip is the address of the pbx server, for example, the From field is the IP address of the sip, namely the user name @ pbx server;
the account number storage module is used for storing the registration information of the APP account number into a registration state database after registration is completed, and issuing a final registration result to the APP at the mobile equipment end, wherein the final registration result can be successful registration or failure registration, and the APP at the mobile equipment end can display the final registration result after receiving the final registration result;
the call processing module is used for receiving an invitation message (namely invite message) sent by the PBX server when the APP account of the mobile equipment terminal is called, inquiring whether the corresponding APP account is online in the registration state database according to the invitation message, and if the APP account is online, forwarding the invitation message to the APP of the corresponding mobile equipment terminal; if the APP account is not on-line, the invitation message is stored inside, and a push server is triggered to wake up the APP of the mobile equipment end;
and the invitation forwarding module is used for forwarding the invitation message which is reserved inside to the APP of the mobile equipment end after the APP of the mobile equipment end is registered and awakened, so that the requirement that the communication can be normally established in an off-line manner is met.
In the second embodiment, the apparatus further comprises a log-off module and a keep-alive module;
the logout module is used for receiving logout information sent by the APP when the APP at the mobile equipment terminal exits, and directly replying a first response message to the APP at the mobile equipment terminal according to the logout information, wherein the first response message informs the result of the logout of the APP;
and the keep-alive module is used for continuously sending the registration message to the PBX server at regular time for keep-alive operation after the APP at the mobile equipment end exits.
In the second embodiment, in the registration module, the replacing the Contact field in the registration message with the address of the push server, and forwarding the replaced registration message to the PBX server for registration specifically includes:
after receiving the registration message, analyzing the registration message to obtain the address of the PBX server, replacing a Contact field in the registration message with the address of the push server, and forwarding the replaced registration message to the PBX server according to the analyzed address of the PBX server;
receiving a second response message returned by the PBX server according to the authentication information (that is, after receiving the registration message, the PBX server returns the second response message according to the authentication information), and forwarding the second response message to the APP of the mobile device end, where the second response message is used to instruct the APP of the mobile device end to perform an authentication operation;
receiving a registration message which is sent by the APP of the mobile equipment end and carries authentication information based on the second response message, forwarding the registration message carrying the authentication information to the PBX server so that the PBX server can verify the authentication information and generate a verification result, namely, after receiving the registration message carrying the authentication information, the PBX server can extract the authentication information from the registration message carrying the authentication information, compare the extracted authentication information with the authentication information of the PBX server and verify the authentication information, and if the authentication information passes, the registration is successful; if the verification is not passed, the registration is not successful;
and receiving a third response message returned by the PBX server based on the verification result, and forwarding the third response message to the APP at the mobile equipment terminal, wherein the third response message is used for informing the result of APP registration.
In the second embodiment, in the call processing module, if the APP account is not online, the invite message is retained inside, and triggering the push server to wake up the APP of the mobile device end specifically includes:
if the APP account is not on-line, directly replying a fourth response message to the PBX server, wherein the fourth response message is used for informing the PBX server to reserve the invitation message; meanwhile, the invitation message is stored inside, the notification message is pushed to the push server according to the address of the push server, so that the push server can forward the notification message to the third-party platform, and the APP registration of the mobile equipment end is awakened to be on-line through the third-party platform.
In the second embodiment, after the storing the registration information of the APP account in the registration state database, the method further includes:
updating a client registration database according to the registration information, and matching whether the device number, the user name and the password of the APP exist or not, wherein the method specifically comprises the following steps:
when the equipment number of the APP exists in the client registration database and the equipment number is matched with the user name, if the registration is successful, no processing is performed; if the registration fails, removing the equipment number of the APP in the client registration database, and logging out the APP account number from the PBX server;
when the equipment number of the APP exists in the client registration database and the equipment number is not matched with the user name, the old user name is logged out of the PBX server and removed from the client registration database; meanwhile, adding a new user name into a client registration database, and registering the new user name to a PBX server;
when the device number of the APP does not exist in the client registration database, a user name and password request message is sent to the APP of the mobile device terminal; receiving a fifth response message returned by the APP of the mobile equipment terminal based on the user name and password request message, wherein the fifth response message carries the user name and the password; and storing the received user name and password in a client registration database, and sending registration information to the PBX server.
Since the apparatus described in the second embodiment of the present invention is an apparatus used for implementing the method of the first embodiment of the present invention, based on the method described in the first embodiment of the present invention, a person skilled in the art can understand the specific structure and the deformation of the apparatus, and thus the details are not described herein. All the devices adopted in the method of the first embodiment of the present invention belong to the protection scope of the present invention.
Based on the same inventive concept, the application provides an electronic device embodiment corresponding to the first embodiment, which is detailed in the third embodiment.
EXAMPLE III
The embodiment provides an electronic device, as shown in fig. 4, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, any one of the first embodiment modes may be implemented.
Since the electronic device described in this embodiment is a device used for implementing the method in the first embodiment of the present application, based on the method described in the first embodiment of the present application, a specific implementation of the electronic device in this embodiment and various variations thereof can be understood by those skilled in the art, and therefore, how to implement the method in the first embodiment of the present application by the electronic device is not described in detail herein. The equipment used by those skilled in the art to implement the methods in the embodiments of the present application is within the scope of the present application.
Based on the same inventive concept, the application provides a storage medium corresponding to the fourth embodiment, which is described in detail in the fourth embodiment.
Example four
The present embodiment provides a computer-readable storage medium, as shown in fig. 5, on which a computer program is stored, and when the computer program is executed by a processor, any one of the embodiments can be implemented.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages: 1. by independently outputting the push server and independently managing the push service by the push server, not only can the original service function of the PBX server be ensured not to be influenced, but also the coupling of function interaction can be reduced, the realization and the deployment are very simple, and the realization cost can be reduced; 2. the push server can be compatible with a third-party platform, has strong expansibility and can be well compatible with various common PBX servers in the market; 3. and the offline APP is awakened through the third-party platform, so that the real-time performance is strong.
Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.

Claims (10)

1. An APP offline call implementation method is characterized in that: the method is used for a proxy server, and the method comprises the following steps:
when the APP of the mobile equipment end is started, receiving a registration message sent by the APP, replacing a Contact field in the registration message with an address of a push server, and forwarding the replaced registration message to a PBX server for registration;
after the registration is finished, the registration information of the APP account is stored in a registration state database, and a final registration result is issued to the APP of the mobile equipment terminal;
when the APP account number of the mobile equipment end is called, receiving an invitation message sent by a PBX server, inquiring whether the corresponding APP account number is online or not in a registration state database according to the invitation message, and if the APP account number is online, forwarding the invitation message to the APP of the corresponding mobile equipment end; if the APP account is not on-line, the invitation message is stored inside, and a push server is triggered to wake up the APP of the mobile equipment end;
and after the APP registration of the mobile equipment end is awakened, forwarding the invitation message retained inside to the APP of the mobile equipment end.
2. The APP offline call implementation method of claim 1, wherein: the method further comprises the following steps:
when the APP of the mobile equipment terminal exits, receiving logout information sent by the APP, and directly replying a first response message to the APP of the mobile equipment terminal according to the logout information, wherein the first response message informs the result of the logout of the APP;
and after the APP at the mobile equipment end exits, continuously and regularly sending a registration message to the PBX server to carry out keep-alive operation.
3. The APP offline call implementation method of claim 1, wherein:
the replacing the Contact field in the registration message with the address of the push server, and forwarding the replaced registration message to the PBX server for registration specifically includes:
after receiving the registration message, analyzing the registration message to obtain the address of the PBX server, replacing a Contact field in the registration message with the address of the push server, and forwarding the replaced registration message to the PBX server according to the analyzed address of the PBX server;
receiving a second response message returned by the PBX server according to the authentication information, and forwarding the second response message to the APP of the mobile equipment end, wherein the second response message is used for indicating the APP of the mobile equipment end to perform authentication operation;
receiving a registration message which is sent by the APP of the mobile equipment end based on the second response message and carries the authentication information, and forwarding the registration message carrying the authentication information to the PBX server so that the PBX server can verify the authentication information and generate a verification result;
and receiving a third response message returned by the PBX server based on the verification result, and forwarding the third response message to the APP at the mobile equipment terminal, wherein the third response message is used for informing the result of APP registration.
4. The APP offline call implementation method of claim 1, wherein: if the APP account is not online, the invitation message is retained inside, and the specific steps of triggering the push server to wake up the APP at the mobile equipment end are as follows:
if the APP account is not on-line, directly replying a fourth response message to the PBX server, wherein the fourth response message is used for informing the PBX server to reserve the invitation message; meanwhile, the invitation message is stored inside, the notification message is pushed to the push server according to the address of the push server, so that the push server can forward the notification message to the third-party platform, and the APP registration of the mobile equipment end is awakened to be on-line through the third-party platform.
5. The APP offline call implementation method of claim 1, wherein: after the registration information of the APP account is stored in the registration state database, the method further includes:
updating a client registration database according to the registration information, and matching whether the device number, the user name and the password of the APP exist or not, wherein the method specifically comprises the following steps:
when the equipment number of the APP exists in the client registration database and the equipment number is matched with the user name, if the registration is successful, no processing is performed; if the registration fails, removing the equipment number of the APP in the client registration database, and logging out the APP account number from the PBX server;
when the equipment number of the APP exists in the client registration database and the equipment number is not matched with the user name, the old user name is logged out of the PBX server and removed from the client registration database; meanwhile, adding a new user name into a client registration database, and registering the new user name to a PBX server;
when the device number of the APP does not exist in the client registration database, a user name and password request message is sent to the APP of the mobile device terminal; receiving a fifth response message returned by the APP of the mobile equipment terminal based on the user name and password request message, wherein the fifth response message carries the user name and the password; and storing the received user name and password in a client registration database, and sending registration information to the PBX server.
6. An APP offline call implementation device is characterized in that: the device is a proxy server and comprises a registration module, an account number storage module, a call processing module and an invitation forwarding module;
the registration module is used for receiving a registration message sent by an APP when the APP at the mobile equipment end is started, replacing a Contact field in the registration message with an address of a push server, and forwarding the replaced registration message to a PBX server for registration;
the account number storage module is used for storing the registration information of the APP account number into a registration state database after registration is completed, and issuing a final registration result to the APP of the mobile equipment terminal;
the call processing module is used for receiving an invitation message sent by the PBX server when the APP account of the mobile equipment terminal is called, inquiring whether the corresponding APP account is online in the registration state database according to the invitation message, and if the APP account is online, forwarding the invitation message to the APP of the corresponding mobile equipment terminal; if the APP account is not on-line, the invitation message is stored inside, and a push server is triggered to wake up the APP of the mobile equipment end;
and the invitation forwarding module is used for forwarding the internally reserved invitation message to the APP of the mobile equipment terminal after the APP of the mobile equipment terminal is registered and awakened.
7. The APP offline call implementation device of claim 6, wherein: the device also comprises a logout module and a keep-alive module;
the logout module is used for receiving logout information sent by the APP when the APP at the mobile equipment terminal exits, and directly replying a first response message to the APP at the mobile equipment terminal according to the logout information, wherein the first response message informs the result of the logout of the APP;
and the keep-alive module is used for continuously sending the registration message to the PBX server at regular time for keep-alive operation after the APP at the mobile equipment end exits.
8. The APP offline call implementation device of claim 6, wherein: in the registration module, the replacing the Contact field in the registration message with the address of the push server, and forwarding the replaced registration message to the PBX server for registration specifically includes:
after receiving the registration message, analyzing the registration message to obtain the address of the PBX server, replacing a Contact field in the registration message with the address of the push server, and forwarding the replaced registration message to the PBX server according to the analyzed address of the PBX server;
receiving a second response message returned by the PBX server according to the authentication information, and forwarding the second response message to the APP of the mobile equipment end, wherein the second response message is used for indicating the APP of the mobile equipment end to perform authentication operation;
receiving a registration message which is sent by the APP of the mobile equipment end based on the second response message and carries the authentication information, and forwarding the registration message carrying the authentication information to the PBX server so that the PBX server can verify the authentication information and generate a verification result;
receiving a third response message returned by the PBX server based on the verification result, and forwarding the third response message to the APP at the mobile equipment terminal, wherein the third response message is used for informing the result of APP registration;
in the call processing module, if the APP account is not online, the invite message is retained internally, and triggering the push server to wake up the APP of the mobile device end specifically includes:
if the APP account is not on-line, directly replying a fourth response message to the PBX server, wherein the fourth response message is used for informing the PBX server to reserve the invitation message; meanwhile, the invitation message is stored inside, the notification message is pushed to the push server according to the address of the push server, so that the push server can forward the notification message to the third-party platform, and the APP registration of the mobile equipment end is awakened to be on-line through the third-party platform.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 5 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
CN201911155804.8A 2019-11-22 2019-11-22 APP offline call implementation method, device, equipment and medium Active CN111010374B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911155804.8A CN111010374B (en) 2019-11-22 2019-11-22 APP offline call implementation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911155804.8A CN111010374B (en) 2019-11-22 2019-11-22 APP offline call implementation method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111010374A CN111010374A (en) 2020-04-14
CN111010374B true CN111010374B (en) 2022-04-19

Family

ID=70112876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911155804.8A Active CN111010374B (en) 2019-11-22 2019-11-22 APP offline call implementation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111010374B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101448240A (en) * 2008-12-25 2009-06-03 中兴通讯股份有限公司 Registration method, system and equipment of session initiation protocol terminal
CN102932364A (en) * 2012-11-12 2013-02-13 华为软件技术有限公司 Register method, register device and register system
CN103746963A (en) * 2013-12-16 2014-04-23 深圳百科信息技术有限公司 SIP server cluster system and service application request processing method thereof
CN103973913A (en) * 2013-01-25 2014-08-06 中兴通讯股份有限公司 Method and service platform for achieving broadband service function under NGN
CN104426893A (en) * 2013-09-09 2015-03-18 中国移动通信集团公司 Method, device and system for awakening mobile terminal
CN109495854A (en) * 2018-11-23 2019-03-19 睿云联(厦门)网络通讯技术有限公司 A kind of implementation of the offline SIP call function of mobile terminal App based on FreeSwitch

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101448240A (en) * 2008-12-25 2009-06-03 中兴通讯股份有限公司 Registration method, system and equipment of session initiation protocol terminal
CN102932364A (en) * 2012-11-12 2013-02-13 华为软件技术有限公司 Register method, register device and register system
CN103973913A (en) * 2013-01-25 2014-08-06 中兴通讯股份有限公司 Method and service platform for achieving broadband service function under NGN
CN104426893A (en) * 2013-09-09 2015-03-18 中国移动通信集团公司 Method, device and system for awakening mobile terminal
CN103746963A (en) * 2013-12-16 2014-04-23 深圳百科信息技术有限公司 SIP server cluster system and service application request processing method thereof
CN109495854A (en) * 2018-11-23 2019-03-19 睿云联(厦门)网络通讯技术有限公司 A kind of implementation of the offline SIP call function of mobile terminal App based on FreeSwitch

Also Published As

Publication number Publication date
CN111010374A (en) 2020-04-14

Similar Documents

Publication Publication Date Title
CN101267431B (en) Matching method of initialization request message in IP multimedia sub-system service trigger
US20060067227A1 (en) Scheduled determination of network resource availability
CN102075545B (en) Registration instruction method and registration method for client and equipment thereof
CN103733701A (en) System and method for subscribing for internet protocol multimedia subsystems (ims) services registration status
JP5173607B2 (en) Communications system
WO2013188219A1 (en) Multiple versions of call invites
WO2011109574A2 (en) Resilient routing for session initiation protocol based communication systems
US11363134B2 (en) Gateway and method for managing VoIP telephone service
KR101620809B1 (en) A method for sip proxy failover
US20090031016A1 (en) Interface apparatus, main apparatus and control method for use in the interface apparatus
CN109525620B (en) Message pushing system, method and device
CN106161201B (en) method, device and system for participating in group chat by using mailbox account as identifier
WO2015027721A1 (en) Terminal status subscription method, apparatus and system
WO2007079647A1 (en) A method, apparatus and system for network level backup of sip application system
CN101227474A (en) Method for identifying authority of conversation initialized protocol user in soft switching network
CN103618747A (en) Method and system for realizing session initiation protocol (SIP) information service
JP2007082073A (en) Communication connecting method, system, and program
CN111010374B (en) APP offline call implementation method, device, equipment and medium
US20140258425A1 (en) Method and Device for Long Lived Chat with Dynamic Focus
EP2767078B1 (en) Apparatus and method for conferencing
EP2418913B1 (en) Methods and system for joining group session with pre-defined joining
JP4099168B2 (en) Communication service system in IP telephone network
CN107317786B (en) Method, device and network element for forwarding session initiation protocol message
JP4945591B2 (en) Authentication system, authentication method, and temporary password issuing device
KR20110066356A (en) Method and apparatus for providing a presence service in a group communication system based on session initiation protocol

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant