SIP registration message processing method, device, electronic device and storage medium

By NAT crossing the SIP registration message and generating a new response value, the IP address conversion and response value generation problems in SIP registration message processing in the prior art are solved, and the success of SIP registration is achieved.

CN116074279BActive Publication Date: 2025-05-16BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310130579.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-03
Publication Date
2025-05-16
Estimated Expiration
2043-02-03

AI Technical Summary

Technical Problem

When processing SIP registration packets, it is difficult to effectively solve the problems of IP address conversion and response value generation after NAT traversal, resulting in registration failure.

Method used

By NAT crossing the SIP registration message to be processed, the client's IP address is converted into a preset IP address, and a new response value is generated using the preset IP address, replacing the original response value, and generating a new SIP registration message.

Benefits of technology

It realizes the effective processing of SIP registration packets, ensures the possibility of successful registration, and avoids registration failure caused by IP address translation and response value generation problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074279B_ABST
    Figure CN116074279B_ABST
Patent Text Reader

Abstract

The present application provides a SIP registration message processing method, device, electronic device and storage medium. The method is applied to a network device between a client and a server, and includes: by performing NAT traversal on a SIP registration message to be processed, converting the IP address of the client in the SIP registration message to be processed into a preset IP address, wherein the SIP registration message to be processed carries a response value, and the response value is generated by the IP address of the client; using the preset IP address to generate a new response value; replacing the response value in the SIP registration message to be processed after NAT traversal with the new response value to generate a new SIP registration message, so that the SIP registration message can be processed by this method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a SIP registration message processing method, device, electronic device and storage medium. Background Art

[0002] The SIP (Session Initiation Protocol) communication protocol is a signaling control protocol at the application layer. In actual applications, the client can usually send a SIP registration message to the server based on the SIP communication protocol, and how to process the SIP registration message is crucial. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a SIP registration message processing method, device, electronic device and storage medium for processing a SIP registration message.

[0004] A first aspect of an embodiment of the present application provides a SIP registration message processing method, the method being applied to a network device between a client and a server, the method comprising:

[0005] By performing NAT traversal on the SIP registration message to be processed, the IP address of the client in the SIP registration message to be processed is converted into a preset IP address, wherein the SIP registration message to be processed carries a response value, and the response value is generated by the IP address of the client;

[0006] Generate a new response value using the preset IP address;

[0007] The new response value replaces the response value in the SIP registration message to be processed after NAT traversal to generate a new SIP registration message.

[0008] In one embodiment, the method further comprises:

[0009] The generated new SIP registration message is sent to the server, so that after the server obtains the new SIP registration message, it uses the preset IP address to generate a second response value, and determines whether the registration is successful by comparing the second response value with the new response value carried in the new SIP registration message.

[0010] In one embodiment, generating a new response value using the preset IP address specifically includes:

[0011] Generate a URI using the preset IP address;

[0012] The new response value is generated by using the URI and the authentication information carried in the SIP registration message to be processed.

[0013] In one embodiment, the authentication information specifically includes the following parameters of the Authorization field of the SIP communication protocol: username, realm, password, method, nonce; and,

[0014] Using the URI and the authentication information carried in the SIP registration message to be processed, generating the new response value specifically includes:

[0015] Calculate the first hash value of the concatenated string of username, realm and password;

[0016] Calculate a second hash value of the concatenated string of method and the URI;

[0017] A third hash value of a concatenated string of the first hash value, nonce, and the second hash value is calculated as the new response value.

[0018] In one embodiment, the method further includes: acquiring a SIP registration message sent by the client as the SIP registration message to be processed.

[0019] In one embodiment, the network device is connected to a plurality of clients, and the method further comprises:

[0020] Add the SIP registration messages sent by each client to the message queue in the order of receiving time;

[0021] According to the arrangement order in the message queue, a corresponding SIP registration message is obtained as the SIP registration message to be processed.

[0022] A second aspect of an embodiment of the present application provides a SIP registration message processing device, the device being applied to a network device between a client and a server, the device comprising:

[0023] A NAT traversal unit, configured to convert an IP address of a client in a SIP registration message to be processed into a preset IP address by performing NAT traversal on the SIP registration message to be processed, wherein the SIP registration message to be processed carries a response value, and the response value is generated by the IP address of the client;

[0024] A response value generating unit, used to generate a new response value using the preset IP address;

