Calling method, device, equipment, medium and product
By using RTP mute data in SIP response information in the audio and video communication system to determine the public network IP address of the caller, the difficulty of obtaining the real public network IP address in the prior art is solved, and the security of the system and the effectiveness of the call are improved. .
Patent Information
- Application Number
- CN202410931238.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-07-11
AI Technical Summary
The existing audio and video communication systems have difficulties in obtaining the real public IP address of the call end, especially in the home broadband network environment, which affects the security of the system and the effectiveness of the call.
By carrying the address field in the call request and determining the real public IP address of the caller based on the RTP mute data in the SIP response information without the need for additional support from the caller without the caller's request. Get the public IP address of the caller when the network equipment is modified.
Improves system security and call effectiveness, ensuring that backend services can accurately determine the source and intent of calls, thereby processing call requests more efficiently.
Smart Images

Figure CN118945146A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a calling method, device, equipment, medium and product. Background Art
[0002] In the current audio and video communication system, the call system based on Session Initiation Protocol (SIP) faces the challenge of malicious call requests and registration requests from the public network. To ensure the security of the system and applications, the system needs to filter and verify the real Internet Protocol (IP) address of the caller. However, since most callers run in a private network environment with Network Address Translation (NAT), the IP address in their SIP signaling message is private, resulting in the backend service being unable to directly obtain the real public IP address of the caller.
[0003] At present, the existing methods for obtaining public IP addresses either require additional support from the caller or have high requirements for network devices. In practical applications, especially in home broadband network environments, due to the diversity and complexity of network devices, the existing methods for obtaining public IP addresses are often difficult to fully apply, resulting in the back-end service of the audio and video communication system having difficulty in obtaining the real public IP address of the caller, thus affecting the security of the system and the effectiveness of the call. Summary of the invention
[0004] The present application provides a calling method, device, equipment, medium and product, which can obtain the real public IP address of the calling end without relying on the network environment of the calling end, thereby improving the security of the call.
[0005] In a first aspect, an embodiment of the present application provides a calling method, which is applied to a backend service, and the method includes:
[0006] Receive a call request sent by the calling end, the call request is used to call the called end;
[0007] In the case where the call request carries an address field, if the address in the address field does not conform to a preset address rule, a Session Initiation Protocol SIP response message is sent to the calling end, where the preset address rule is used to indicate whether there is a real public Internet Protocol IP address of the calling end initiating the call in the address field;
[0008] If the calling end and the called end are not successfully connected, if the first real-time transport protocol RTP silent data sent by the calling end according to the SIP response information is received within a preset time, the first public IP address of the calling end initiating the call is determined according to the first RTP silent data.
[0009] In a second aspect, an embodiment of the present application provides a calling method, which is applied to a calling end, and the method includes:
[0010] The current public IP address under the current network environment is stored in the address field;
[0011] The address field is stored in the call request, and the call request with the address field stored is sent to the backend service, where the call request is used to call the called party;
[0012] When receiving the SIP response information sent by the backend service according to the call request, if the calling end and the called end are not successfully connected, the first RTP silent data is sent to the backend service according to the address information of the backend service in the SIP response information, so that the backend service determines the first public IP address of the calling end to initiate the call according to the first RTP silent data.
[0013] In a third aspect, the present application provides a calling device, applied to a backend service, the device comprising:
[0014] A receiving module, used to receive a call request sent by a calling end, wherein the call request is used to call a called end;
[0015] A first sending module, configured to send a Session Initiation Protocol SIP response message to the calling end if the address in the address field does not conform to a preset address rule when the call request carries an address field, wherein the preset address rule is used to indicate whether there is a real public network IP address of the calling end initiating the call in the address field;
[0016] A determination module is used to determine the first public network IP address of the calling end initiating the call based on the first RTP silent data if the first real-time transport protocol RTP silent data sent by the calling end according to the SIP response information is received within a preset time when the calling end and the called end are not successfully connected.
[0017] In a fourth aspect, the present application provides a calling device, applied to a calling end, the device comprising:
[0018] A storage module, used to store the current public network IP address in the current network environment in the address field;
[0019] A second sending module, configured to store the address field in a call request, and send the call request in which the address field is stored to a backend service, wherein the call request is used to call a called party;
[0020] The third sending module is used to send first RTP silent data to the backend service according to the address information of the backend service in the SIP response information when receiving the SIP response information sent by the backend service according to the call request, if the calling end and the called end are not successfully connected, so that the backend service determines the first public IP address of the calling end to initiate the call according to the first RTP silent data.
[0021] In a fifth aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory storing computer program instructions;
[0022] When the processor executes the computer program instructions, the calling method in any one of the embodiments of the first aspect and the second aspect is implemented.
[0023] In a sixth aspect, an embodiment of the present application provides a computer storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, a calling method as in any one of the embodiments of the first aspect and the second aspect is implemented.
[0024] In the seventh aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a calling method implemented in any one of the embodiments of the first and second aspects above.
[0025] In a calling method, device, equipment, medium and product provided in an embodiment of the present application, when the back-end service receives a call request sent by the call end, the address field in the call request will be checked first. If the address in the address field does not conform to the preset address rule, that is, it is impossible to directly confirm that this is the real public IP address of the call end, the back-end service will send a SIP response message to the call end to guide the call end to perform further verification. Subsequently, if the call is not successfully connected, if the back-end service receives the first RTP silent data sent by the call end according to the SIP response information within a preset time, the real first public IP address of the call end can be accurately determined by analyzing the first RTP silent data. The advantage of this method is that it does not require any additional support from the call end, nor does it require large-scale transformation or upgrading of existing network equipment. It makes full use of the first RTP silent data generated during the call process of the call end, and the real first public IP address of the call end can be obtained by simply analyzing and processing the first RTP silent data. This not only improves the security of the system, because the back-end service can filter and verify the calls from the caller based on the real first public IP address, but also improves the effectiveness of the call, because the back-end service can more accurately determine the source and intention of the call, thereby processing call requests more efficiently, thereby improving the security of the call. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0027] Figure 1 It is a flowchart of a calling method provided by an embodiment of the present application;
[0028] Figure 2 is a flowchart of a calling method provided by another embodiment of the present application;
[0029] Figure 3 is a flowchart of a calling method provided by another embodiment of the present application;
[0030] Figure 4 is a flowchart of a calling method provided by another embodiment of the present application;
[0031] Figure 5 is a flowchart of a calling method provided by another embodiment of the present application;
[0032] Figure 6 It is a structural diagram of a calling device provided in an embodiment of the present application;
[0033] Figure 7 is a structural diagram of another calling device provided in an embodiment of the present application;
[0034] Figure 8 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0036] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0037] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0038] The SIP-based audio and video call system running on the public network receives many malicious call requests and registration requests every day, attempts to make stolen calls, and denial of service (DoS) attacks. Considering the security of the system and application, it is necessary to filter the real IP address of the incoming terminal device according to the call security management rules before each call. The qualified IP address (the IP within the IP address range specified by the user) can call the called party, and the unqualified IP address (the IP not within the IP address range specified by the user) will be rejected. Calls from illegal IP addresses (such as SIP application detection calls from overseas IPs) are blocked in time. Therefore, for each call, it is necessary to obtain the real IP address information of the incoming terminal device before calling the called party as much as possible.
[0039] At present, most access terminal devices run in a NAT private network environment (such as a home broadband network environment). For NAT, its function is to map between public network IP addresses and ports and private network IP addresses and ports. It works at the transport layer and only modifies the address and port in the Transmission Control Protocol (TCP) / User Datagram Protocol (UDP) packet header. The private network IP address and port number are embedded in the signaling message (SIP protocol) of the terminal device accessing the audio and video communication system. These addresses and ports are visible only at the application layer. Therefore, NAT will not modify the address information therein, resulting in the IP address and port in the signaling message not being the real network IP of the terminal device accessing the service. At the same time, since the back-end is based on the audio and video communication system, considering security and system performance, firewalls and F5-type load balancing devices will also be deployed to run on networks below the third layer, which ultimately results in the back-end service of the audio and video communication system not being able to obtain the real public network IP called by the terminal device.
[0040] Since all NAT and firewalls (Firewall, FW) process and filter below the TCP / IP layer, and SIP is an application layer control signaling protocol, SIP has nothing to do with the following transport layer and network layer protocols. Therefore, other ways must be used to obtain the real public network IP of the NAT device. Currently, there are mainly the following different solutions: 1. Universal Plug and Play (UpnP); 2. Traversal Using Relay NAT (TURN); 3. Simple Traversal of UDP Through network Address Translators (STUN); 4. Application Layer Gateway (ALG).
[0041] Among them, the first three are that the terminal devices (including User Agent (UA) and Proxy) obtain their own public network addresses and ports before INVITE (INVITE is a request message in the SIP protocol, used to invite one or more users to participate in a multimedia session) through some means or protocols. The basic idea of the ALG technical solution is to add the Protocol Awareness capability to NAT / FW so that NAT / FW can modify the address information in the content of the SIP signaling message when it passes. ALG modifies the SIP address and port in the SIP message, and the SIP address and port are modified to the public network IP and port mapped by NAT / FW.
[0042] The above technical solutions mainly have the following defects: For the first three solutions, the terminal device needs to provide additional support, and it is not suitable for all NAT methods. For the ALG solution, the terminal device does not need any additional support. It processes and modifies the SIP signaling at the application layer to achieve transparent address conversion, but it requires the NAT device of the terminal device or the network device before the back-end service to support the ALG function, which has high requirements for network devices and requires transformation of existing network devices. If the network device does not support the ALG function, it is also impossible to obtain the IP of the device after NAT in the signaling. A typical scenario is that the terminal device runs on the home gateway network of the home broadband, and the back-end audio and video communication system, due to security and system performance, deploys firewalls and F5-type load balancing devices and other network devices running below the third layer. In this network deployment environment, the back-end service of the audio and video communication system cannot obtain the real public network IP called by the terminal device.
[0043] In order to solve the problems existing in the prior art, the embodiments of the present application provide a calling method, device, equipment, medium and product.
[0044] The present application embodiment provides a calling method, device, equipment, medium and product. The calling method provided by the first aspect of the present application embodiment is first introduced below. Figure 1 As shown, the method is applied to the backend service, and the method specifically includes the following steps:
[0045] S100, receiving a call request sent by a calling end, where the call request is used to call a called end.
[0046] Optionally, in a feasible implementation method of the present application, first, the calling end (which can be a mobile phone, landline, computer software or other communication terminal equipment) will initiate a call request, which may include the identification information of the called end (such as telephone number, user name, etc.), as well as possible call parameters (such as call type, priority, etc.). After the call request is initiated, the call request will be transmitted to the back-end service system responsible for processing such requests. This back-end service system can be a cloud computing-based architecture that can handle a large number of concurrent requests and ensure high availability and scalability of the service. After receiving the call request, the back-end service will first verify and parse it to ensure the legitimacy and validity of the request.
[0047] S200, when the call request carries an address field, if the address in the address field does not conform to a preset address rule, a Session Initiation Protocol SIP response message is sent to the calling end, wherein the preset address rule is used to indicate whether there is a real public Internet Protocol IP address in the address field from which the calling end initiates the call.
[0048] Optionally, in a feasible implementation of the present application, in the call request, the verification of the address field is an important step to ensure the security and effectiveness of the communication. When the caller carries the address field in the SIP call request, the backend service needs to perform strict checks on these addresses to ensure that they comply with the preset address rules. These rules are used to verify whether the address field contains the real public IP address of the caller initiating the call.
[0049] Specifically, first, the backend service parses the address field in the SIP request, which can be a string containing IP address information. Then, the server applies preset address rules to verify the address. These rules may include checking whether the IP address is in the correct format (for example, whether it complies with the Internet Protocol version 4 (IPv4) or IPv6 specifications), whether the IP address belongs to a known public address range, and whether the IP address matches the information previously registered or authenticated by the caller.
[0050] If the address in the address field does not conform to the preset address rules, the server will send an extended SIP response message to the caller. This response message can use a non-standard status code in the 18X series (such as 189) to indicate that this is a specific error or verification failure. In the extended SIP response message, the extended SIP response message will contain a special header field "P-Early-Media:sendrecv". This header field tells the terminal device that although the call has not been fully established, it should start preparing to send and receive media streams (in this case, the first RTP silent data packet). The message body of the extended SIP response message (usually an SDP description) will carry the public IP address information of the backend service. This information is used to instruct the caller to use this public IP address as the target address in subsequent media transmission. After sending the SIP response message containing the public IP address, the backend service will start a short timer. This timer is used to wait for the first RTP silent data packet sent by the terminal device.
[0051] S300, when the calling end and the called end are not successfully connected, if the first real-time transport protocol RTP silent data sent by the calling end according to the SIP response information is received within a preset time, the first public IP address of the calling end initiating the call is determined according to the first RTP silent data.
[0052] Optionally, in a feasible implementation of the present application, during the call establishment process, if the calling end and the called end fail to connect successfully, the terminal device of the calling end will receive the 18X SIP response information sent by the backend service. After receiving the 18X SIP response information, the terminal device of the calling end will check whether it supports processing such messages. If supported, the calling end will further parse the message content, especially check whether there is a header field information such as "P-Early-Media:sendrecv". This header field indicates that the calling end needs to start sending the first RTP silent data before the call is established.
[0053] When the terminal device on the calling end detects the "P-Early-Media:sendrecv" header field, the terminal device on the calling end will start sending the first RTP silent data packet to the address and port specified by the backend service in the Session Description Protocol (SDP). These data packets contain key network information of the calling end device, such as the source IP address and port number.
[0054] At the same time, the backend service will start a short timer (usually configured to be less than 300 milliseconds) after sending the 18X SIP response information. Within the time specified by this timer, if the backend service can receive the first RTP silent data packet sent from the terminal device, it will parse the header information of the data packet, especially the source IP address and port number. This information represents the IP address of the calling device on the public network, that is, the first public IP address of the calling end to initiate the call.
[0055] In this way, the public IP address of the calling device can be obtained before the call is answered. This is of great significance for subsequent network communication, troubleshooting or logging. If the terminal device does not support processing 18X messages, it will simply discard the message without any processing.
[0056] In a calling method, device, equipment, medium and product provided in an embodiment of the present application, when the back-end service receives a call request sent by the call end, the address field in the call request will be checked first. If the address in the address field does not conform to the preset address rule, that is, it is impossible to directly confirm that this is the real public IP address of the call end, the back-end service will send a SIP response message to the call end to guide the call end to perform further verification. Subsequently, if the call is not successfully connected, if the back-end service receives the first RTP silent data sent by the call end according to the SIP response information within a preset time, the real first public IP address of the call end can be accurately determined by analyzing the first RTP silent data. The advantage of this method is that it does not require any additional support from the call end, nor does it require large-scale transformation or upgrading of existing network equipment. It makes full use of the first RTP silent data generated during the call process of the call end, and the real first public IP address of the call end can be obtained by simply analyzing and processing the first RTP silent data. This not only improves the security of the system, because the back-end service can filter and verify the calls from the caller based on the real first public IP address, but also improves the effectiveness of the call, because the back-end service can more accurately determine the source and intention of the call, thereby processing call requests more efficiently, thereby improving the security of the call.
[0057] In one embodiment, the method further comprises:
[0058] In the case where the first RTP silent data sent by the calling end according to the SIP response information is not received within the preset time, if the connection information sent by the called end in response to the calling end is received, the address information of the backend service and the connection information are sent to the calling end, the connection information is used to indicate that the calling end and the called end have a successful call, and the address information is used to indicate the address of the backend service;
[0059] Receiving second RTP mute data sent by the calling end according to the address information in a call state;
[0060] The second RTP mute data is parsed to obtain the second public IP address of the calling end initiating the call.
[0061] Optionally, in a specific implementation of the present application, when the first RTP silent data packet sent based on the SIP response information is not received from the calling end within a preset time, this usually means that the backend service failed to directly obtain the NAT address of the calling end at the initial stage of call establishment. However, if the backend service subsequently receives a response from the called end to the connection information sent by the calling end (usually a 200OK response), it indicates that the call has been successfully established, but at this time the backend service still needs a mechanism to identify the NAT address of the calling end.
[0062] In this case, the backend service will take an indirect approach to obtain the NAT address of the caller. First, the backend service will send its own address information (including the public IP and port of the backend service) and the connection information sent by the called party to the caller. This address information will be used by the caller for subsequent media data transmission, and the connection information is used to inform the caller that the call has been successfully established.
[0063] Once the call is established and enters the call state, the calling end will start sending the second RTP silent data packet according to the address information provided by the backend service. The second RTP silent data packet will pass through the NAT device during the transmission process, so the header of the second RTP silent data packet will contain the NAT address information of the calling end. After receiving these RTP silent data packets, the backend service will parse the header information of the data packet and extract the second public network IP address of the calling end (actually the address after NAT conversion).
[0064] The advantage of this technical solution is that it can indirectly obtain the NAT address of the calling party through the call connection process and subsequent media data transmission when the NAT address of the calling party cannot be directly obtained at the initial stage of call establishment. This not only ensures the smooth progress of the call, but also provides the necessary information for the back-end service to directly interact with the calling party when necessary. In addition, since the RTP silent data packet is used to indirectly obtain the NAT address, this method has no negative impact on the call quality and call experience.
[0065] In these optional embodiments, a flexible and reliable way is provided to handle the situation where the backend service fails to directly obtain the NAT address of the terminal device in the early stage of call establishment. By using the response information (such as 200OK) of the called party and the SDP information of the backend service during the call connection process, the backend service can successfully forward the call to the called party and maintain communication with the terminal device. Secondly, when the terminal device enters the call state and starts to send the second RTP media data, the backend service can receive these data packets and parse the NAT address of the terminal device therefrom. This indirect way of obtaining the NAT address is not only effective, but also does not have any negative impact on the call quality and user experience. Finally, successfully obtaining the IP information of the terminal device initiating the call is of great significance to the backend service. It helps the backend service to better understand and manage the call connection, and provides necessary support and guarantee for subsequent communications. At the same time, this also provides a more stable and reliable communication service for the terminal device, enhancing the user experience.
[0066] In one embodiment, in the case where the first RTP silent data sent by the calling end according to the SIP response information is not received within a preset time, if the called end is received in response to the connection information sent by the calling end, before sending the address information of the backend service and the connection information to the calling end, the method further includes:
[0067] In the case where the call request carries the address field, if the address field conforms to the preset address rule, obtaining the third public network IP address of the calling end initiating the call from the address field;
[0068] After parsing the second RTP mute data to obtain the second public network IP address of the calling end initiating the call, the method further includes:
[0069] The second public IP address and the third public IP address are verified to obtain a verification result, where the verification result is used to indicate whether the second public IP address and the third public IP address are consistent.
[0070] Optionally, in a specific implementation of the present application, the backend service checks whether the call request carries a field containing address information. If the call request does contain such an address field, and the field complies with a preset address rule (for example, a specific field name such as X-Auth-IP or meets a specific format requirement), the backend service extracts the third public network IP address of the caller initiating the call from the address field. This step allows the backend service to obtain the NAT address of the caller in advance before the call is established.
[0071] After the call is successfully established, that is, the called party responds to the connection information of the calling party, the backend service will send its own address information and connection information to the calling party. As the call progresses, the calling party will send the second RTP media data (including silent data packets) to the backend service. When the backend service receives these second RTP data packets, it will parse their header information to obtain the second public network IP address after NAT of the sender (i.e. the calling party).
[0072] After obtaining the second public IP address, the backend service will perform a key verification step: compare the second public IP address with the third public IP address previously extracted from the call request address field. The purpose of this verification is to confirm whether the two IP addresses are consistent, thereby verifying whether the NAT address reported by the terminal device in the call request is the same as the NAT address used during the actual call. If the two addresses are consistent, the verification result will indicate success, which proves that the NAT address reported by the terminal device in the call request is accurate and is also used during the actual call. If the addresses are inconsistent, the verification result will indicate failure, which may mean that the terminal device reported an incorrect NAT address in the call request, or used a different NAT address during the actual call. This verification mechanism helps the backend service understand and manage call connections more accurately, ensuring the stability and reliability of communications.
[0073] In these optional embodiments, in these steps, the back-end service achieves effective acquisition and verification of the NAT address of the calling end by cleverly combining the address field information in the call request and the second RTP data packet information in the subsequent call process, ensuring that the NAT address of the calling end can still be obtained under certain circumstances.
[0074] As the call is established, the backend service can resolve the second public IP address after receiving the RTP media data sent by the caller. By verifying this address with the third public IP address previously obtained from the call request, the backend service can verify whether the two addresses are consistent. This verification mechanism not only ensures that the backend service accurately identifies the NAT address of the caller, but also helps to discover potential address conflicts or errors, thereby improving the stability and reliability of communication. In addition, this solution also enhances the backend service's ability to manage call connections, providing more reliable support for subsequent communications.
[0075] In one embodiment, determining the first public network IP address of the calling end initiating the call according to the first RTP mute data includes:
[0076] Acquire the target network address translation NAT address of the calling end from the first RTP mute data;
[0077] The first public IP address corresponding to the target NAT address is obtained from a preset mapping relationship, where the preset mapping relationship includes a one-to-one correspondence between multiple NAT addresses and multiple IP addresses.
[0078] Optionally, in a specific implementation of the present application, Figure 2 and Figure 3 As shown, the terminal device at the calling end initiates a call, and the call INVITE message (i.e., call request) does not carry "X-Auth-IP" or "X-Auth-IP" is the intranet IP information. The backend service checks that the "X-Auth-IP" field does not exist, or is the intranet IP information. Actively send an extended 18X (for example, an extended 189 SIP response message) SIP response message to the terminal device at the calling end, with the header field "P-Early-Media:sendrecv" information in the response message. The SDP in the message body of the response message carries the public IP information of the backend service, instructing the terminal device at the calling end to send the first RTP silent data packet to the public IP of the backend service. At the same time, start a short timer to wait for the RTP silent data packet;
[0079] Before answering the call, after the terminal device on the calling end receives the 18X response information from the server, if the terminal device on the calling end supports processing 18X messages, it determines the header field "P-Early-Media:sendrecv" information stored in the 18X response information, and sends the first RTP silent data to the IP and port specified by the SDP of the back-end service; if the terminal device on the calling end does not support processing 18X messages, it discards the message without any processing.
[0080] The backend service receives the first RTP silent data packet sent by the terminal device at the calling end within a specified time (configurable, generally less than 300 milliseconds) after the short-time timer is turned on. The backend service will parse the source address and port of the first RTP silent data packet of the terminal device at the calling end, which is the obtained NAT address of the terminal device at the calling end. In this case, the public IP address information of the terminal device initiating the call is obtained before the call is answered;
[0081] If the backend service does not receive the first RTP silent data packet sent by the terminal device at the calling end within a specified time after the short-time timer is turned on, and fails to obtain the NAT address of the terminal device before forwarding the call to the called end, in this case, the NAT address of the terminal device at the calling end is obtained through the call connection process, and the call is sent to the called end. The called end responds with 200OK to connect the call, and the backend service forwards 200OK to the terminal device at the calling end, and carries the public network IP and port of the backend service in the SDP;
[0082] After the called party answers the call, the terminal device of the calling party is in a call state and sends the second RTP media data (audio and video data) to the backend service. The backend service receives the second RTP silent data packet sent by the terminal device, and the backend service parses the second RTP silent data packet to obtain the IP address and port of the source of the second RTP silent data packet, which is the NAT address of the terminal device obtained. In this case, after the call is answered, the IP information of the terminal device initiating the call is successfully obtained.
[0083] Optionally, in an embodiment of the present application, the present application can adaptively adopt corresponding technical means according to the support capabilities of the terminal device at the calling end (the device actively carries IP reporting, the back-end server actively detects by extending the SIP protocol, and obtains from the RTP stream of the terminal device after connection, etc.) to obtain the public IP address of the terminal device under the NAT network environment, thereby maximizing the support scope of the device, minimizing the modification of existing network devices and network elements, and at the same time obtaining the device's post-NAT public IP address as early as possible in the initial stage of the call (before the call is forwarded to the called end).
[0084] The terminal device at the calling end supports the solution of carrying the public network address after NAT in the SIP protocol (for example, extending the X-Auth-IP field, or other methods), and actively reporting. At the same time, after the call is connected, the first public network IP address reported by the calling end and the second public network IP address of the terminal device at the calling end obtained from the second RTP stream address of the terminal device at the calling end after the call is connected can be verified;
[0085] For the terminal device of the calling end that supports the SIP early media function of the IP Multimedia Subsystem (IMS), before the call is sent to the called end, the back-end service actively sends an extended 18X response message, triggering the terminal device of the calling end to actively send the first RTP media mute data packet to the IP and port of the back-end service, through which the back-end service detects the IP address of the terminal device after NAT; for the device that does not support the first two technical solutions, the back-end service forwards the call message to the called end, and after the called end phone is connected, the back-end service obtains the public network IP address of the terminal device after NAT from the second RTP media data packet sent from the terminal device of the calling end to the IP and port of the back-end service. Therefore, the technical solution of this application can obtain the NAT (NAT network, F5 network) address of the terminal device of the calling end in various network environments where the call is initiated, thereby obtaining the public network IP address of the call of the calling end.
[0086] The calling method provided by the second embodiment of the present application is introduced below. Figure 4As shown, the method is applied to the calling end, and the method specifically includes the following steps:
[0087] S400, storing the current public IP address in the current network environment in the address field;
[0088] S500, storing the address field in a call request, and sending the call request storing the address field to a backend service, wherein the call request is used to call a called party;
[0089] S600, upon receiving the SIP response information sent by the backend service according to the call request, if the calling end and the called end are not successfully connected, first RTP silent data is sent to the backend service according to the address information of the backend service in the SIP response information, so that the backend service determines the first public IP address of the calling end to initiate the call according to the first RTP silent data.
[0090] Optionally, in an embodiment of the present application, in step S400, the calling end first needs to determine the public IP address under the current network environment. This can be achieved by querying the network configuration, calling a specific service using an API, or by sending a special network data packet and listening for a response. Once the public IP address is successfully obtained, it is stored in an address field, which can be part of a data structure for storing various information related to the call.
[0091] Next, in step S500, the system adds the address field containing the public IP address to the call request. A call request is a data packet containing various information, which is used to notify the backend service that a call request has occurred and request to establish a communication connection with the called party. In this request, in addition to the public IP address, it may also contain the identifier of the calling party, the identifier of the called party, the call type (such as voice, video, etc.) and other related parameters. This call request is then sent to the backend service for further processing.
[0092] Finally, in step S600, the system waits for a response from the backend service. When the backend service receives the call request, it sends a SIP response message to the caller. At this time, the caller sends a first RTP silent data packet to the backend service based on the backend service address information in the response message. After receiving the data packet, the backend service parses the information therein and determines the public IP address of the caller that sent the data packet. This address can then be used for various purposes, such as recording call logs, troubleshooting, or network optimization.
[0093] In these optional embodiments, the calling method provided by the second aspect of the present application cleverly incorporates the acquisition and transmission mechanism of the public IP address in the calling process. Through steps S400 and S500, the calling end can capture the public IP address under its current network environment in real time, and store it as an address field in the call request and send it to the back-end service. This mechanism not only ensures the accuracy and real-time nature of the public IP address, but also greatly simplifies the complex process of the back-end service obtaining the public IP address of the calling end when establishing a communication connection. In the case where the call is not established, through step S600, the calling end can actively send the first RTP silent data to the back-end service according to the SIP response information returned by the back-end service. Through this data packet, the back-end service can accurately determine the first public IP address used by the calling end when initiating the call. This not only helps the back-end service to troubleshoot and optimize the network, but also provides a more reliable and efficient communication guarantee for the calling end.
[0094] In one embodiment, the method further comprises:
[0095] In the case that the calling end and the called end are successfully connected, if the connection information and address information sent by the back-end service are received, the second RTP silent data is sent to the back-end service according to the address information, so that the back-end service determines the second public IP address of the calling end for initiating the call according to the second RTP silent data, the address information is used to indicate the address of the back-end service, and the connection information is used to indicate that the call between the calling end and the called end is successful.
[0096] Optionally, in a specific implementation of the present application, Figure 5 As shown, the terminal device at the calling end actively detects its public IP address information in the NAT environment, and carries the public IP information in the extended field "X-Auth-IP" of the SIP call request INVITE; carrying the public IP of the terminal NAT of the calling end through the extended field "X-Auth-IP" is only one way of implementing the specific technology, and is an example listed for the convenience of expression. Through a workaround, SIP with NAT public IP information (including symmetrical encryption of public IP information, etc.) can also be used in the SIP protocol, which can also be classified as the solution of this application.
[0097] Subsequently, the backend service determines whether there is an "X-Auth-IP" field in the INVITE message sent by the terminal device on the calling end (there are also cases where the terminal device does not support the extended field "X-Auth-IP") or whether the "X-Auth-IP" field is a public IP; if the IP information obtained by "X-Auth-IP" is a public IP, the obtained IP can be verified to see whether it is the user's real public IP or a forged IP in the signaling. If the "X-Auth-IP" field cannot obtain the public IP information of the terminal device, the SIP call process is used to detect and obtain the public IP of the terminal device. For the specific process, please refer to the calling method of the above-mentioned first aspect embodiment, and this application will not repeat it here.
[0098] Optionally, in an embodiment of the present application, through the technical solution of the present application, the NAT address of the terminal device at the calling end that initiates the SIP call is obtained, which can adapt to various network operating environments of the terminal device and the support capabilities of the compatible device to the greatest extent. The SIP call process based on the standard IMS minimizes the modification of existing terminal devices and network devices, which can effectively reduce the modification cost and improve the call security management and control based on the IP address.
[0099] Optionally, the present application proposes a method for obtaining the public network IP address of the terminal device at the calling end by actively carrying IP reports, actively detecting by the back-end service through the extended SIP protocol, and obtaining from the second RTP stream of the terminal device at the calling end after the connection, etc. during the entire process of the SIP protocol call (when the call is incoming, before the call is forwarded to the called party, after the call is connected), according to the capabilities supported by the terminal device at the calling end and the actual different network environments. The real public network IP address of the terminal device at the calling end obtained by the present application can be compatible with various network operating environments of various terminal devices to the greatest extent. At the same time, based on the standard IMS SIP call process, the modification of existing terminal devices and network devices is minimized, which can effectively reduce the modification cost. At the same time, the present application can obtain the accurate real public network IP address of the terminal device at the calling end, improve the accuracy of call security management and control based on IP addresses and the timeliness of security management and control, and reduce misjudgment of call security management and control.
[0100] In these optional embodiments, in some audio and video call systems based on the SIP protocol, considering the security of the system and application, it is necessary to filter the real IP address of the incoming call of the terminal device on the calling end according to the call control security rules before opening each call to block some illegal calls (such as SIP application detection calls from overseas IPs), etc. Therefore, it is necessary to obtain the real public network IP address information of the terminal device on the calling end before each call. The terminal device on the calling end and the SIP audio and video communication system are deployed in various network environments (NAT network environment, F5 network environment), and the real public network IP address information of the terminal device on the calling end is accurately and efficiently obtained, which helps to improve the effectiveness and timeliness of call security management based on the terminal IP of the calling end, and helps to improve the security of the audio and video call system of the SIP protocol, while preventing and reducing the occurrence of telephone attack incidents.
[0101] Figure 6 A schematic diagram of the structure of a calling device provided in an embodiment of the third aspect of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0102] Reference Figure 6 , the calling device is applied to the backend service, and the calling device may include:
[0103] The receiving module 601 is used to receive a call request sent by a calling end, where the call request is used to call a called end;
[0104] A first sending module 602 is configured to send a Session Initiation Protocol (SIP) response message to the calling end if the address in the address field does not conform to a preset address rule when the call request carries an address field, wherein the preset address rule is used to indicate whether there is a real public IP address of the calling end initiating the call in the address field;
[0105] Determination module 603 is used to determine the first public IP address of the calling end initiating the call based on the first RTP silent data if the first real-time transport protocol RTP silent data sent by the calling end according to the SIP response information is received within a preset time when the calling end and the called end are not successfully connected.
[0106] In one embodiment, the calling device may further include:
[0107] a fourth sending module, configured to, if the first RTP silent data sent by the calling end according to the SIP response information is not received within a preset time, send the address information of the backend service and the connection information to the calling end if the connection information sent by the called end in response to the calling end is received, wherein the connection information is used to indicate that the calling end has a successful call with the called end, and the address information is used to indicate the address of the backend service;
[0108] A second receiving module is used to receive second RTP mute data sent by the calling end according to the address information in a call state;
[0109] The parsing module is used to parse the second RTP mute data to obtain the second public network IP address of the calling end initiating the call.
[0110] In one embodiment, the calling device may further include:
[0111] The first acquisition module is used to acquire the third public network IP address of the calling end initiating the call from the address field if the address field is carried in the call request and if the address field conforms to the preset address rule.
[0112] In one embodiment, the calling device may further include:
[0113] The verification module is used to verify the second public IP address and the third public IP address to obtain a verification result, wherein the verification result is used to indicate whether the second public IP address and the third public IP address are consistent.
[0114] In one embodiment, the determination module may include:
[0115] A first acquisition submodule, configured to acquire a target network address translation NAT address of the calling end from the first RTP mute data;
[0116] The second acquisition submodule is used to acquire the first public IP address corresponding to the target NAT address from a preset mapping relationship, and the preset mapping relationship includes a one-to-one correspondence between multiple NAT addresses and multiple IP addresses.
[0117] Figure 7 A schematic diagram of the structure of a calling device provided in an embodiment of the fourth aspect of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0118] Reference Figure 7 The calling device is applied to the calling end, and the calling device may include:
[0119] The storage module 701 is used to store the current public IP address in the current network environment in the address field;
[0120] A second sending module 702, configured to store the address field in a call request, and send the call request in which the address field is stored to a backend service, wherein the call request is used to call a called party;
[0121] The third sending module 703 is used to send first RTP silent data to the backend service according to the address information of the backend service in the SIP response information when receiving the SIP response information sent by the backend service according to the call request, if the calling end and the called end are not successfully connected, so that the backend service determines the first public IP address of the calling end to initiate the call according to the first RTP silent data.
[0122] In one embodiment, the calling device may further include:
[0123] The fifth sending module is used to send second RTP silent data to the back-end service according to the address information when the calling end and the called end are successfully connected, if the connection information and address information sent by the back-end service are received, so that the back-end service determines the second public IP address for initiating the call from the calling end according to the second RTP silent data, the address information is used to indicate the address of the back-end service, and the connection information is used to indicate that the call between the calling end and the called end is successful.
[0124] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application, and are devices corresponding to the above-mentioned battery thermal runaway warning method. All implementation methods in the above-mentioned method embodiment are applicable to the embodiments of the device. Its specific functions and technical effects can be found in the method embodiment part, which will not be repeated here.
[0125] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0126] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0127] The device may include a processor 801 and a memory 802 storing program instructions.
[0128] When the processor 801 executes the program, the steps in any of the above method embodiments are implemented.
[0129] Exemplarily, the program may be divided into one or more modules / units, one or more modules / units are stored in the memory 802 and executed by the processor 801 to complete the present application. One or more modules / units may be a series of program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the program in the device.
[0130] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0131] The memory 802 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 802 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 802 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 802 is a non-volatile solid-state memory.
[0132] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) readable storage media (e.g., memory devices) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0133] The processor 801 implements any one of the methods in the above embodiments by reading and executing program instructions stored in the memory 802 .
[0134] In one example, the electronic device may further include a communication interface 803 and a bus 810. The processor 801, the memory 802, and the communication interface 803 are connected via the bus 810 and communicate with each other.
[0135] The communication interface 803 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0136] Bus 810 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 810 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0137] In addition, in combination with the method in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores program instructions; when the program instructions are executed by a processor, any one of the methods in the above embodiment is implemented.
[0138] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0139] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0140] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0141] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0142] The functional modules shown in the above block diagram can be implemented as hardware, software, firmware or their combination. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer grids such as the Internet, intranets, etc.
[0143] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0144] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0145] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A calling method, characterized in that: Applied to backend services, the method includes: receiving a call request sent by a calling end, wherein the call request is used to call a called end; In the case where the call request carries an address field, if the address in the address field does not conform to a preset address rule, sending a Session Initiation Protocol SIP response message to the calling end, wherein the preset address rule is used to indicate whether there is a real public Internet Protocol IP address of the calling end initiating the call in the address field; In the event that the calling end and the called end are not successfully connected, if the first real-time transport protocol RTP silent data sent by the calling end according to the SIP response information is received within a preset time, the first public IP address of the calling end initiating the call is determined according to the first RTP silent data.
2. The method according to claim 1, characterized in that: The method further comprises: In the case where the first RTP silent data sent by the calling end according to the SIP response information is not received within the preset time, if the connection information sent by the called end in response to the calling end is received, the address information of the backend service and the connection information are sent to the calling end, the connection information is used to indicate that the calling end and the called end have a successful call, and the address information is used to indicate the address of the backend service; Receiving second RTP mute data sent by the calling end according to the address information in a call state; The second RTP mute data is parsed to obtain the second public IP address of the calling end initiating the call.
3. The method according to claim 2, characterized in that In the case where the first RTP silent data sent by the calling end according to the SIP response information is not received within the preset time, if the called end is received in response to the connection information sent by the calling end, before sending the address information of the backend service and the connection information to the calling end, the method further includes: In the case where the call request carries the address field, if the address field conforms to the preset address rule, obtaining the third public network IP address of the calling end initiating the call from the address field; After parsing the second RTP mute data to obtain the second public network IP address of the calling end initiating the call, the method further includes: The second public IP address and the third public IP address are verified to obtain a verification result, where the verification result is used to indicate whether the second public IP address and the third public IP address are consistent.
4. The method according to claim 1, characterized in that: The determining, according to the first RTP mute data, a first public network IP address of the calling end initiating the call includes: Acquire the target network address translation NAT address of the calling end from the first RTP mute data; The first public IP address corresponding to the target NAT address is obtained from a preset mapping relationship, where the preset mapping relationship includes a one-to-one correspondence between multiple NAT addresses and multiple IP addresses.
5. A calling method, characterized in that: Applied to the calling end, the method comprises: The current public IP address under the current network environment is stored in the address field; storing the address field in a call request, and sending the call request storing the address field to a backend service, wherein the call request is used to call the called party; Upon receiving the SIP response information sent by the backend service according to the call request, if the calling end and the called end are not successfully connected, first RTP silent data is sent to the backend service according to the address information of the backend service in the SIP response information, so that the backend service determines the first public IP address of the calling end to initiate the call according to the first RTP silent data.
6. The method according to claim 5, characterized in that The method further comprises: In the case that the calling end and the called end are successfully connected, if the connection information and address information sent by the back-end service are received, the second RTP silent data is sent to the back-end service according to the address information, so that the back-end service determines the second public IP address of the calling end for initiating the call according to the second RTP silent data, the address information is used to indicate the address of the back-end service, and the connection information is used to indicate that the call between the calling end and the called end is successful.
7. A calling device, characterized in that: Applied to backend services, the device includes: A receiving module, used to receive a call request sent by a calling end, wherein the call request is used to call a called end; A first sending module, configured to send a Session Initiation Protocol SIP response message to the calling end if the address in the address field does not conform to a preset address rule when the call request carries an address field, wherein the preset address rule is used to indicate whether there is a real public network IP address of the calling end initiating the call in the address field; A determination module is used to determine the first public network IP address of the calling end initiating the call based on the first RTP silent data if the first real-time transport protocol RTP silent data sent by the calling end according to the SIP response information is received within a preset time when the calling end and the called end are not successfully connected.
8. A calling device, characterized in that: Applied to a calling end, the device comprises: A storage module, used to store the current public network IP address in the current network environment in the address field; A second sending module, configured to store the address field in a call request, and send the call request in which the address field is stored to a backend service, wherein the call request is used to call a called party; The third sending module is used to send first RTP silent data to the backend service according to the address information of the backend service in the SIP response information when receiving the SIP response information sent by the backend service according to the call request, if the calling end and the called end are not successfully connected, so that the backend service determines the first public IP address of the calling end to initiate the call according to the first RTP silent data.
9. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the calling method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the calling method according to any one of claims 1 to 6 is implemented.
11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the calling method as described in any one of claims 1-6.
Citation Information
Patent Citations
RTP packet mending apparatus, RTP packet sorting method and complementing method
CN101014001A
Method for conducting media stream, conduction detecting method and system
CN101119299A
Method, equipment and system for implementing SIP (Session Initiation Protocol) calling
CN102546644A
A telecommunication method via VoIP system in NetworkAddress Port Translation
KR1020050120917A
Voice Over Internet Protocol (VOIP) Testing
US20090046590A1
