CN111131315B - Session connection method, device and medium - Google Patents

Session connection method, device and medium Download PDF

Info

Publication number
CN111131315B
CN111131315B CN201911418920.4A CN201911418920A CN111131315B CN 111131315 B CN111131315 B CN 111131315B CN 201911418920 A CN201911418920 A CN 201911418920A CN 111131315 B CN111131315 B CN 111131315B
Authority
CN
China
Prior art keywords
terminal
sip
media
message
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911418920.4A
Other languages
Chinese (zh)
Other versions
CN111131315A (en
Inventor
汶旻
张军呢
孙楠
齐红满
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Baopu Communication Technology Co ltd
Raisecom Technology Co Ltd
Original Assignee
Xi'an Baopu Communication Technology Co ltd
Raisecom Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Baopu Communication Technology Co ltd, Raisecom Technology Co Ltd filed Critical Xi'an Baopu Communication Technology Co ltd
Priority to CN201911418920.4A priority Critical patent/CN111131315B/en
Publication of CN111131315A publication Critical patent/CN111131315A/en
Application granted granted Critical
Publication of CN111131315B publication Critical patent/CN111131315B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1069Session establishment or de-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1073Registration or de-registration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1101Session protocols
    • H04L65/1104Session initiation protocol [SIP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Telephonic Communication Services (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a session connection method, a device and a medium, wherein the method comprises the following steps: receiving a call request initiated by a first terminal, wherein the call request is used for requesting a session with a second terminal; when a target terminal exists in the first terminal and the second terminal, modifying a contact address of the target terminal into a communication address of the target terminal, wherein the target terminal is a terminal with a different contact address and a different communication address, the contact address is an IP address in a local area network, and the communication address is an IP address in the Internet; and establishing the SIP connection according to the contact address of the first terminal and the contact address of the second terminal. The scheme disclosed by the embodiment of the invention realizes the voice intercommunication between different network planes by using a mode of modifying the contact address of the SIP terminal, provides the NAT traversal function and reduces the operation cost.

Description

Session connection method, device and medium
Technical Field
The present invention relates to the field of network technologies, and in particular, to a session connection method, device, and medium.
Background
In the current Session Initiation Protocol (SIP) terminal access device, SIP terminals accessing multiple mutually isolated network planes at the same time are not supported basically, and functions of completing voice service connection and processing between SIP terminals of each network plane cannot be provided. If the access of the multi-network plane SIP terminal is to be implemented, session Border Controller (SBC) devices need to be added between each network plane egress and the SIP terminal access device to implement functions similar to a network bridge, which is used to complete the interworking between each network plane SIP terminal and the SIP terminal access device. This increases the cost of SIP voice network networking and the number of points of failure.
In the current SIP terminal access device, the SIP terminal located behind a Network Address Translation (NAT) device in a Network is not basically supported to directly access the SIP terminal access device, and if the SIP terminal located behind the NAT device needs to access the SIP terminal access device, the NAT device itself generally needs to have an SIP Application Layer Gateway Service (ALG) function, or the SIP voice Network needs to have an NAT traversal server, and the SIP terminal supports the NAT traversal function. The SIP ALG is the simplest and reliable method for realizing the NAT traversal of the SIP terminal, but cannot ensure that all NAT devices between the SIP terminal and the SIP terminal access device support and open the SIP ALG function. The NAT Traversal service includes two protocols, namely, session Traversal application (STUN) for NAT and Traversal by forwarding through NAT (Traversal Using Relay NAT, TURN), the STUN protocol-based NAT Traversal server cannot penetrate Symmetric NAT (Symmetric NAT) and similar firewall equipment, while the TURN protocol-based NAT Traversal server requires that all messages must be forwarded through the TURN server, which increases packet delay and packet loss probability, and both the STUN and TURN services require that the SIP terminal has STUN or TURN client functions, which increases network complexity and increases cost of the SIP terminal.
At present, with the completion of upgrading an IP Multimedia System (IMS) Network by an operator voice service core Network, an SIP terminal replaces a traditional Public Switched Telephone Network (PSTN) Telephone line, and under the condition of a large number of access communication networks, access intercommunication of SIP terminal voice services in multiple Network planes and NAT traversal of SIP services in the same Network plane are realized, which are necessary functions of an SIP terminal access device.
Disclosure of Invention
The invention provides a session connection method, a device, equipment and a medium, which are used for solving the technical problems in the background technology, can meet the access of SIP terminals of all network planes and the requirements of the connection and processing of the voice services of the SIP terminals among all the network planes, can simultaneously meet the requirements of NAT equipment but not having a full-path SIP ALG function, and can access the SIP terminal access equipment in the voice network without a NAT traversing server, thereby realizing the SIP terminals behind the NAT or behind a multi-layer NAT, normally accessing the SIP terminal access equipment and completing the functions of the connection and processing of the voice services.
In a first aspect, an embodiment of the present invention provides a session connection method, which is applied to a session initiation protocol SIP access device, and the method includes:
receiving a call request initiated by a first terminal, wherein the call request is used for requesting a session with a second terminal;
when a target terminal exists in the first terminal and the second terminal, modifying the contact address of the target terminal into the communication address of the target terminal, wherein the target terminal is a terminal with a contact address different from the communication address, the contact address is an IP address in a local area network, and the communication address is an IP address in the Internet;
and establishing SIP connection according to the contact address of the first terminal and the contact address of the second terminal.
In a possible implementation manner, in a method provided in an embodiment of the present invention, establishing an SIP connection according to a contact address of a first terminal and a contact address of a second terminal includes:
sending verification information to the first terminal according to the contact address of the first terminal, and sending verification information to the second terminal according to the contact address of the second terminal;
and after confirming that the feedback information of the first terminal and the verification success information of the second terminal are received, establishing SIP connection.
In a possible implementation manner, in the method provided in this embodiment of the present invention, after the SIP connection is established, the method further includes:
and sending the media data packet sent by the second terminal to the first terminal according to the stored contact address of the first terminal, wherein the media data comprises audio data and/or video data.
In a possible implementation manner, in the method provided in an embodiment of the present invention, the method further includes:
determining the address of a first media data packet according to a media data packet of a first terminal, and determining the address of a second media data packet according to a media data packet sent by a second terminal;
if the address of the first media data packet is different from the contact address of the first terminal, updating the contact address of the first terminal; and/or
And if the address of the second media data packet is different from the contact address of the second terminal, updating the contact address of the second terminal.
In a possible implementation manner, in the method provided by the embodiment of the present invention, the contact address and the communication address of the first terminal are determined according to registration information sent when the first terminal registers; and/or
The contact address and the communication address of the second terminal are determined based on registration information sent when the second terminal registers.
In a second aspect, an embodiment of the present invention provides a session connection apparatus, where the apparatus includes:
the receiving unit is used for receiving a call request initiated by a first terminal, wherein the call request is used for requesting a session with a second terminal;
the processing unit is used for modifying the contact address of the target terminal into the communication address of the target terminal when the target terminal exists in the first terminal and the second terminal, wherein the target terminal is a terminal with different contact addresses and communication addresses, the contact addresses are IP addresses in a local area network, and the communication addresses are IP addresses in the Internet;
and the connection unit is used for establishing SIP connection according to the contact address of the first terminal and the contact address of the second terminal.
In a possible implementation manner, in the apparatus provided in the embodiment of the present invention, the connection unit is specifically configured to:
sending verification information to the first terminal according to the contact address of the first terminal, and sending verification information to the second terminal according to the contact address of the second terminal;
and after confirming that the feedback information of the first terminal and the verification success information of the second terminal are received, establishing SIP connection.
In a possible implementation manner, in the apparatus provided in this embodiment of the present invention, after the SIP connection is established, the connection unit is further configured to:
and sending the media data packet sent by the second terminal to the first terminal according to the stored contact address of the first terminal, wherein the media data comprises audio data and/or video data.
In a possible implementation manner, in an apparatus provided in an embodiment of the present invention, the apparatus further includes:
the correcting unit is used for determining the address of a first media data packet according to a media data packet of a first terminal and determining the address of a second media data packet according to a media data packet sent by a second terminal;
if the address of the first media data packet is different from the contact address of the first terminal, updating the contact address of the first terminal; and/or
And if the address of the second media data packet is different from the contact address of the second terminal, updating the contact address of the second terminal.
In a third aspect, an embodiment of the present invention provides an electronic device, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement a method as provided by the first aspect of an embodiment of the invention.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium, on which computer program instructions are stored, which, when executed by a processor, implement the method as provided by the first aspect of embodiments of the present invention.
The session connection method, the session connection device, the session connection equipment and the session connection medium have the following beneficial effects: by using the mode of modifying the SIP terminal contact address, the problems that the prior SIP voice access equipment needs a special NAT traversal server or the NAT equipment has the SIP ALG function when the voice is intercommunicated between different network planes and VoIP is transmitted in the network environment with the NAT equipment are solved, the voice intercommunication between different network planes is realized on the basis of not changing the prior network, the NAT traversal function is provided, and the operation cost is reduced.
Drawings
Fig. 1 is a schematic flowchart of a session connection method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of application networking of specific devices for accessing a network plane SIP terminal according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a registration process of an SIP terminal in the internet according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a registration flow of an SIP terminal in a bearer network according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a signaling flow of a terminal call between the internet and a bearer network according to an embodiment of the present invention;
fig. 6 is a schematic diagram illustrating a processing flow of a call media between the internet and a bearer network according to an embodiment of the present invention;
fig. 7 is a schematic diagram of application networking of specific devices with an SIP terminal access function according to a second embodiment of the present invention;
fig. 8 is a schematic diagram of a registration flow of an SIP terminal according to a second embodiment of the present invention;
fig. 9 is a schematic diagram of a calling flow of an SIP terminal according to a second embodiment of the present invention;
fig. 10 is a schematic diagram of signaling flow of an SIP terminal as a called call according to a second embodiment of the present invention;
fig. 11 is a schematic diagram illustrating a processing flow of a call media of an SIP terminal according to a second embodiment of the present invention;
fig. 12 is a schematic structural diagram of a session connection apparatus according to an embodiment of the present invention;
fig. 13 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Some of the words that appear in the text are explained below:
the term "and/or" in the embodiments of the present invention describes an association relationship of associated objects, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The session connection method, apparatus, device and medium provided by the present invention are described in more detail below with reference to the accompanying drawings and embodiments.
The present embodiment provides a Session connection method, which is applied to a Session Initiation Protocol (SIP) access device, and as shown in fig. 1, the Session connection method specifically includes:
step 101, receiving a call request initiated by a first terminal, where the call request is used to request a session with a second terminal.
In specific implementation, the SIP access device receives a call request initiated by the first terminal for requesting a session with the second terminal, and determines that a session connection between the first terminal and the second terminal is to be established.
Preferably, the first terminal and the second terminal both need to be registered in the SIP access device in advance to determine the validity of the connection between the first terminal and the second terminal, and store the communication address and the contact address of the terminal according to the registration information sent during registration.
It should be noted that the contact address of the terminal is an IP address of the terminal in the local area network or in other mapping relationships, and the communication address of the terminal is an internet IP address of the local area network where the terminal is located or in other mapping relationships.
And 102, when the first terminal and the second terminal have target terminals, modifying the contact address of the target terminals into the communication address of the target terminals.
In specific implementation, the target terminal is a terminal with a contact address different from a communication address of the terminal.
And 103, establishing SIP connection according to the contact address of the first terminal and the contact address of the second terminal.
And during specific implementation, sending verification information to the first terminal according to the contact address of the first terminal, sending verification information to the second terminal according to the contact address of the second terminal, and establishing SIP connection after confirming that the feedback information of the first terminal and the verification success information of the second terminal are received.
After the SIP connection is established, the media data packet sent by the first terminal is sent to the second terminal according to the contact address of the second terminal and the media data packet sent by the second terminal is sent to the first terminal according to the stored contact address of the first terminal, and the media data may be audio data and/or video data, or may be a media file in other forms.
The following describes a specific implementation process of session connection provided by the embodiment of the present invention with reference to fig. 2 to 11.
Example one
As shown in fig. 2-6, the SIP voice access device is described as supporting multi-network plane SIP terminal access functionality.
As shown in fig. 2, it is a networking diagram of a specific device application of a multi-network plane SIP terminal access function, and the SIP voice access device has a function of communicating with the internet and a metropolitan area carrier network of an operator at the same time. The SIP terminal 1 and the SIP terminal 2 are in the Internet, and the SIP terminal 3 and the SIP terminal 4 are in a metropolitan area carrier network of an operator. The SIP terminal 1 and the SIP terminal 3 realize the connection and processing of voice services through the SIP voice access equipment, and complete SIP voice call and other voice related services.
First, registering a terminal, (1) as shown in fig. 3, registering an SIP terminal in the internet includes:
in step 301, the sip terminal 1 sends a registration message.
The SIP terminal 1in the Internet sends a registration message to the SIP access device, because there is no NAT device, the source IP is the IP of the SIP terminal 1 itself, and the destination IP is the signaling gateway Internet IP of the SIP terminal access device.
The sip terminal access device processes the registration information, step 302.
After receiving the SIP terminal 1 registration message, the signaling gateway in the SIP terminal access device sends the registration message to the voice service from the internal signaling channel, and the rec-route field in the SIP message of the registration message carries the IP and the port in the SIP message routing process, wherein according to the principle from near to far, the IP and the port are respectively as follows: signaling gateway internal signaling IP and port, signaling gateway internet IP and port, source IP and port of received SIP terminal 1 registration message.
The voice service in the SIP terminal access equipment acquires and records the source IP and the port corresponding to the SIP terminal 1 through the rec-route field, and acquires and records the contact IP and the port information of the SIP terminal 1 through the contact field.
The sip terminal access device composes and sends a 200 OK message, step 303.
The voice service in the SIP terminal access device fills in the content of the route field of the SIP message in the 200 OK message according to the IP information recorded in the routing process in the received registration message, indicates the message transmission route and sends the 200 OK message to the signaling gateway.
And the signaling gateway in the SIP terminal access equipment determines to locally send the IP using the Internet according to the received 200 OK message. And stripping IP information of the inside of the SIP terminal access equipment and the signaling gateway in the routing, and sending the information to the SIP terminal 1 through an Internet IP and a port according to the rest routing information to finish the registration process.
In this embodiment, after the SIP terminal 1 completes registration of the SIP terminal access device, it may legally initiate services such as voice call to other SIP terminals registered in the SIP terminal access device. And the SIP terminal access device acquires and records the contact address information of the SIP terminal 1 and the IP and SIP signaling port of the SIP terminal 1 through the registration message of the SIP terminal 1, when other SIP terminals registered in the SIP terminal access device call the SIP terminal 1, the SIP call message can be correctly coded and sent to the SIP terminal 1, and the Internet network plane where the SIP terminal 1 is located is selected to send the SIP call message to the IP and signaling port of the SIP terminal 1.
(2) As shown in fig. 4, the registration process of the SIP terminal in the bearer network is as follows:
the sip terminal 3 sends a registration message, step 401.
The SIP terminal 3 in the bearer network sends the registration message, because there is no NAT device, the source IP is the IP of the SIP terminal 3 itself, the destination IP is the signaling gateway Internet plane IP of the SIP terminal access device, and sends to the SIP access device.
The sip terminal access device processes the registration information, step 402.
After receiving the SIP terminal 3 registration message, the signaling gateway in the SIP terminal access device sends the registration message to the voice service from the internal signaling channel, and the rec-route field in the SIP message of the registration message carries the IP and the port in the SIP message routing process, wherein according to the principle from near to far, the IP and the port are respectively as follows: the signaling gateway internal signaling IP and port, the signaling gateway bearer network IP and port, the source IP and port of the received SIP terminal 3 registration message.
The voice service in the SIP terminal access device acquires and records the source IP and the port corresponding to the SIP terminal 3 through the rec-route field, and acquires and records the contact IP and the port information of the SIP terminal 3 through the contact field.
The sip terminal access device composes and sends a 200 OK message, step 402.
The voice service in the SIP terminal access device fills in the content of the route field of the SIP message in the 200 OK message according to the IP information recorded in the routing process of the received message, indicates the message transmission route and sends the 200 OK message to the signaling gateway.
And the signaling gateway in the SIP terminal access equipment determines to locally send the IP using the bearer network according to the received 200 OK message. And stripping IP information of the inside of the SIP terminal access equipment and the signaling gateway in the routing information, and sending the information to the SIP terminal 3 through the IP and the port of the bearer network according to the remaining routing information to finish the registration process.
After the SIP terminal 3 completes the registration of the SIP terminal access device, it can legally initiate services such as voice call to other SIP terminals registered in the SIP terminal access device. And the SIP terminal access device acquires and records the contact address information of the SIP terminal 3 and the IP and SIP signaling port of the SIP terminal 3 through the registration message of the SIP terminal 3, when other SIP terminals registered in the SIP terminal access device call the SIP terminal 3, the SIP call message can be correctly coded and sent to the SIP terminal 3, and the network plane of the bearing network where the SIP terminal 3 is located is selected to send the SIP call message to the IP and signaling port of the SIP terminal 3.
After the registration is completed, a call can be initiated between the terminals that have successfully registered, as shown in fig. 5, which is a terminal call signaling flow between the internet and the bearer network.
Step 501, an SIP terminal 1in the internet initiates a call, a called user is an SIP terminal 3 in a bearer network, because there is no NAT device, an SIP terminal access device receives an INVITE message sent by the SIP terminal 1, a source IP and a port carried by the INVITE message are an IP and a signaling port of the SIP terminal 1, a destination IP and a port are an internet IP and a signaling port of the SIP terminal access device, c-line carried by SDP information is an IP of the SIP terminal 1, and m-line is a media port of the SIP terminal 1.
Step 502, after receiving the INVITE message from the SIP terminal 1, the signaling gateway in the SIP terminal access device sends the message to the voice service from the internal signaling channel, and carries the IP and the port in the SIP message routing process through the rec-route field in the INVITE message, wherein according to the principle from near to far, the following steps are respectively: a signaling gateway internal signaling IP and port, a signaling gateway internet IP and port, and a source IP and port of the received SIP terminal 1INVITE message.
The voice service in the SIP terminal access device acquires the source IP and the port corresponding to the SIP terminal 1 through the rec-route field of the INVITE message, and acquires the media information of the SIP terminal 1 through the SDP information of the INVITE message.
Step 503, the voice service in the SIP terminal access device fills the content of SIP message route field of 100trying message through the IP information recorded by rec-route field, indicates the message transmission route, and sends 100trying message to the signaling gateway through the internal channel.
And step 504, the signaling gateway in the SIP terminal access equipment determines to locally send and use the Internet IP according to the received 100trying message, modifies the contact field into the Internet IP and the signaling port of the signaling gateway, strips the IP information of the inside of the SIP terminal access equipment and the signaling gateway in the routing information and sends the 100trying message to the SIP terminal 1 according to the rest routing information.
Step 505, the voice service in the SIP terminal access device performs number translation according to the called number carried in the INVITE message, finds that the called user is a user registered by the bearer network, fills in the request header field according to the recorded contact address (contact field of the SIP message) carried in the registration information of the SIP terminal where the user is located, and fills in the route header field according to the recorded source IP and port of the registration message of the SIP terminal where the user is located. The local media IP of the SIP access equipment should select a bearer network IP which is intercommunicated with a source IP of a registration message of the SIP terminal where the user is located, and after the application of local media resources is completed by the IP, the voice service sends an INVITE message carrying SDP information to a signaling gateway. The SDP information is related information of local media resources of the SIP terminal access equipment, c-line carried by the SDP information is a media gateway bearing network IP in the SIP terminal access equipment, and m-line is a media port of the media gateway in the SIP terminal access equipment.
Step 506, the signaling gateway in the SIP terminal access device determines to locally send and use the IP of the bearer network according to the received INVITE message, modifies the contact field of the SIP message of the INVITE message to the IP of the bearer network and the signaling port of the signaling gateway, strips the IP information of the interior of the SIP terminal access device and the signaling gateway in the routing information, does not modify the SDP media information, and sends the message to the SIP terminal 3 in the bearer network according to the remaining routing information.
Step 507, the SIP terminal 3 in the bearer network receives the call INVITE message, sends 100trying, and sends 180 messages to the SIP terminal access device.
Step 508, the signaling gateway in the SIP terminal access device forwards the received 100trying and 180 messages to the voice service in the SIP terminal access device.
After receiving the 180 message of the called SIP terminal 3, the voice service in the SIP terminal access device applies for the local media resource corresponding to the SIP terminal access device of the SIP terminal 1 according to the obtained source IP information and media information of the SIP terminal 1, and the local media IP of the SIP access device should select the IP intercommunicated with the source IP of the SIP terminal 1. After the local media resource is applied, the media gateway is informed to establish the media channel through the internal signaling channel, when the media channel is established, the far-end media IP of the SIP terminal 1 recorded by the media gateway is the source IP of the SIP terminal 1, and the far-end media port is the media port of the SIP terminal 1 recorded by the m-line in the SDP information of the INVITE message of the SIP terminal 1.
Step 509, after the media channel is established, the voice service sends 183 message with SDP information to the signaling gateway, fills in the content of route field of SIP message, and indicates the message transmission route. The SDP information carries c-line which is a media gateway Internet Protocol (IP) in the SIP terminal access equipment, and m-line is a media port of the media gateway in the SIP terminal access equipment.
And step 510, the signaling gateway in the SIP terminal access equipment determines to locally send and use the Internet IP according to the received 183 message, modifies the contact field in the 183 message into the Internet IP and the signaling port of the signaling gateway, strips the IP information of the interior of the SIP terminal access equipment and the signaling gateway in the routing information, does not modify the SDP media information, and sends the message to the calling SIP terminal 1 according to the rest routing information.
Step 511, after receiving the call, the called SIP terminal 3 sends a 200 OK message carrying the SDP information to the SIP terminal access device signaling gateway. Wherein, the c-line carried by the SDP information is the IP of the SIP terminal 3, and the m-line is the media port of the SIP terminal 3.
And step 512, the signaling gateway in the SIP terminal access equipment sends the 200 OK message to the voice service from the internal signaling channel, and the media information carried by the SDP information is not modified.
The voice service in the SIP terminal access device receives the 200 OK message, informs the media gateway to establish the media channel through the internal signaling channel according to the media information carried by the message, when the media channel is established, the far-end media IP of the SIP terminal 3 recorded by the media gateway is the source IP of the SIP terminal 3, and the far-end media port is the media port of the SIP terminal 3 recorded by the m-line in the SDP information of the 200 OK message of the SIP terminal 3.
Step 513, the voice service in the SIP terminal access device sends the 200 OK message of the calling SIP terminal 1 to the signaling gateway, which carries the local media information, fills in the content of the route field of the SIP message (specifically, each field of the SIP message of the 200 OK message is filled in, refers to the process of sending 183 message of the calling SIP terminal 1), and indicates the message transmission route.
And 514, the signaling gateway in the SIP terminal access equipment determines to locally send and use the Internet IP and the signaling port according to the received 200 OK message, strips the IP information of the inside of the SIP terminal access equipment and the signaling gateway in the routing information, and sends the message to the calling SIP terminal 1 according to the remaining routing information.
Step 515, after receiving the 200 OK message, the SIP terminal 1 sends an ACK message to the SIP terminal access device, and the SIP terminal access device sends an ACK message to the called SIP terminal 3, so that the call is successfully established.
As shown in fig. 6, the call media processing flow between the internet and the bearer network is as follows:
step 601, the terminal 1 sends a media packet.
After the calling SIP terminal 1in the Internet is connected, a media packet is sent according to the received far-end SDP information, the source IP and the Port are local media information, and the destination IP and the Port are media information of the same network plane reserved for the SIP terminal 1 by the SIP terminal access equipment.
In step 602, the sip access device forwards the data packet of terminal 1 to terminal 3.
After receiving the media packet of the calling SIP terminal 1, the media gateway of the SIP terminal access device determines whether the locally stored remote port is the same as the source port of the received packet, and if not, updates the locally stored remote port information.
The media gateway of the SIP terminal access device switches the inside of the media package to the local media port of the called side, and the local port of the called side establishes a connected remote port according to the channel and forwards the media package to the SIP terminal 3 in the bearer network.
Step 603, the terminal 3 sends the media packet.
After the called SIP terminal 3 in the bearer network is connected, a media packet is sent according to the received far-end SDP information, the source IP and the Port are local media information, and the destination IP and the Port are media information of the same network plane reserved for the SIP terminal 3 by the SIP terminal access equipment.
Step 604, the sip access device forwards the media packet of terminal 3.
After receiving the media packet of the called SIP terminal 3, the media gateway of the SIP terminal access device determines whether the locally stored far-end port is the same as the source port of the received packet, and if not, updates the locally stored far-end port information.
The media gateway of the IP terminal access device internally switches the media packet to the local media port of the calling side, the local port of the calling side establishes a far-end port of connection according to the channel, and forwards the packet to the calling SIP terminal 1in the Internet.
Therefore, the calling and called call media are intercommunicated, and the voice is normal.
In the process, the media gateway of the SIP terminal access equipment selects local corresponding network IP information for the terminal according to the IP information of the terminal in different network planes, so that the media port channel is successfully established, and the media information intercommunication between the terminals in different network planes is completed.
When the network plane accessed by the SIP terminal access device is less, such as the internet and the carrier network of the operator in this embodiment, the access of the non-accessible network plane is realized through the signaling gateway and the media gateway multi-network card, the voice service judges which network plane IP is used for communicating with a certain terminal, and corresponding signaling channel and media channel are respectively established in the signaling gateway and the media gateway.
When the SIP terminal access device has more network planes, and a single signaling gateway and a media gateway do not have enough network cards, the accessible network planes can be expanded by increasing the number of the signaling gateway and the media gateway, and the specific service processing is still processed by the same voice service, so that the access of the multi-plane SIP terminal and the connection and processing of the voice service are realized.
In order to solve the problem of voice intercommunication between different network planes, the scheme proposed in this section is mainly to deploy SIP terminal access equipment at the boundaries of each network plane to be intercommunicated, so that the SIP terminal access equipment:
after receiving the SIP message sent by the SIP terminal in one network to the SIP terminal in another network, modifying the header field and the address information which can not be addressed by the other network in the message body of the SIP message into: the address information (including IP address and port) which can be communicated with the SIP terminal of the other network receiver, and further establishes the signaling and media channel between different SIP terminals between two networks.
Example two
As shown in fig. 7-11, the access functionality description of the SIP client located behind the NAT/FW is supported for SIP voice access devices.
In the application networking diagram shown in fig. 7, the SIP terminal access device and the SIP terminal are both located in the internet, the SIP terminal access device directly accesses the internet, the SIP terminal is deployed in an intranet and accesses the internet through an enterprise egress router, the enterprise egress router provides NAT but does not have a SIP ALG function, and meanwhile, there is no STUN or TURN server providing NAT traversal service in the network, and we will explain how the SIP terminal access device normally accesses these SIP terminals and completes continuation and processing of voice service.
First, a terminal is registered, as shown in fig. 8, the SIP terminal registration steps are as follows:
in step 801, the sip terminal 1 sends a registration message.
The SIP terminal 1in the Internet sends a registration message, the source IP of the IP message is the IP of the SIP terminal 1in an enterprise intranet, the destination IP is the IP of a signaling gateway Internet of the SIP terminal access device, but the IP message is not on a direct route, and the IP message is sent to the gateway of the SIP terminal 1, namely the LAN side interface 192.168.1.1 of the enterprise egress router.
After receiving the registration message sent by the SIP terminal 1, the enterprise egress router establishes, according to the destination address of the IP message, a mapping from the IP port 192.168.1.8 of the SIP terminal 1 to the IP port 201.101.100.3 on the internet interface of the enterprise egress router, and forwards the SIP registration message of the SIP terminal 1 to the signaling gateway of the SIP terminal access device through the internet interface of the enterprise egress router, where the destination IP and the port of the message are not changed, and the source IP and the port are the router internet IP and the port mapped by the router.
The sip terminal access device processes the registration information, step 802.
After receiving the register message of the SIP terminal 1, the signaling gateway in the SIP terminal access device sends the register message to the voice service from the internal signaling channel, and the rec-route field in the SIP message of the register message carries the IP and the port in the routing process of the SIP message, wherein according to the principle from near to far, the IP and the port respectively comprise the following steps: signaling gateway internal signaling IP and port, signaling gateway internet IP and port, and IP and port on the enterprise egress router internet interface (source IP and port of SIP terminal 1 registration message received by the signaling gateway).
The voice service in the SIP terminal access equipment acquires and records a source IP and a port corresponding to the registration message of the SIP terminal 1 through the rec-route field, acquires and records the contact IP and the port information of the SIP terminal 1 through the contact field, and stores the source IP and the port of the registration message acquired through the rec-route field as the SIP signaling address information of the SIP terminal 1 as the address of the subsequent voice service communication if the two IPs and the port are different after comparison.
The sip terminal access device composes and sends a 200 OK message, step 803.
The SIP terminal accesses the voice service in the equipment, fills in the content of the route field of the SIP message in the 200 OK message according to the IP information recorded in the route process in the received registration message, indicates the message transmission route, sends the 200 OK message to the signaling gateway, and the contact field in the 200 OK message is still the contact field in the registration message of the SIP terminal 1.
And the signaling gateway in the SIP terminal access equipment determines to locally send the IP using the Internet according to the received 200 OK message. And stripping IP information of the interior of the SIP terminal access equipment and the signaling gateway in the routing, and sending the information to the enterprise outlet router through the Internet IP and the port according to the rest routing information.
The enterprise egress router receives the SIP message at 201.101.100.3.
Through the registration message of the SIP terminal 1, the SIP terminal access device records the contact address (SIP message contact field in the registration message of the SIP terminal 1) and the communication address (the source IP and port of the registration message of the SIP terminal 1 received by the SIP terminal access device, i.e. the IP and port of the SIP terminal 1 mapped by the internet interface of the enterprise egress router. Subsequently, when other SIP terminals registered to the SIP terminal access device call the SIP terminal 1, the SIP terminal access device uses the recorded contact address of the SIP terminal 1 as the value of the request field of the SIP message, and uses the communication address of the SIP terminal 1 as the destination address of the SIP message received by the SIP terminal 1.
The registration flow of SIP terminal 2 is identical to that of SIP terminal 1, except that the IP and port 192.168.1.9 of the enterprise egress router to SIP terminal 2 are mapped to IP and port 201.101.100.3 of the internet interface of the enterprise egress router. The SIP terminal access device records the IP and the port of the SIP terminal 2 as the contact address of the SIP terminal 2, and the IP and the port of the SIP terminal 2 mapped by the Internet interface of the enterprise export router are the communication address of the SIP terminal 2. When other SIP terminals registered in the SIP terminal access device call the SIP terminal 2 later, the SIP terminal access device uses the recorded contact address of the SIP terminal 2 as the value of the request field of the SIP message, and uses the communication address of the SIP terminal 2 as the destination address of the SIP message received by the SIP terminal 2.
After the registration is completed, a call may be initiated between the terminals that have successfully registered, as shown in fig. 9, which is a flow chart of the calling party of the SIP terminal.
Step 901, a SIP terminal 1in an enterprise initiates a call, the called party is a SIP terminal 2 in the same enterprise, and sends a call INVITE message, a source IP of an IP message is an IP of the SIP terminal 1in an enterprise intranet, a destination IP is an IP of a signaling gateway internet of an SIP terminal access device, but because the IP message is not on a direct route, the IP message is sent to a gateway of the SIP terminal 1, namely, an enterprise egress router LAN side interface 192.168.1.1. The media information carried by the SDP information is the IP and port information of the SIP terminal 1 inside the enterprise, where c-line is the IP of the SIP terminal 1, and m-line is the media port of the SIP terminal 1.
Step 902, after receiving the INVITE message sent by the SIP terminal 1, the enterprise egress router queries, according to the destination address and the source address of the IP message, the mapping from the established IP port 192.168.1.8 of the SIP terminal 1 to the IP port 201.101.100.3 on the internet interface of the enterprise egress router.
Step 903, after receiving the INVITE message of the SIP terminal 1, the signaling gateway in the SIP terminal access device sends the INVITE message to the voice service from the internal signaling channel, and carries the IP and the port in the SIP message routing process through the rec-route field of the SIP message in the INVITE message, wherein according to the principle from near to far, the following steps are respectively: the signaling gateway internal signaling IP and port, the signaling gateway internet IP and port, the IP and port on the enterprise egress router internet interface (the source IP and port of the INVITE message of the SIP terminal 1 received by the signaling gateway), and the media information carried by the SDP information is not modified.
The voice service in the SIP terminal access device acquires the real SIP message source IP and port information and the IP and port information in contact through the routing process record, and the inconsistency is found after comparison, so that the real SIP message source IP and port information (the IP and port information of the enterprise exit router) are used as the subsequent contact address of the SIP terminal 1in the session, and the SIP message source IP is used as the media IP of the SIP terminal 1.
In step 904, the voice service in the SIP terminal access device fills in the content of the route field of the SIP message in the 100trying message according to the IP information recorded in the routing process in the received INVITE message, indicates the message transmission route, and sends the 100trying message.
Step 905, the signaling gateway in the SIP terminal access device determines to locally send and use the internet IP according to the received 100trying message, modifies the contact field to the internet IP and the signaling port of the signaling gateway, strips the IP information of the SIP terminal access device and the signaling gateway itself in the routing information, and sends the 100trying message to the SIP terminal 1 according to the remaining routing information.
Step 906, the enterprise egress router receives the 100trying message of the SIP terminal access device at 201.101.100.3.
The voice service in the SIP terminal access device applies for the local media information according to the recorded real source IP information of the contact address of the SIP terminal 1 (the source IP and the port of the INVITE message of the SIP terminal 1 received by the SIP terminal access device). The SIP terminal access device local media IP should select an IP interworking with the source IP of the INVITE message of the SIP terminal 1. After the local media information is applied, the voice service informs the media gateway to establish the media channel through the internal signaling channel, when the media channel is established, the far-end media IP of the SIP terminal 1 recorded by the media gateway is the source IP of the INVITE message of the SIP terminal 1, and the far-end media port is the media port of the SIP terminal 1 recorded by the m-line in the SDP information of the INVITE message of the SIP terminal 1.
Step 907, after the media channel is established, the voice service sends 183 message with SDP information to the SIP terminal access device signaling gateway, fills in the SIP message route field content in 183 message, and indicates the message transmission route. The c-line carried by the SDP information is a media gateway Internet Protocol (IP) in the SIP terminal access equipment, and the m-line is a media port of the media gateway in the SIP terminal access equipment.
And 908, the signaling gateway in the SIP terminal access equipment determines to locally send the used Internet IP according to the received 183 message, modifies the contact field into the Internet IP and the signaling port of the signaling gateway, strips the IP information in the SIP terminal access equipment and the signaling gateway in the routing information, does not modify the SDP media information, and sends the message to the enterprise router according to the rest routing information.
In step 909, the enterprise egress router receives the 183 message from the SIP terminal access device at 201.101.100.3.
Step 910, after the called SIP terminal 2 answers, the voice service in the SIP terminal access device sends a 200 OK message to the signaling gateway, carries the local media information, fills in the SIP message route field content in the 200 OK message, and indicates the message transmission route.
And 911, the signaling gateway in the SIP terminal access equipment determines to locally send and use the Internet IP according to the received 200 OK message, modifies the contact field into the Internet IP and the signaling port of the signaling gateway, strips the IP information of the inside of the SIP terminal access equipment and the signaling gateway in the routing information, does not modify the SDP media information, and sends the message to the router according to the rest routing information.
Step 912, the enterprise egress router receives the 200 OK message of the SIP terminal access device at 201.101.100.3.
In step 913, after receiving the 200 OK message, the SIP terminal 1 sends an ACK message, and the router forwards the message to the SIP terminal access device, so that the call is established successfully.
As shown in fig. 10, a signaling flow diagram for a SIP terminal as a called call is shown.
The SIP terminal 2 has completed the registration procedure to the SIP terminal access device and during the registration process the enterprise egress router has established a NAT mapping of the IP and port 192.168.1.9 of SIP terminal 2 and 5060 to the IP and port 202.101.100.3 of the enterprise egress router internet interface.
Step 1001, the voice service in the SIP terminal access device translates the number according to the called number carried by the INVITE message of the SIP terminal 1, finds that the called user is the SIP terminal 2 registered on the internet, retrieves the communication address (IP and port of SIP signaling of the SIP terminal 2 mapped by the internet interface of the enterprise egress router) and the contact address (IP and port of the SIP terminal 2) acquired when the SIP terminal 2 is registered, fills the request header field of the SIP message in the INVITE message according to the contact address, fills the route field content of the SIP message in the INVITE message according to the communication address, and the route3 field content is the IP and port information of the enterprise egress router. The SIP terminal access device local media IP should select the internet IP interworking with the SIP terminal 2 communication address IP. After the local media resource is applied, the voice service sends an INVITE message carrying the SDP information to the signaling gateway. The SDP information is related information of local media resources of the SIP terminal access equipment, c-line carried by the SDP information is a media gateway Internet Protocol (IP) in the SIP terminal access equipment, and m-line is a media port of a media gateway in the SIP terminal access equipment.
And step 1002, the signaling gateway in the SIP terminal access equipment determines to locally send and use the Internet IP according to the received INVITE message, modifies the contact field into the Internet IP and the signaling port of the signaling gateway, strips off the IP information in the SIP terminal access equipment and the signaling gateway in the routing information, does not modify the SDP media information, and sends the message to an enterprise outlet router according to the rest routing information.
Step 1003, the enterprise egress router receives the INVITE message of the SIP terminal access device at 201.101.100.3.
Step 1004, the SIP terminal 2 in the intranet receives the INVITE message, and sends 100trying and 180 messages to the router.
Step 1005, the router forwards the message to the SIP terminal access device.
In step 1006, the SIP terminating access device signaling gateway module forwards the message to the SIP access device voice service.
Step 1007, after called SIP terminal 2 goes off hook and answers, it sends 200 OK message carrying SDP media message to the router. Wherein, the c-line carried by the SDP information is the local IP of the SIP terminal 2, and the m-line is the media port of the SIP terminal 2.
Step 1008, the router forwards the 200 OK message of the SIP terminal 2 to the SIP terminal access device, and the media information carried by the SDP information is not modified.
Step 1009, after the signaling gateway adds rec-route field according to the rule in the SIP terminal access device, the media information carried by the SDP information is not modified, and the 200 OK message is sent to the voice service of the SIP terminal access device through the internal signaling channel.
The SIP terminal access equipment voice service receives the 200 OK message, compares the rec-route3 header with the IP of SDP media information and calls the media resources applied before called, takes the rec-route3 IP (which is consistent with the communication address IP recorded when the SIP terminal 2 is registered) as the media channel IP of the SIP terminal 2, and the media port carried by the SDP is the media port of the SIP terminal 2, and informs the media gateway to establish the media channel through the internal signaling channel.
And step 1010, the SIP terminal access device voice service fills the content of a SIP message route field in the ACK message according to the recorded IP and port information of the communication address of the SIP terminal 2, indicates a message transmission route and sends the ACK message to a signaling gateway.
In step 1011, the signaling gateway in the SIP terminal access device strips the IP information of the inside of the SIP terminal access device and the signaling gateway itself in the route according to the received ACK message, and sends the message to the router according to the remaining route information.
Step 1012, the router forwards the received SIP message to SIP terminal 2, and after SIP terminal 2 receives the ACK message, the call setup is successful.
As shown in fig. 11, the call media processing flow of the SIP terminal is as follows:
in step 1101, the terminal 1 transmits a media packet.
After the call is connected, the calling SIP terminal 1in the intranet sends a media packet according to the received far-end SDP information, where the source IP and Port are local media information, and the destination IP and Port are media information reserved for the SIP terminal 1 by the SIP terminal access device media gateway.
Step 1102, the router forwards the media packet of terminal 1.
After receiving the media packet, the router sends the media packet to the SIP terminal access device according to the destination IP, and maps the IP and Port of the SIP terminal 1 into the IP and Port of the router Internet interface.
Step 1103, the sip terminal access device forwards the media packet of terminal 1.
After receiving the media packet of the calling SIP terminal 1, the media gateway of the SIP terminal access device determines whether the locally stored remote port is the same as the source port of the received packet, and if not, updates the locally stored remote port information.
And step 1104, the router forwards the media packet of the SIP terminal access device.
The SIP terminal access equipment media gateway forwards the media packet to a local media port of a called side, and sends the packet to the called terminal through the router.
In step 1105, the terminal 2 sends a media packet.
After the call of the calling SIP terminal 2 in the enterprise intranet is connected, a media packet is sent according to the received far-end SDP information, the source IP and the Port are local media information, and the destination IP and the Port are media information reserved for the SIP terminal 2 by a media gateway of the SIP terminal access equipment.
Step 1106, the router forwards the media packet of terminal 2.
After receiving the media packet, the router sends the media packet to the SIP terminal access device according to the destination IP, and maps the IP and Port of the SIP terminal 2 to the IP and Port of the Internet interface of the router.
In step 1107, the sip terminal access device forwards the media packet of terminal 2.
After receiving the media packet of the calling SIP terminal 2, the media gateway of the SIP terminal access device determines whether the locally stored far-end port is the same as the source port of the received packet, and if not, updates the locally stored far-end port information.
Step 1108, the router forwards the media packet of the SIP terminal access device.
The SIP terminal access equipment media gateway forwards the media packet to a local media port of a called side, and sends the packet to the called terminal through the router.
Therefore, the calling and called call media are intercommunicated, and the voice is normal.
The part acquires the real source IP and the port of the received SIP terminal message and compares the real source IP and the port with the contact field in the SIP message, thereby confirming whether the SIP terminal is positioned behind the NAT equipment. If the two address information are different, the SIP terminal is located behind the NAT device, the SIP terminal access device in this part needs to record the source address and the port of the received SIP terminal message as the contact address information of the SIP terminal, and the contact field in the SIP terminal message is only used as the requset header in the message. If the two address information are the same, then there is no NAT device between the SIP terminal and the SIP terminal access device, and the processing is performed according to the standard SIP conversation flow.
When the SIP terminal establishes a session with the SIP terminal after the NAT device is confirmed, firstly, the contact address information (the real source IP and the port of the message of the SIP terminal) of the SIP terminal is used for applying for the media resource of a local corresponding network plane, a media channel for interacting the media message with the SIP terminal is established, after the media message of the SIP terminal is received, the source port of the media message is used for updating the far-end SIP terminal media port information of the media channel on the SIP access device, so that the media message sent to the SIP terminal by the SIP access device can be correctly sent to the IP and the port of the corresponding interface of the NAT device, and the media message is correctly forwarded to the SIP terminal according to NAT mapping.
By the method, the problem that the SIP message and the media message sent to the SIP terminal cannot be sent according to the SIP terminal address information (the intranet address of the SIP terminal) acquired by the SIP terminal access equipment according to the SIP session flow after the SIP terminal is positioned behind the NAT is solved.
As shown in fig. 12, based on the same inventive concept of the session connection method, the present invention further provides a session connection apparatus, including:
a receiving unit 1201, configured to receive a call request initiated by a first terminal, where the call request is used to request a session with a second terminal;
a processing unit 1202, configured to modify a contact address of a target terminal into a communication address of the target terminal when the target terminal is located in the first terminal and the second terminal, where the target terminal is a terminal with a different contact address and a different communication address, the contact address is an IP address in a local area network, and the communication address is an IP address in the internet;
a connection unit 1203, configured to establish an SIP connection according to the contact address of the first terminal and the contact address of the second terminal.
In a possible implementation manner, in the apparatus provided in the embodiment of the present invention, the connection unit 1203 is specifically configured to:
sending verification information to the first terminal according to the contact address of the first terminal, and sending verification information to the second terminal according to the contact address of the second terminal;
and after confirming that the feedback information of the first terminal and the verification success information of the second terminal are received, establishing SIP connection.
In a possible implementation manner, in the apparatus provided in this embodiment of the present invention, after the SIP connection is established, the connecting unit 1203 is further configured to:
and sending the media data packet sent by the second terminal to the first terminal according to the stored contact address of the first terminal, wherein the media data comprises audio data and/or video data.
In a possible implementation manner, in an apparatus provided in an embodiment of the present invention, the apparatus further includes:
a correcting unit 1204, configured to determine an address of a first media data packet according to a media data packet of a first terminal, and determine an address of a second media data packet according to a media data packet sent by a second terminal;
if the address of the first media data packet is different from the contact address of the first terminal, updating the contact address of the first terminal; and/or
And if the address of the second media data packet is different from the contact address of the second terminal, updating the contact address of the second terminal.
In addition, the session connection method and apparatus described in conjunction with fig. 1-12 according to the embodiment of the present invention may be implemented by an electronic device. Fig. 13 is a schematic diagram illustrating a hardware structure of an electronic device according to an embodiment of the present invention.
The electronic device may include a processor 1301 and a memory 1302 storing computer program instructions.
In particular, the processor 1301 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more Integrated circuits to implement embodiments of the present invention.
Memory 1302 may include mass storage for data or instructions. By way of example, and not limitation, memory 1302 may include a Hard Disk Drive (HDD), a floppy Disk Drive, flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 1302 may include removable or non-removable (or fixed) media, where appropriate. Memory 1302 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 1302 is non-volatile solid-state memory. In a particular embodiment, memory 1302 includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
The processor 1301 realizes any one of the session connection methods in the above embodiments by reading and executing computer program instructions stored in the memory 1302.
In one example, the electronic device may also include a communication interface 1303 and a bus 1310. As shown in fig. 13, the processor 1301, the memory 1302, and the communication interface 1303 are connected to each other via a bus 1310 to complete communication therebetween.
The communication interface 1303 is mainly used to implement communication between modules, apparatuses, units and/or devices in the embodiment of the present invention.
The bus 1310 includes hardware, software, or both to couple the components of the electronic device to one another. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 1010 may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
The electronic device may execute the session connection method in the embodiment of the present invention based on the received packet, thereby implementing the session connection method, apparatus, and system described in conjunction with fig. 1 to 12.
In addition, in combination with the electronic device in the above embodiments, the embodiments of the present invention may be implemented by providing a computer-readable storage medium. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the session connection methods in the above embodiments.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (3)

1. A conversation connecting method is characterized in that the method is applied to a conversation initialization protocol SIP terminal access device, and the SIP terminal access device comprises a signaling gateway and a voice service; the first terminal in the internet and the second terminal in the bearer network establish the SIP connection through the SIP terminal access device, including:
receiving a call request initiated by a first terminal, wherein the call request is used for requesting a session with a second terminal; the source IP and the port carried by the call request are the IP and the signaling port of the first terminal; the target IP and the port are the Internet IP and the signaling port of the SIP terminal access equipment; the SDP information carries media information of the first terminal, wherein: c-line is the IP of the first terminal, and m-line is the media port of the first terminal;
the signaling gateway acquires an IP and a port in the SIP message routing process, carries the IP and the port in a call request, and sends the call request to a voice service from an internal signaling channel; the voice service acquires an IP and a signaling port corresponding to a first terminal carried by the call message and media information of the first terminal carried by SDP information;
the voice service determines that a second terminal is positioned in a bearing network, a request header field is filled according to a contact address of the second terminal, and a route header field is filled in a source IP and a port; determining the local media IP of the SIP access equipment as a bearer network IP communicated with the source IP of the second terminal;
the voice service sends a call message carrying SDP information to a signaling gateway, wherein the SDP information is information of local media resources of SIP terminal access equipment, c-line carried by the SDP information is a media gateway bearing network IP in the SIP terminal access equipment, and m-line is a media port of the media gateway in the SIP terminal access equipment;
the signaling gateway determines to locally send and use a bearer network IP according to the received call message, modifies an SIP message contact field of the call message into the bearer network IP and a signaling port of the signaling gateway, strips IP information of the inside of an SIP terminal access device and the signaling gateway in routing information, and sends the call message to a second terminal;
the signaling gateway forwards the 180 messages received from the second terminal to the voice service;
the voice service applies for local media resources corresponding to the first terminal at the SIP terminal access device according to the acquired source IP and media information of the first terminal, and determines that the local media IP of the SIP access device selects the IP communicated with the source IP of the first terminal; informing a media gateway to establish a media channel through an internal signaling channel, wherein a far-end media IP of the first terminal recorded by the media gateway is a source IP of the first terminal, and a far-end media port is a media port of the first terminal recorded by m-line in SDP information of a calling message of the first terminal;
the voice service sends 183 messages with SDP information to a signaling gateway, wherein c-line carried by the SDP information is a media gateway Internet Protocol (IP) in SIP terminal access equipment, and m-line is a media port of the media gateway in the SIP terminal access equipment;
the signaling gateway determines that the local transmission uses the Internet IP according to the received 183 message, modifies a contact field in the 183 message to be the Internet IP and a signaling port of the signaling gateway, strips the IP information of the interior of the SIP terminal access equipment and the signaling gateway in the routing information, and sends the 183 message to the first terminal;
the signaling gateway receives a 200 OK message which is sent by a second terminal and carries SDP information, wherein c-line carried by the SDP information is a source IP of the second terminal, and m-line is a media port of the second terminal, and the 200 OK message is sent to a voice service from an internal signaling channel;
and the voice service receives the 200 OK message and informs the media gateway to establish a media channel through an internal signaling channel, wherein the far-end media IP of the second terminal recorded by the media gateway is the source IP of the second terminal, and the far-end media port is the media port of the second terminal.
2. An electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of claim 1.
3. A computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method of claim 1.
CN201911418920.4A 2019-12-31 2019-12-31 Session connection method, device and medium Active CN111131315B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911418920.4A CN111131315B (en) 2019-12-31 2019-12-31 Session connection method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911418920.4A CN111131315B (en) 2019-12-31 2019-12-31 Session connection method, device and medium

Publications (2)

Publication Number Publication Date
CN111131315A CN111131315A (en) 2020-05-08
CN111131315B true CN111131315B (en) 2023-04-07

Family

ID=70507113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911418920.4A Active CN111131315B (en) 2019-12-31 2019-12-31 Session connection method, device and medium

Country Status (1)

Country Link
CN (1) CN111131315B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115414666B (en) * 2022-11-03 2023-03-03 深圳市人马互动科技有限公司 Voice data processing method and related device based on idiom dragon-joining game

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101273594A (en) * 2005-05-31 2008-09-24 罗姆韦尔有限公司 Method and system for call-setup triggered push content
CN101330645A (en) * 2007-07-31 2008-12-24 中兴通讯股份有限公司 Method for establishing conversation in an IP multimedia subsystem
CN103079017A (en) * 2013-01-31 2013-05-01 施狄峰 System and method for realizing formation of same virtual network short number intercommunication among different telecom operator users

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030009561A1 (en) * 2001-06-14 2003-01-09 Sollee Patrick N. Providing telephony services to terminals behind a firewall and /or network address translator
EP1964353B1 (en) * 2005-12-19 2017-08-02 Telefonaktiebolaget LM Ericsson (publ) Method for establishing a unicast media session
CN101155185A (en) * 2006-09-26 2008-04-02 卡乐西堤企业股份有限公司 Interactive NAT traversing method of SIP communication protocol
US8204065B2 (en) * 2006-09-29 2012-06-19 Avaya Ecs Ltd. Network address translation in session initiation protocol based application
CN101257435B (en) * 2007-02-28 2011-08-17 上海亿人通信终端有限公司 Implementing method of SIP application-level gateways based on NAT-PT
CN101056271A (en) * 2007-06-06 2007-10-17 杭州华三通信技术有限公司 Method for penetrating the NAT and corresponding communication terminal and NAT device
CN101552848B (en) * 2009-05-20 2012-02-01 杭州华三通信技术有限公司 Session method and apparatus based on session initiation protocol
CN102255980B (en) * 2010-05-20 2015-07-22 中兴通讯股份有限公司 Method and apparatus for managing calling information of session initiation protocol
CN101902506A (en) * 2010-06-21 2010-12-01 中兴通讯股份有限公司 SIP call-based traversal network address translation method and system
CN102664901A (en) * 2012-05-15 2012-09-12 苏州工业园区云视信息技术有限公司 Method for adaptive traversal through network address translator (NAT) in session initiation protocol (SIP) call
US9819745B2 (en) * 2015-07-09 2017-11-14 Extreme Networks, Inc. System and method for prevention of denial of service attacks for hosted network address translator
CN105657745B (en) * 2015-12-31 2019-06-28 西安抱朴通信科技有限公司 A kind of methods, devices and systems for realizing data service

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101273594A (en) * 2005-05-31 2008-09-24 罗姆韦尔有限公司 Method and system for call-setup triggered push content
CN101330645A (en) * 2007-07-31 2008-12-24 中兴通讯股份有限公司 Method for establishing conversation in an IP multimedia subsystem
CN103079017A (en) * 2013-01-31 2013-05-01 施狄峰 System and method for realizing formation of same virtual network short number intercommunication among different telecom operator users

Also Published As

Publication number Publication date
CN111131315A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN104040998B (en) NAT traversal based on ICE
US7257837B2 (en) Firewall penetration system and method for real time media communications
US9077566B2 (en) Caller ID callback authenticationi for voice over internet protocol (“VoIP”) deployments
US8170590B2 (en) Method, system and apparatus for forking transmission of short message service
EP3082318B1 (en) Communication method and device for preventing media stream circuity (tromboning)
US7697471B2 (en) Address translation in a communication system
US9497108B2 (en) Media sessions
US20060193323A1 (en) Apparatus and method for providing session initiation protocol (SIP) service in private network
CN110650260B (en) System and method for intercommunication of network terminal audio internal and external networks
US11388202B2 (en) Network entity selection
CN102025718A (en) Sip endpoint enhancer
CN111131315B (en) Session connection method, device and medium
CN104320403A (en) Communication method and device
US20080212594A1 (en) Optimized Interworking Between Different Communication Protocols
KR101506307B1 (en) Method and system for controlling quality of service to private network terminal in IMS network environment
US20090113030A1 (en) IP endpoint automated activation
CN110351159B (en) Cross-intranet network performance testing method and device
US8812694B2 (en) Dialog establishment over a peer-to-peer architecture
KR100726185B1 (en) System, gateway server and stun server for internetwork communication between networks using various internet protocol address, and method thereof
JP2023540063A (en) Methods, systems and computer-readable media for routing packets for lawful interception
KR20090085616A (en) Method and application server for routing combinational services to a single endpoint
US10681090B2 (en) Method for telecommunication and communication terminal
EP2608488B1 (en) Dialog establishment over a peer-to-peer architecture
US7747672B1 (en) Method and apparatus using lightweight RRQ for efficient recovery of a call signaling channel in gatekeeper-routed call signaling
CN118118464A (en) Communication method, apparatus, device, storage medium, and program product

Legal Events

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