[0025] The replacement unit is used to replace the response value in the SIP registration message to be processed after NAT traversal with the new response value to generate a new SIP registration message.

[0026] In one embodiment, the response value generating unit specifically includes a URI generating subunit and a response value generating subunit, wherein:

[0027] A URI generation subunit, used to generate a URI using the preset IP address;

[0028] The response value generating subunit is used to generate the new response value by using the URI and the authentication information carried in the SIP registration message to be processed.

[0029] A third aspect of the embodiments of the present application provides an electronic device, including:

[0030] processor;

[0031] A memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any one of the first aspects of the embodiments of the present application.

[0032] A fourth aspect of the embodiments of the present application provides a storage medium, wherein the storage medium stores a computer program, and the computer program can be executed by a processor to complete any method described in the first aspect of the embodiments of the present application.

[0033] The operation request processing method provided in the embodiment of the present application is applied to a network device between a client and a server, and includes: performing NAT traversal on a SIP registration message to be processed, converting the IP address of the client in the SIP registration message to be processed into a preset IP address, wherein the SIP registration message to be processed carries a response value, and the response value is generated by the IP address of the client; generating a new response value by using the preset IP address; replacing the response value in the SIP registration message to be processed after NAT traversal with the new response value to generate a new SIP registration message, so that the SIP registration message can be processed by this method. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 A schematic diagram of the specific structure of a SIP registration message processing system provided in an embodiment of the present application;

[0036] Figure 2 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;

[0037] Figure 3 A schematic diagram of the specific structure of a SIP registration message processing system provided in another embodiment of the present application;

[0038] Figure 4 A schematic diagram of a specific process of a SIP registration message processing method provided in an embodiment of the present application;

[0039] Figure 5 A schematic diagram of the specific structure of a SIP registration message processing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the present application, terms such as "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance or sequence.

[0041] As mentioned above, the SIP (Session Initiation Protocol) communication protocol is a signaling control protocol at the application layer. In actual applications, the client can usually send a SIP registration message to the server based on the SIP communication protocol, and how to process the SIP registration message is crucial.

[0042] In view of this, the embodiments of the present application provide a SIP registration message processing method, device, electronic device and storage medium, which can be used to process the SIP registration message. Figure 1 The figure is a specific structural schematic diagram of the SIP registration message processing system provided in an embodiment of the present application, wherein the SIP registration message processing system comprises a server 1, a client 2 and a network device 3, wherein the network device 3 is arranged between the server 1 and the client 2, so that the SIP registration message sent by the client 2 to the server 1 is first sent to the network device 3, and the network device 3 processes the SIP registration message.

[0043] In practical applications, the electronic device provided in the embodiment of the present application can be used as the network device 3. Figure 2 FIG. 4 is a schematic diagram of a specific structure of the electronic device 4, wherein the electronic device 4 comprises: at least one processor 41 and a memory 42, Figure 2A processor is used as an example. The processor 41 and the memory 42 may be connected via a bus 40. The memory 42 stores instructions that can be executed by the processor 41. The instructions are executed by the processor 41 so that the electronic device 4 can implement all or part of the process of the method in the embodiment of the present application. Usually, the electronic device 4 may be a mobile phone, a laptop computer, a desktop computer, or a cluster thereof.

[0044] In addition, it should be noted that the number of the client 2 can be one or more, for example Figure 3 The SIP registration message processing system shown includes a server 1, a network device 3 and multiple clients 2, and the network device 3 is arranged between these clients 2 and the server 1. Therefore, when different users send SIP registration messages to the server 1 through these clients 2, they will first be sent to the network device 3, and the network device 3 will first process these SIP registration messages.

[0045] like Figure 4 The figure shows a specific flow chart of the SIP registration message processing method provided by the embodiment of the present application. The method can be performed by Figure 2 The electronic device 4 shown is executed as a network device, and the method includes the following steps:

[0046] Step S51: Obtain the SIP registration message to be processed.

[0047] Among them, registering the client in the server is one of the important functions of the SIP communication protocol. For example, user A can inform the server of the client's IP address through registration, so that when other users call user A in the future, the server can transfer the call to the client through the IP address, thereby allowing user A to be informed of the call.

[0048] When the client registers with the server, it needs to send a SIP registration message to the server. Of course, after receiving the SIP registration message, the server needs to determine whether the registration is successful. In actual applications, according to the specifications of the SIP communication protocol, the SIP registration message can carry the client's IP address, response value, authentication information, etc.

[0049] In the embodiment of the present application, since the network device is arranged between the client and the server, when the client sends a SIP registration message to the server, the network device can obtain the SIP registration message. Therefore, a specific implementation of step S51 may be that the network device obtains the SIP registration message sent by the client to the server, and uses the SIP registration message as a SIP registration message to be processed, so as to process it later.

[0050] It should be further explained that, for this step S51, it can also be implemented in another way. For example, considering that the network device is usually connected to multiple clients 3, multiple different users may send SIP registration messages to the server through these clients in a short time, resulting in the network device needing to process a large number of SIP registration messages in a short time, thereby increasing the computing pressure of the network device. Therefore, a message queue can be constructed in the network device in advance, and then after receiving the SIP registration messages sent by each client, the received SIP registration messages can be added to the message queue according to the order of receiving time, and then the specific method for obtaining the SIP registration message to be processed in step S51 can be to obtain the corresponding SIP registration message according to the arrangement order in the message queue as the SIP registration message to be processed. In this way, since the network device first adds the SIP registration message to the message queue after receiving it, and then obtains the SIP registration message from the message queue, it can reduce the computing pressure of the network device.

[0051] Step S52: converting the IP address of the client in the SIP registration message to be processed into a preset IP address by performing NAT traversal on the SIP registration message to be processed.

[0052] As mentioned above, the SIP registration message to be processed may carry the client's IP address, response value and authentication information. The response value is generated by the client's IP address, so that the server can subsequently use the response value to determine whether the registration is successful.

[0053] Here, how to use the IP address of the client to generate the response value can be explained first. For example, the client can first use the IP address of the client to generate a corresponding URI (Uniform Resource Identifier), and then use the URI and the authentication information to generate the response value. Wherein, URI is a string used to uniquely identify a certain Internet resource name.

[0054] In actual applications, according to the specification of the SIP communication protocol, the authentication information may include multiple parameters of the Authorization field in the SIP communication protocol, such as the following parameters: username, realm, password, method, nonce. Therefore, the response value may be generated according to the URI generated by the IP address of the client and the username, realm, password, method, nonce. Specifically, the first hash value of the concatenated string of the three parameters username, realm and password may be calculated first, for example, using formula 1 to calculate the first hash value.

[0055] hash1'=MD5(username:realm:password) formula one

[0056] In the formula 1, hash1' is the calculated first hash value; username:realm:password is the concatenated string of the three parameters username, realm and password, that is, the three parameters username, realm and password are concatenated by ":" to obtain the concatenated string, and the concatenated string is calculated by the MD5 hash algorithm to obtain the first hash value. Of course, in actual applications, the MD5 hash algorithm can also be replaced by other hash algorithms, and the MD5 algorithm is only used as an example for explanation here.

[0057] Then, a second hash value of the concatenated string of method and the URI generated according to the IP address of the client is calculated, for example, by using Formula 2.

[0058] hash2'=MD5(method:URI) Formula 2

[0059] In Formula 2, hash2' is the calculated second hash value; method:uri is the concatenated string of method and the URI, that is, the parameter method and the URI are concatenated by ":" to obtain the concatenated string, and the concatenated string is also calculated by the MD5 hash algorithm to obtain the second hash value.

[0060] Then, a third hash value of the concatenated string of the first hash value, nonce and the second hash value is further calculated as the generated response value. After the first hash value and the second hash value are calculated by the above formula 1 and formula 2 respectively, the response value can be calculated by formula 3.

[0061] response'=MD5(hash1':nonce:hash2') Formula 3

[0062] In Formula 3, response' is the calculated response value; hash1' is the first hash value; hash2' is the second hash value; hash1':nonce:hash2' is the concatenated string of the first hash value, nonce and the second hash value, that is, the first hash value, nonce and the second hash value are concatenated by “:” to obtain the concatenated string, and the concatenated string is also calculated by the MD5 hash algorithm to obtain the response value.

[0063] In step S52, the network device performs NAT (NAT traversal) on the SIP registration message to be processed, thereby converting the IP address of the client in the SIP registration message to be processed into a preset IP address. In actual applications, the client is usually set in the enterprise intranet, and the server is set in the extranet. When the client registers with the server, in order to prevent information leakage, it is usually difficult to directly register the client's IP address in the enterprise intranet; therefore, in step S52, the network device performs NAT traversal on the SIP registration message to be processed, thereby converting the IP address of the client in the SIP registration message to be processed into a preset IP address, and the preset IP address can be a unified IP address of the enterprise to the outside.

[0064] Step S53: Generate a new response value using the preset IP address.

[0065] In step S53, the new response value may be generated in the same manner as the response value generated in step S52.

[0066] At this time, the network device may first generate a corresponding URI (hereinafter referred to as URI2) using the preset IP address, and then generate a new response value using the URI2 and the authentication information.

[0067] Specifically, the first hash value of the concatenated string of username, realm and password in the authentication information may be calculated first, for example, by using the above formula 1 to calculate the first hash value (hereinafter referred to as hash1).

[0068] Then, the second hash value of the concatenated string of method and URI2 is calculated, for example, by using the above formula 2, replacing the URI in the formula 2 with URI2, to calculate the second hash value (hereinafter referred to as hash2).

[0069] After obtaining hash1 and hash2, further calculate the third hash value of the concatenated string of hash1, nonce and hash2 as the new response value. For example, the above formula three can be used to replace hash1' and hash2' in the formula three with hash1 and hash2 respectively, so as to calculate the third hash value as the new response value.

[0070] Step S54: Replace the response value in the SIP registration message to be processed after NAT traversal with the new response value to generate a new SIP registration message.

[0071] After the new response value is calculated, since the SIP registration message to be processed is NAT traversed in the above step S52, in step S54, the new response value is further used to replace the response value in the SIP registration message to be processed after NAT traversal, thereby generating a new SIP registration message.

[0072] It should be further explained that, after the IP address is converted by NAT traversal in the above step S52 (the carried client IP address is converted to the preset IP address), since the response value and authentication information carried in the SIP registration message to be processed after the NAT traversal are unchanged, if the SIP registration message to be processed after the NAT traversal is directly sent to the server, so that the server subsequently obtains the SIP registration message to be processed, when judging whether the registration is successful by the response value, the server will generate a corresponding URI by using the preset IP address in the same way, and then generate a response value by using the URI and the authentication information, and compare it with the carried response value. If the two are the same, the registration is successful, and if the two are not the same, the registration fails.

[0073] In actual applications, if the registration is successful, according to the SIP communication protocol, the server can also feedback a 200OK response packet, so that the network device receives the 200OK response packet and forwards the 200OK response packet to the client. After the client receives the 200OK response packet, it parses it according to the SIP communication protocol to obtain a successful registration message; of course, if the registration fails, the server can feedback a corresponding response packet according to the type of failure.

[0074] In this way, since the response value and authentication information carried in the pending SIP registration message are not changed, if the pending SIP registration message after NAT traversal is directly forwarded to the server, it usually causes registration failure.

[0075] In the embodiment of the present application, the response value (generated by the IP address of the client) is further replaced by a new response value (generated by the preset IP address) through step S53 and step S54, thereby generating a new SIP registration message. In this way, the new SIP registration message carries the new response value, the preset IP address and the authentication information. After receiving the new SIP registration message, the server generates a corresponding URI using the preset IP address in the same way, and then generates a response value using the URI and the authentication information, and compares it with the new response value, thereby increasing the possibility of successful registration.

[0076] For example, the SIP registration message to be processed carries authentication information, the client's IP address and a response value, wherein the authentication information is username="3502", realm="OfficeTen", password="Admin111", method="REGISTER", nonce="23950108"; and the client's IP address is 192.168.28.152, so the URI generated by the IP address is URI=sip:192.168.28.152.

[0077] In the client, the first hash value is calculated by the above formula 1 as hash1'=MD5(3502:OfficeTen:Admin111)=13081bdbaa797164c0059889806ba356; the second hash value is calculated by the above formula 2 as hash2'=MD5(REGISTER:sip:192.168.28.152)=68665b47ae834cdda575637269a9c6ef; the third hash value is calculated by the above formula 3 as hash3' = MD5(13081bdbaa797164c0059889806ba356:23950108:68665b47ae834cdda575637269a9c6ef)=ae850ee2184aa88e3b79200f08284095, that is, the response value carried in the SIP registration message to be processed is ae850ee2184aa88e3b79200f08284095.

[0078] After the network device obtains the SIP registration message to be processed, it performs NAT traversal on the SIP registration message to convert the client's IP address 192.168.28.152 in the SIP registration message to be processed into a preset IP address (assuming it is 100.0.0.1). At this time, the SIP registration message to be processed after NAT traversal carries the authentication information, the preset IP address and the response value, wherein the authentication information and the response value remain unchanged, and the IP address is the client's IP address 192.1 68.28.152 is converted to the preset IP address 100.0.0.1; at this time, if the network device directly sends the pending SIP registration message after NAT traversal to the server, after receiving the message, the server uses the same method to first generate the corresponding URI="sip:100.0.0.1" using the preset IP address; then the response value generated by using the URI="sip:100.0.0.1 and the authentication information is bound to be different from the carried response value, resulting in registration failure.

[0079] Therefore, it is necessary to further use the preset IP address 100.0.0.1 to generate a new response value through step S53 in the embodiment of the present application. For example, the preset IP address is used to generate a corresponding URI = "sip:100.0.0.1", and then the URI = "sip:100.0.0.1 and the authentication information are used to generate a new response value, wherein the network device first calculates the first hash value hash1 = MD5 (3502: OfficeTen: Admin111) = 13081bdbaa797164c0059889806ba356 through the above formula 1, and then calculates the second hash value hash2 = MD5 (REGISTER: sip:100.0.0.1) = 724c6a1ed0056861c69ad3cf35b4 through the above formula 2. 500b; then the third hash value is calculated by the above formula 3 as response = MD5 (13081bdbaa797164c0059889806ba356: 23950108: 724c6a1ed0056861c69ad3cf35b4500b) = 63c1a8bcb4d1c9df211856e79592d00a, thus obtaining the new response The response value is 63c1a8bcb4d1c9df211856e79592d00a; in the above step S54, the new response value 63c1a8bcb4d1c9df211856e79592d00a is used to replace the response value ae850ee2184aa88e3b79200f08284095, thereby generating a new SIP registration message.

[0080] Of course, after the new SIP registration message is generated, the generated new SIP registration message can be further sent to the server, so that after the server obtains the new SIP registration message, it can use the preset IP address in the new SIP registration message to generate a second response value, such as using the same method to generate a response value as the second response value, and then compare the second response value with the new response value carried in the new SIP registration message to determine whether the registration is successful.

[0081] Based on the same inventive concept as the SIP registration message processing method provided in the embodiment of the present application, the embodiment of the present application also provides a SIP registration message processing device. For the embodiment of the device, if there is any unclear point, please refer to the corresponding content of the method embodiment, wherein the device is applied to a network device arranged between a client and a server. Figure 5FIG. 6 is a schematic diagram of a specific structure of the device 60, which includes: a NAT traversal unit 601, a response value generation unit 602, and a replacement unit 603, wherein:

[0082] The NAT traversal unit 601 is used to convert the IP address of the client in the SIP registration message to be processed into a preset IP address by performing NAT traversal on the SIP registration message to be processed, wherein the SIP registration message to be processed carries a response value, and the response value is generated by the IP address of the client;

[0083] A response value generating unit 602, used to generate a new response value using the preset IP address;

[0084] The replacing unit 603 is configured to replace the response value in the SIP registration message to be processed after NAT traversal with the new response value to generate a new SIP registration message.

[0085] The device 60 provided in the embodiment of the present application is adopted. Since the device 60 adopts the same inventive concept as the SIP registration message processing method provided in the embodiment of the present application, on the premise that the method can solve the technical problem, the device 60 can also solve the technical problem, which will not be repeated here.

[0086] In addition, in actual applications, the technical effects achieved by combining the device 60 with specific hardware equipment, cloud technology, etc. are also within the scope of protection of the present application. For example, different units in the device 60 are deployed in different nodes in the distributed cluster in a distributed cluster manner to improve efficiency; or, some units in the device 60 are deployed in the cloud to reduce costs.

[0087] In practical applications, the response value generating unit 602 may specifically include a URI generating subunit and a response value generating subunit, wherein:

[0088] A URI generation subunit, used to generate a URI using the preset IP address;

[0089] The response value generating subunit is used to generate the new response value by using the URI and the authentication information carried in the SIP registration message to be processed.

[0090] The authentication information specifically includes the following parameters of the Authorization field of the SIP communication protocol: username, realm, password, method, nonce; and,

[0091] The response value generation subunit may specifically include a response value generation submodule, which is used to calculate a first hash value of a concatenated string of username, realm and password; calculate a second hash value of a concatenated string of method and the URI; and calculate a third hash value of a concatenated string of the first hash value, nonce and the second hash value as the new response value.

[0092] The device 60 may further include a registration message sending unit, configured to send the generated new SIP registration message to the server, so that after obtaining the new SIP registration message, the server generates a second response value using the preset IP address, and determines whether the registration is successful by comparing the second response value with the new response value carried in the new SIP registration message.

[0093] The device 60 may further include a registration message acquisition unit, configured to acquire a SIP registration message sent by the client as the SIP registration message to be processed.

[0094] The network device is connected to multiple clients, and the device 60 may also include a second registration message acquisition unit, which is used to add the SIP registration messages sent by each client to the message queue according to the order of reception time; according to the arrangement order in the message queue, obtain the corresponding SIP registration message as the SIP registration message to be processed.

[0095] The embodiment of the present invention further provides a storage medium, which stores a computer program, and the computer program can be executed by a processor to complete all or part of the process of the method in the embodiment of the present application. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated: HDD) or a solid-state drive (SSD), etc. The storage medium can also include a combination of the above-mentioned types of memory.

[0096] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A SIP registration message processing method, characterized in that: The method is applied to a network device between a client and a server, and the method comprises: By performing NAT traversal on the SIP registration message to be processed, the IP address of the client in the SIP registration message to be processed is converted into a preset IP address, wherein the SIP registration message to be processed carries a response value, and the response value is generated by the IP address of the client; Generate a new response value using the preset IP address; Replacing the response value in the SIP registration message to be processed after NAT traversal with the new response value to generate a new SIP registration message; The method of generating a new response value by using the preset IP address specifically includes: Generate a URI using the preset IP address; The new response value is generated by using the URI and the authentication information carried in the SIP registration message to be processed.

2. The method according to claim 1, characterized in that The method further comprises: The generated new SIP registration message is sent to the server, so that after the server obtains the new SIP registration message, it uses the preset IP address to generate a second response value, and determines whether the registration is successful by comparing the second response value with the new response value carried in the new SIP registration message.

3. The method according to claim 1, characterized in that The authentication information specifically includes the following parameters of the Authorization field of the SIP communication protocol: username, realm, password, method, nonce; as well as, Using the URI and the authentication information carried in the SIP registration message to be processed, generating the new response value specifically includes: Calculate the first hash value of the concatenated string of username, realm and password; Calculate a second hash value of the concatenated string of method and the URI; A third hash value of a concatenated string of the first hash value, nonce, and the second hash value is calculated as the new response value.

4. The method according to claim 1, characterized in that: The method further includes: acquiring a SIP registration message sent by the client as the SIP registration message to be processed.

5. The method according to claim 1, characterized in that The network device is connected to a plurality of clients, and the method further comprises: Add the SIP registration messages sent by each client to the message queue in the order of receiving time; According to the arrangement order in the message queue, a corresponding SIP registration message is obtained as the SIP registration message to be processed.

6. A SIP registration message processing device, characterized in that: The device is applied to a network device between a client and a server, and the device comprises: A NAT traversal unit, configured to convert an IP address of a client in a SIP registration message to be processed into a preset IP address by performing NAT traversal on the SIP registration message to be processed, wherein the SIP registration message to be processed carries a response value, and the response value is generated by the IP address of the client; A response value generating unit is used to generate a new response value using the preset IP address; wherein the response value generating unit specifically includes a URI generating subunit and a response value generating subunit: A URI generation subunit, used to generate a URI using the preset IP address; A response value generating subunit, used to generate the new response value by using the URI and the authentication information carried in the SIP registration message to be processed; The replacement unit is used to replace the response value in the SIP registration message to be processed after NAT traversal with the new response value to generate a new SIP registration message.

7. An electronic device, characterized in that: include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to execute the method according to any one of claims 1-5.

8. A storage medium, characterized in that: The storage medium stores a computer program, and the computer program can be executed by a processor to implement the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and system for automatic configuration of server for remote management of user front-end equipment

    CN101778126A

  • Registration method of session initiation protocol (SIP) terminal and system thereof

    CN102487546A