WO2014107894A1 - 穿越防火墙的方法、客户端和媒体穿越服务器 - Google Patents

穿越防火墙的方法、客户端和媒体穿越服务器 Download PDF

Info

Publication number
WO2014107894A1
WO2014107894A1 PCT/CN2013/070395 CN2013070395W WO2014107894A1 WO 2014107894 A1 WO2014107894 A1 WO 2014107894A1 CN 2013070395 W CN2013070395 W CN 2013070395W WO 2014107894 A1 WO2014107894 A1 WO 2014107894A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
address
mts
public
port
Prior art date
Application number
PCT/CN2013/070395
Other languages
English (en)
French (fr)
Inventor
张旭武
孟斌
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2013/070395 priority Critical patent/WO2014107894A1/zh
Priority to CN201380000069.8A priority patent/CN103392316B/zh
Publication of WO2014107894A1 publication Critical patent/WO2014107894A1/zh

Links

Classifications

    • 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/2592Translation of Internet protocol [IP] addresses using tunnelling or encapsulation
    • 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/2514Translation of Internet protocol [IP] addresses between local and global IP addresses
    • 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
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/029Firewall traversal, e.g. tunnelling or, creating pinholes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/10Architectures or entities
    • H04L65/1045Proxies, e.g. for session initiation protocol [SIP]
    • 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]

Definitions

  • Embodiments of the present invention relate to the field of communications, and more particularly, to a method of traversing a firewall, a client, a SIP server, and a media traversal server. Background technique
  • the Internet Protocol Multimedia Subsystem is the cornerstone of the convergence of mobile networks and fixed networks, and is widely used in various network environments.
  • the IMS uses the Session Initiation Protocol (SIP) as the session signaling protocol.
  • SIP Session Initiation Protocol
  • RTP Real-Time Transport Protocol
  • RTCP Real-time Transport Control Protocol
  • MSRP message session relay protocol
  • a firewall is generally deployed between the enterprise network or the local area network and the public network to ensure the security of the internal network.
  • the firewall only allows a small number of ports to be opened, or the HTTP proxy mode is used to allow only the Hypertext Transfer Protocol (HTTP) packets to pass through, causing RTP/RTCP packets to pass through the firewall.
  • HTTP Hypertext Transfer Protocol
  • the client in the network cannot communicate with the IMS network, that is, there is a firewall traversal problem between the client and the IMS network in the intranet.
  • firewall traversal problems include: Network Address Translation (NAT) problems and restrictive firewall traversal problems.
  • NAT Network Address Translation
  • the client on the LAN uses the private IP address and port, and cannot directly communicate with the IMS network on the public network. Instead, the firewall provides the NAT function, assigns a public address to the client, and then publicizes the public address. The address can be bound to the private address of the client before it can communicate with the public network.
  • 3GPP Third Generation Partnership Project
  • ICE Interactive Connectivity Establishment
  • ICE scheme includes STUN (Simple Traversal of UDP through NAT), TURN (Troveral Using Relay) Network Address Translation, traversing NAT through Relay and ICE and other protocols, the core idea is to establish the binding relationship between the client's private address and the public address, and use the client's public address to communicate with the IMS network.
  • STUN Simple Traversal of UDP through NAT
  • TURN Troveral Using Relay
  • Network Address Translation traversing NAT through Relay
  • ICE and other protocols the core idea is to establish the binding relationship between the client's private address and the public address, and use the client's public address to communicate with the IMS network.
  • the firewall may not only limit the firewall ports that are allowed to pass, but may also limit the types of packets allowed to pass through the firewall.
  • ICE over TLS Transport Layer Security
  • the scheme optimizes the TURN-based ICE solution.
  • the UE and the TURN server negotiate to establish multiple TLS tunnels. Different media packets are traversed through different TLS tunnels.
  • the handshake negotiation process of establishing a TLS connection between the UE and the TURN is very complicated, which causes the call process to take a long time.
  • different TLS tunnels encapsulate different media streams, multiple calls need to be established between the UE and the TURN server.
  • the UE For a TLS tunnel, for example, to transmit VoIP services, the UE needs to establish at least a TLS tunnel carrying TURN control information, a TLS tunnel for transmitting RTP data, and a TLS tunnel for transmitting RTCP data with the TRUN server, which further increases the time consuming of the call process. Poor user experience. Summary of the invention
  • the embodiment of the invention provides a method for traversing a firewall, a client, a SIP server, and a media traversing server, which reduces the time consuming of the calling process and improves the user experience.
  • a method for traversing a firewall including: determining an address of a client in a local area network; transmitting, to the session initiation protocol SIP server, information including an address of the client; receiving an address according to the client and an address of the MTS Establishing a tunnel between the client and the MTS for transmitting SIP media data, where the tunnel traverses a firewall of a local area network,
  • SIP media data includes real-time transport protocol RTP data and real-time transport control protocol RTCP data.
  • the determining, by the client, an address of the client in the local area network includes: determining an address of the client, where the address of the client includes a public internet protocol IP address of the client and a publicity of the client port.
  • the receiving, by the SIP server, the information that includes the address of the MTS on the network side includes: receiving the information that includes the MTS Information of the address, the address of the MTS including the publicity of the MTS
  • An IP address and a public port of the MTS then, according to the address of the client and the An address of the MTS, establishing a tunnel between the client and the MTS for transmitting SIP media data, including: according to the public IP address of the client, the public port of the client, and the public IP address of the MTS And the public port of the MTS, the tunnel is established.
  • the method before the determining the address of the client, the method further includes: determining whether the firewall needs to perform network address translation NAT; When determining that the firewall needs to perform NAT, the determining the address of the client includes: obtaining a private IP address of the client, and allocating a private port of the client; according to the private IP address of the client and the client The private port of the end queries the public IP address of the client and the public port of the client.
  • the querying the public IP address of the client according to the private IP address of the client and the private port of the client, and the The public port of the client includes: obtaining a public IP address of the MTS; establishing a transmission control protocol TCP connection with the specific port of the MTS according to the private port of the client and the public IP address of the MTS, where the specific port is The port number is the same as the port number of the port through which the firewall is allowed to pass; the address of the client is queried through the TCP connection.
  • the acquiring the public IP address of the MTS includes: sending, to the SIP server, a public IP address for requesting the MTS The request message is received by the SIP server, and the request response message carries the public IP address of the MTS.
  • determining the address of the client includes: acquiring a public IP of the client An address; a specific port that the firewall is allowed to pass; a specific port that the firewall allows to pass as a public port of the client.
  • the method further includes: determining a transport protocol supported by the firewall, where the transport protocol includes at least one of TCP and a user data packet protocol UDP Transmitting, to the SIP server, information indicating the transmission protocol; when transmitting data to the MTS through the tunnel, encapsulating the data by using the transmission protocol; when receiving the MTS When the data transmitted by the tunnel is described, the data is decapsulated by using the transmission protocol.
  • a method for traversing a firewall including: receiving a client including a local area network The information of the address of the terminal; the public port of the media traversing server MTS; the information of the address including the MTS is sent to the client, the MTS address includes the public port of the MTS and the public IP address of the acquired MTS, and The MTS sends information including the address of the client and the public port of the MTS, so that a tunnel for transmitting session initiation protocol SIP media data is established between the client and the MTS, and the tunnel traverses the guest
  • the firewall of the local area network, the SIP media data includes real-time transport protocol RTP data and real-time transport control protocol RTCP data.
  • the receiving the information that includes the address of the client in the local area network includes: receiving the information that includes the address of the client, where the address of the client includes the client The public internet protocol IP address of the end and the public port of the client.
  • the assigning the public port of the MTS includes: using a port number of a port that the firewall allows to pass as a public port of the MTS The port number.
  • the method before the receiving the address of the client in the local area network, the method further includes: receiving, by the client, the request for the MTS The request message of the public IP address is sent to the client, and the request response message carries the public IP address of the MTS.
  • the method further includes: receiving, by the client, information for indicating a transmission protocol supported by the firewall, where the transmission protocol includes At least one of TCP and User Datagram Protocol UDP; transmitting information indicating the transmission protocol to the MTS.
  • the method further includes: sending, to the MTS, information including an address of the media gateway and an address of the client.
  • a method for traversing a firewall including: receiving a session initiation protocol
  • the SIP server including the address of the client in the local area network and the public port of the MTS; establishing, based on the address of the client and the address of the MTS, the SIP media data for transmitting the SIP media data between the client and the client
  • the tunnel passes through a firewall in the local area network, and the SIP media data includes real-time transport protocol RTP data and real-time transport control protocol RTCP data.
  • the receiving SIP server sends The information about the address of the client in the local area network and the public port of the MTS includes: receiving the information including the address of the client and the public port of the MTS, where the address of the client includes the public IP address of the client and The public port of the client; the establishing, according to the address of the client and the address of the MTS, the tunnel for transmitting SIP media data between the MTS and the client includes: according to the client The tunnel is established by the public IP address of the terminal, the public port of the client, and the address of the MTS, where the address of the MTS includes the public IP address of the MTS and the public port of the MTS.
  • the method before the receiving, by the SIP server, the address of the client in the local area network and the information of the public port of the MTS, the method further includes: The client establishes a transmission control protocol TCP connection, so that the client queries the public IP address of the client and the public port of the client according to the TCP connection.
  • the method further includes: receiving, by the SIP server, information for indicating a transmission protocol supported by the firewall, where the transmission protocol includes At least one of TCP and user data packet protocol UDP; when transmitting data to the client through the tunnel, encapsulating the data by using the transport protocol; when receiving the client, sending through the tunnel The data is decapsulated using the transport protocol.
  • the information of the address is addressed.
  • a client including: a determining unit, configured to determine an address of a client in a local area network; a sending unit, configured to send, to the session initiation protocol SIP server, information including an address of the client; Receiving, by the SIP server, information including an address of a media traversing server MTS on the network side; and establishing, by the establishing unit, establishing, between the client and the MTS, according to an address of the client and an address of the MTS
  • a tunnel for transmitting SIP media data, the tunnel traversing a firewall in a local area network, and the SIP media data includes real-time transport protocol RTP data and real-time transport control protocol RTCP data.
  • the determining unit is specifically configured to determine an address of the client, where the address of the client includes a public internet protocol IP address of the client, and the client Public port.
  • the receiving unit is specifically configured to receive the information that includes the address of the MTS, where an address of the MTS includes the MTS a public IP address and a public port of the MTS; the establishing unit is specifically configured to establish, according to the public IP address of the client, a public port of the client, a public IP address of the MTS, and a public port of the MTS The tunnel.
  • the method further includes: a determining unit, configured to determine whether the firewall needs to perform network address translation NAT; When the firewall needs to perform NAT, the determining unit is specifically configured to acquire a private IP address of the client, and allocate a private port of the client; and query the client according to the private IP address of the client and the private port of the client.
  • the public IP address of the end and the public port of the client is specifically configured to acquire a private IP address of the client, and allocate a private port of the client.
  • the determining unit is specifically configured to acquire a public IP address of the MTS, according to the private port of the client, and the MTS a public IP address, a transmission control protocol TCP connection is established with the specific port of the MTS, the port number of the specific port is the same as the port number of the port allowed by the firewall; and the address of the client is queried through the TCP connection.
  • the determining unit is specifically configured to send, to the SIP server, a request message for requesting a public IP address of the MTS; a request response message sent by the SIP server, where the request response message carries a public IP address of the MTS.
  • the determining unit when determining that the firewall does not need to perform NAT, is specifically configured to acquire a public IP address of the client; The specific port that the firewall allows to pass; the specific port that the firewall allows to pass as the public port of the client.
  • the determining unit is further configured to determine a transport protocol supported by the firewall, where the transport protocol includes a TCP and a user data packet protocol UDP. At least one of the sending unit, the sending unit is further configured to send information for indicating the transmission protocol to the SIP server, where the client further includes: an encapsulating unit, configured to: when the tunnel passes through the tunnel to the MTS When the data is sent, the data is encapsulated by using the transport protocol; and the decapsulating unit is configured to decapsulate the data by using the transport protocol when receiving the data sent by the MTS through the tunnel.
  • the fifth aspect provides a session initiation protocol SIP server, including: a receiving unit, configured to receive information including an address of a client in a local area network; an allocating unit, configured to allocate a public port of the media traversing server MTS; and a sending unit, configured to Transmitting, by the client, information including an address of the MTS, where the MTS address includes a public port of the MTS and a public IP address of the obtained MTS, and sending an address including the client and the MTS to the MTS Information of the public port, so that a tunnel for transmitting session initiation protocol SIP media data is established between the client and the MTS, and the tunnel traverses a firewall of a local area network between the client and the MTS.
  • the SIP media data includes real-time transport protocol RTP data and real-time transport control protocol RTCP data.
  • the receiving unit is specifically configured to receive the information that includes the address of the client, where the address of the client includes a public internet protocol IP address of the client And the public port of the client; the sending the address of the MTS to the client includes: sending an address of the MTS to the client, where the address of the MTS includes a public IP address and a location of the MTS The public port of the MTS.
  • the allocating unit is specifically configured to use a port number of a port that the firewall allows to pass as a port number of the public port of the MTS. .
  • the receiving unit is further configured to receive a request message that is sent by the client to request a public IP address of the MTS; And sending a request response message to the client, where the request response message carries a public IP address of the MTS.
  • the receiving unit is further configured to receive, by the client, information for indicating a transmission protocol supported by the firewall, where The transport protocol includes at least one of TCP and a user data packet protocol UDP; the sending unit is further configured to send information for indicating the transport protocol to the MTS.
  • the sending unit is further configured to send, to the MTS, information including an address of the media gateway and an address of the client.
  • a traversal tunnel server MTS including: a receiving unit, configured to receive, by a SIP server sent by a session initiation protocol, a message that includes an address of a client in a local area network and a public port of the MTS; and an establishing unit, configured to be used according to the client End address and the MTS Address, establishing a tunnel between the MTS and the client for transmitting SIP media data, the tunnel traversing a firewall of a local area network, and the SIP media data includes real-time transport protocol RTP data and real-time transport control protocol RTCP data.
  • the receiving unit is specifically configured to receive the information that includes the address of the client and a public port of the MTS, where the address of the client includes the The public IP address of the client and the public port of the client; the establishing unit is specifically configured to establish the tunnel according to the public IP address of the client, the public port of the client, and the address of the MTS.
  • the address of the MTS includes a public IP address of the MTS and a public port of the MTS.
  • the establishing unit is further configured to establish a transmission control protocol TCP connection with the client, so that the client is configured according to the TCP The connection queries the public IP address of the client and the public port of the client.
  • the receiving unit is further configured to receive, by the SIP server, information for indicating a transmission protocol supported by the firewall, where The transport protocol includes at least one of TCP and a user data packet protocol UDP;
  • the MTS further includes: an encapsulating unit, configured to: when transmitting data to the client through the tunnel, use the transport protocol to The data is encapsulated; and the decapsulation unit is configured to decapsulate the data by using the transmission protocol when receiving the data sent by the client through the tunnel.
  • the information of the address of the client end.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • FIG. 1 is a system architecture diagram of a firewall traversing a firewall according to an embodiment of the present invention.
  • FIG. 2 is a flow chart of a method of traversing a firewall in accordance with an embodiment of the present invention.
  • FIG. 3 is a flow chart of a method of traversing a firewall in accordance with another embodiment of the present invention.
  • FIG. 4 is a flow chart of a method of traversing a firewall in accordance with another embodiment of the present invention.
  • FIG. 5 is a flow chart of a method of traversing a firewall in accordance with another embodiment of the present invention.
  • FIG. 6 is a flow chart of a method of traversing a firewall in accordance with another embodiment of the present invention.
  • FIG. 7 is a flow chart of a method of traversing a firewall in accordance with another embodiment of the present invention.
  • FIG. 8 is a flow chart of a method of traversing a tunnel in accordance with another embodiment of the present invention.
  • FIG. 9 is a flow chart of a method of traversing a tunnel in accordance with another embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a package manner of a tunnel according to an embodiment of the present invention.
  • Figure 11 is a block diagram of a client of one embodiment of the present invention.
  • FIG. 12 is a block diagram of a SIP server in accordance with one embodiment of the present invention.
  • FIG. 13 is a block diagram of an MTS in accordance with one embodiment of the present invention.
  • Figure 14 is a block diagram of a client in accordance with another embodiment of the present invention.
  • FIG. 15 is a block diagram of a SIP server in accordance with another embodiment of the present invention.
  • FIG 16 is a block diagram of an MTS in accordance with another embodiment of the present invention. detailed description
  • GSM Global System of Mobile communication
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • GPRS General Packet Radio Service
  • LTE Long Term Evolution
  • LTE-A Advanced Long Term Evolution
  • UMTS Universal Mobile Telecommunication System
  • the client may be an entity located in a local area network, for example. If it can be a UE, it can also be a logical unit in the UE. .
  • the restrictive firewall mentioned in this patent application may mean that the port of the firewall is limited or the type of the packet is limited.
  • the firewall only opens a small number of ports such as 80 or 443;
  • the type of the packets passed is limited. For example, only the TCP packets are allowed to pass through, or only the UDP packets are allowed to pass through.
  • the firewall mentioned in this patent application requires NAT, that is, the NAT traversal problem exists in the firewall.
  • the client in the LAN uses a private IP address and cannot directly communicate with the public network.
  • the firewall provides the NAT function, assigns a public IP address to the UE, and then binds the private IP address of the client to the public IP address to communicate with the public network.
  • FIG. 1 is a system architecture diagram of a firewall traversing a firewall according to an embodiment of the present invention.
  • the client is located in the local area network
  • the MTS is located on the network side
  • the MTS can be integrated into the media gateway or an independent entity.
  • a SIP server is used to establish a tunnel for transmitting SIP media data between the client and the MTS, and the RTP data and the RTCP data can be transmitted through the tunnel.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • an embodiment of the present invention provides a method for traversing a firewall, which may be performed by a client in a local area network, for example, may be a UE.
  • the method includes:
  • S202 sending, to the session initiation protocol, the SIP server, the information including the address of the client;
  • S203 receiving, by the SIP server, information including an address of the media traversing server MTS on the network side;
  • S204 Establish a tunnel for transmitting SIP media data between the client and the MTS according to the address of the client and the address of the MTS, and the tunnel crosses the firewall of the local area network.
  • the SIP media data includes real-time transport protocol RTP data and real-time transport control protocol RTCP data. .
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel. It reduces the time consuming of the call process and improves the user experience.
  • the client in S201 is located in the local area network, and the address of the client is used to establish a tunnel, that is, the address of the endpoint of the tunnel on the LAN side.
  • the client may be an entity, for example, may be a UE, or may be a logical unit that can implement the steps in FIG. 2.
  • the specific form of the address of the client is not limited in the embodiment of the present invention.
  • it may be the public IP address of the client and the public port of the client.
  • the public port of the above client refers to the port of the client corresponding to the public IP address of the client.
  • the MTS in S203 is located on the network side, and the address of the MTS is used to establish a tunnel, that is, an address of an end point of the tunnel on the network side.
  • the MTS can be a stand-alone entity or a functional module integrated on the existing IMS-AGW.
  • the specific form of the address of the MTS is not limited in the embodiment of the present invention.
  • it may be a public IP address of the MTS and a public port.
  • the public port of the MTS refers to the MTS port corresponding to the public IP address of the MTS, and may also be other information that can identify the location of the client.
  • the embodiment of the present invention includes the address of the MTS.
  • the public IP address and public port of the MTS are used as an example.
  • the tunnel in S204 is used for transmitting media data, and is not used for transmitting signaling data, which is more in line with the architecture of separating media data and signaling data in the current 3GPP standard, and when the media and signaling data streams grow asymmetrically, Easy to expand.
  • the embodiment of the present invention determines the address of the client in the local area network (ie, the publicity of the client).
  • IP address and the public port of the client are not limited.
  • determining the public IP address of the client and the public port of the client may include: obtaining a private IP address of the client, and allocating a private port of the client; according to the client The private IP address and the client's private port query the client's public IP address and the client's public port.
  • the specific manner of querying the public IP address of the client and the public port of the client according to the private IP address and the private port of the client is not limited, for example, according to the existing STUN protocol or the TURN protocol. Inquire.
  • the public IP address of the MTS may also be obtained.
  • a transmission control protocol TCP connection is established with a specific port of the public IP address of the MTS, and the specific port is configured.
  • the port number is the same as the port number of the port that the firewall is allowed to pass through; the client's address is queried through the TCP connection.
  • Query the client's public IP address and public port by establishing a TCP connection in advance, and then connect to this TCP.
  • the tunnel is established on the basis of the tunnel, so that the tunnel established between the client side and the MTS does not need to perform tunnel path detection, which shortens the signaling interaction process.
  • the formula is not limited.
  • the request message for requesting the public IP address of the MTS may be sent to the SIP server; and the request response message sent by the SIP server is received, and the request response message carries the public IP address of the MTS.
  • the above request message may be a registration message sent by the client to the SIP server (P-CSCF in the IMS network), or may be a call request message.
  • determining the public IP address of the client and the public port of the client may include: acquiring a public IP address of the client; and detecting a specific port that the firewall allows to pass; Use the specific port that the firewall allows to pass as the public port of the client.
  • the method of FIG. 2 may further include: determining a transport protocol supported by the firewall, where the transport protocol includes at least one of TCP and a user data packet protocol UDP; and transmitting, by the SIP server, the transport protocol Information; when transmitting data to the MTS through the tunnel, the data is encapsulated by the transmission protocol; when receiving the data transmitted by the MTS through the tunnel, the data is decapsulated by the transmission protocol.
  • FIG. 2 a method for traversing a firewall according to an embodiment of the present invention is described in detail from the perspective of a client.
  • a method for traversing a firewall according to an embodiment of the present invention will be described below from the perspective of a SIP server in conjunction with FIG.
  • FIG. 3 is a flow chart of a method of traversing a firewall in accordance with another embodiment of the present invention.
  • the method of Figure 3 can be performed by a SIP server, such as a P-CSCF in an IMS network.
  • S301 Receive information including an address of a client in a local area network.
  • S303 Send, to the client, information that includes an address of the MTS, where the MTS address includes the public port of the MTS and the public IP address of the obtained MTS, and send the address including the client and the public port of the MTS to the MTS, so that the client
  • the information about the tunnel for transmitting the session initiation protocol SIP media data is established with the MTS, and the tunnel traverses the firewall in the local area network.
  • the SIP media data includes the real-time transport protocol RTP data and the real-time transport control protocol RTCP data.
  • a media plane is established between the client and the MTS on the network side.
  • the traversing tunnel enables the media data such as RTP and RTCP to be transmitted through the tunnel, thereby reducing the time consuming of the calling process and improving the user experience.
  • the receiving, by the S301, the information including the address of the client in the local area network includes: receiving information including an address of the client, where the address of the client includes a public internet protocol IP address of the client and a public port of the client.
  • the public port that allocates the MTS in S302 may include: a port number of a port that the firewall allows to pass as a port number of the public port of the MTS.
  • the public port of the client can also be used as the public port of the MTS, which is not limited in this embodiment of the present invention.
  • the method may further include: receiving a request message sent by the client for requesting the public IP address of the MTS; sending a request response message to the client, requesting the response The message carries the public IP address of the MTS.
  • the method of FIG. 3 may further include: receiving, by the client, information indicating a transport protocol supported by the firewall, where the transport protocol includes at least one of TCP and a user data packet protocol UDP; Information for indicating a transport protocol is sent to the MTS.
  • the method of FIG. 3 further includes: sending, to the MTS, information about an address of the packet gateway and an address of the client.
  • the above address may include an IP address and port used by the client for RTP and RTCP data transmission, and an IP address and port used by the media gateway for RTP and RTCP data transmission.
  • the MTS may be a new logical unit integrated in a Media Gateway (MGW), or may be a new physical network element arranged on the network side.
  • MGW Media Gateway
  • FIG. 4 is a flow chart of a method of traversing a firewall in accordance with another embodiment of the present invention.
  • the method of Figure 4 can be performed by the MTS.
  • S401 Receive a session initiation protocol, and send, by the SIP server, information about an address of a client in the local area network and a public port of the MTS.
  • S402. Establish a tunnel for transmitting SIP media data between the MTS and the client according to the address of the client and the address of the MTS, and the tunnel crosses the firewall of the local area network.
  • the SIP media data includes real-time transport protocol RTP data and real-time transport control protocol RTCP data. .
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • receiving the information that is sent by the SIP server and includes the address of the client in the local area network and the public port of the MTS may include: receiving information including the address of the client and the public port of the MTS, where the address of the client includes the publicity of the client The IP address and the public port of the client; the tunnel for establishing the SIP media data between the MTS and the client according to the address of the client and the address of the MTS includes: according to the public IP address of the client, the public port of the client, and the MTS The address establishes a tunnel.
  • the address of the MTS includes the public IP address of the MTS and the public port of the MTS.
  • the method before receiving the information about the address of the client in the local area network and the public port of the MTS sent by the SIP server, the method further includes: establishing a transmission control protocol TCP connection with the client, so that the client according to the TCP Connect to the public IP address of the query client and the public port of the client.
  • the method of FIG. 4 may further include: receiving, by the SIP server, information indicating a transport protocol supported by the firewall, where the transport protocol includes at least one of TCP and a user data packet protocol UDP; When transmitting data to the client through the tunnel, the data is encapsulated by the transmission protocol; when the data transmitted by the client through the tunnel is received, the data is decapsulated by the transmission protocol.
  • the method of FIG. 4 may further include: receiving, by the SIP server, information including an address of the media gateway and an address of the client.
  • FIG. 5 to FIG. 9 is exemplified by the client in the local area network communicating with the IMS network in the public network, but the embodiment of the present invention is not limited thereto, for example.
  • the UE uses the WiFi access mode to perform non-IMS VoIP calls. Since the firewall is deployed on the network side, only 80 ports are opened, which makes it impossible to perform. For VoIP sessions, this solution can solve the traversal problem in the above scenarios.
  • the MTC can be integrated on the UE, for example, it can be a logical unit on the UE, or can be a physical device.
  • the present invention is described by taking the UE integrated MTC as an example, that is, the UE in FIG. 5 to FIG. 9 can perform the FIG.
  • the various steps performed by the client in FIG. 5; the MTS in FIG. 5 to FIG. 9 may be a logical unit integrated on the IMS-AGW, or may be an independent entity, which is not limited by the embodiment of the present invention.
  • MTC Media Traversal Client
  • FIG. 5 is a flow chart of a method of traversing a firewall in accordance with another embodiment of the present invention.
  • the firewall of the local area network of the client has a NAT traversal problem, and the type of the UE to be initiated by the UE is VoIP.
  • the UE completes IMS registration from port 80 or port 443 according to the prior art.
  • the P-CSCF determines whether there is a NAT traversal problem according to the request sent by the UE (REGISTER), if the source IP address of the network layer and the source port of the transport layer are inconsistent with the IP address and port of the Contact in the request packet.
  • the UE determines that the session type to be initiated is VoIP, and then traverses in a tunnel manner, and proceeds to S506. If the session type is determined to be an MSRP session, the non-tunnel MSRP traversal method is adopted, that is, S601 in the embodiment of FIG. 6 S611's solution.
  • the client allocates the private PT1 of the client, that is, the private IP address P1 of the client MTC traversing the tunnel is PT1.
  • the method of the allocation is as follows: In a NAT scenario, the traversal tunnel port can be allocated by using a random allocation mode. In the case of no NAT, the firewall can traverse the port detection result to select a port before the UE initiates a session request, or directly adopt a specific port. Port 80 or 443 acts as a tunnel.
  • the MTC module in the UE uses the STUN protocol to query the public IP address of the MTC as IPln, the public port PTln of the MTC, and determine which transport protocol the firewall allows, whether it is the TCP protocol or the UDP protocol.
  • the UE initiates a VoIP INVITE request
  • the SDP carries the client information of the traversal tunnel, including the MTC public address, the private address, and the tunnel encapsulation type
  • the tunnel encapsulation type includes a UDP encapsulation mode (UDP-encaps) and a TCP encapsulation mode ( TCP-encaps)
  • UDP-encaps UDP encapsulation mode
  • TCP-encaps TCP encapsulation mode
  • the encapsulation type of the above tunnel is the same as that supported by the firewall described in FIG. 1 to FIG. 3.
  • the tunnel can also adopt a transparent transmission mode (transp) without tunnel encapsulation.
  • the SDP carries the traversal tunnel client information in the following two ways:
  • the P-CSCF determines whether the MTS port needs to be allocated for the tunnel according to the tunnel encapsulation type information sent by the UE. If the tunnel mode is transparent, the port is not allocated to the MTS, and only the port is allocated to the MGW. If the mode is UDP or TCP encapsulation mode, Then, according to the tunnel client address information, it is determined whether there is NAT traversal. If the srflx flag is included in the candidate row of the SDP, there is a NAT problem, and the port of the MTS port is a specific traversal port, such as the HTTP protocol default port 80 or the HTTPS default port. 443; If there is a host flag, it is considered that there is no NAT problem, the port of the MTS is allocated to the MTC-like port or a specific traversal port, such as 443 or 80 port.
  • the S512 and the P-CSCF transmit the information about the address and the encapsulation format of the two sides of the tunnel through the H.248, and transmit the information about the address of the two sides of the media data to be encapsulated to the MTS through the H.248 protocol or other control protocol.
  • the MTS sends the information according to the P-CSCF.
  • the information that is passed establishes the correspondence between the media stream and the tunnel.
  • the P-CSCF sends RTP/RTCP media information to the media gateway MGW to establish an RTP/RTCP connection.
  • the P-CSCF sends the message to the UE through the 200 OK session response message, and the SDP carries MTS's public address and tunnel encapsulation mode.
  • the MTS determines that there is a NAT traversal problem. For example, the identifier sent by the SIP server indicating whether the firewall has a NAT traversal problem is determined by the SIP server, and the connection reachability check is performed with the UE, and the STUN path feasible check mechanism of the prior art is adopted.
  • the MTC module and the MTS in the UE serve as the service termination point of the traversing tunnel, and perform the encapsulation/unwrapping processing of the VoIP data packet.
  • the encapsulation mode is as shown in FIG. 10, and the entire VoIP data packet is encapsulated as a payload in the tunnel data packet.
  • the IP address of the tunnel header is the public address of MTS and MTC. After the MTS/MTC unpacks the tunnel packet, it forwards it according to the address of the original VoIP packet.
  • S519 The UE and the MTS perform periodic NAT address binding keep-alive interaction during the call.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • FIG. 6 is a flow chart of a method of traversing a firewall in accordance with another embodiment of the present invention.
  • the restricted firewall of the local area network where the UE is located has a NAT traversal problem, and the session type to be initiated by the UE is MSRP. Since MSRP can transmit over HTTP port 80 or 443, MSRP does not use UDP/TCP tunneling to traverse.
  • the UE and the media gateway directly negotiate an HTTP/HTTPS port to establish an MSRP connection.
  • the UE determines, by using a registration message, that NA(P)T exists, and prepares for an MSRP session.
  • the MSRP is used to transmit non-real-time service data such as IM, content sharing, and file transfer.
  • the UE allocates a dedicated private port PTx to the MSRP session.
  • the MSRP traversal port of the MSRP can be set according to the actual open port of the firewall, for example, the default port of the HTTP protocol. 80 ports and so on.
  • S602 ⁇ S604 The UE queries the public address of the MSRP traversal tunnel client as ⁇ 1 ⁇ / ⁇ through the STUN mode.
  • S605 The UE notifies the P-CSCF that the MSRP traverses the tunnel client private IP address IP1, the private port PTx, the public IP address IPln, the public port PTxn, and the tunnel encapsulation type to the transparent transmission mode through the INVITE message.
  • the P-CSCF allocates a dedicated MSRP traversal port, such as port 80 or port 443, to the MGW, and does not allocate a port for MSRP traversal to the MTS, that is, Said that MSRP traversal does not pass MTS, UE and MGW directly built Establish an MSRP connection.
  • a dedicated MSRP traversal port such as port 80 or port 443, to the MGW, and does not allocate a port for MSRP traversal to the MTS, that is, Said that MSRP traversal does not pass MTS, UE and MGW directly built Establish an MSRP connection.
  • the P-CSCF informs the MGW of the information about establishing an MSRP connection.
  • the P-CSCF informs the UE of the address and port information of the MGW through the lxx or 200 OK response message, and notifies the tunnel that the tunnel type is transparent transmission mode.
  • the UE and the MGW perform an MSRP path reachability check, and after confirming that the MSRP connection is reachable, the UE sends an MSRP channel completion confirmation message.
  • the S611 and the MTC do not perform any encapsulation processing on the received MSRP message, and directly transmit the result to the IMS client.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • FIG. 7 is a flow chart of a method of traversing a firewall in accordance with another embodiment of the present invention.
  • the NAT-related processing procedures such as the public address binding query, the connection reachability check, and the STUN keep-alive are omitted.
  • the MTS traversal tunnel port and the MTC port are the same, instead of being randomly allocated.
  • the traversing process includes the following steps:
  • the UE completes the IMS registration through the 443 or 80 port according to the prior art.
  • the P-CSCF determines that the network layer address in the SIP message is the same as the address in the contact. If the firewall does not have NAT, it decides to adopt a lightweight firewall traversal scheme.
  • S703 ⁇ S704 After completing the registration, the UE uses the existing STUN technology or other port scanning technology to detect the port allowed by the firewall and its transmission protocol. The UE configures the port detection range according to the current network, such as ports 443 and 80.
  • S705 The UE prepares to initiate a VoIP session, and allocates a port PT1 of the MTC to the traversal tunnel.
  • the allocation method is: after the UE determines that there is no NA(P)T scenario, according to the firewall detection result, the port through which the UDP packet can pass is preferentially selected as the traversal tunnel. Port, or directly assign a specific port dedicated to tunneling, such as port 80 or 443.
  • the UE notifies the P-CSCF of the client private IP address IP1, the private port PT1, and the tunnel encapsulation type (that is, the transmission protocol supported by the firewall) by using the INVITE message.
  • IP1 the client private IP address
  • PT1 the private port PT1
  • tunnel encapsulation type that is, the transmission protocol supported by the firewall
  • the P-CSCF allocates the same port number as the MTC to the MTS according to the tunnel encapsulation type and the tunnel client address information sent by the UE, and the traversal in the non-transparent mode and the non-NAT scenario.
  • the P-CSCF transmits the address and encapsulation format of the traversal tunnel and the address information of the communication side of the media data to be encapsulated to the MTS through the H.248 protocol or other control protocol, and establishes the media stream and the tunnel through the H.248. Correspondence between the two.
  • the P-CSCF sends RTP/RTCP media information to the media gateway MGW to establish an RTP/RTCP connection.
  • the P-CSCF sends the tunnel server address to the UE through the lxx or 200 OK response message, that is, the IP and port of the MTS, that is, the tunnel encapsulation type.
  • the MTS determines that the traversal in the non-NAT scenario is based on the tunnel client address information forwarded by the P-CSCF, and does not perform the connection path reachability check.
  • S712 The UE does not perform the path reachability check, and the direct tunnel establishment completion and the media negotiation completion confirmation information are sent to the P-CSCF.
  • the MTC module and the MTS in the UE serve as the service termination point of the traversing tunnel, and perform the encapsulation/unwrapping process of the VoIP data packet.
  • the encapsulation method is as shown in FIG. 10, and the entire VoIP data packet is encapsulated in the tunnel data as a payload.
  • the IP address of the tunnel header is the public address of MTS and MTC. After the MTS/MTC unpacks the tunnel packet, it is forwarded according to the address of the original VoIP packet. The MTC and MTS no longer perform the NAT address binding keep-alive process.
  • the UE determines to initiate an MSRP session, and allocates a dedicated firewall traversal port PTx to the MSRP session.
  • the MSRP traversal port of the MSRP can be set according to the actual open port of the firewall, for example, the default port of the HTTP protocol port is 80.
  • the UE notifies the P-CSCF that the MSRP traverses the tunnel client public IP address IP1, the public port PTx, and the tunnel encapsulation type to the transparent transmission mode through the INVITE message. 5717.
  • the P-CSCF allocates a UE-like MSRP port to the MGW according to the traversal tunnel address and the encapsulation mode information of the UE, and learns that the tunnel is in a transparent mode and is not a NAT scenario.
  • the MRP MSRP port is not allocated.
  • the P-CSCF informs the MGW of the information establishing the MSRP connection.
  • the S719 and the P-CSCF notify the UE of the transparent transmission mode information by using the lxx or 200 session response message that the IP and MSRP ports of the MGW have traversed the tunnel.
  • S720 The UE does not perform the path reachability check, and directly sends a media negotiation completion confirmation message to the P-CSCF.
  • the S721 and the MTC transparently transmit the packets connected to the MSRP session according to the tunnel type.
  • the MSRP session between the UE and the IMS network is established.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • FIG. 8 is a flow chart of a method of traversing a tunnel in accordance with another embodiment of the present invention.
  • the UE establishes a TCP connection with the MTS before initiating the INVITE session request, and then, through the SDP offer/answer method, the UE and the network negotiate to pass the VoIP media stream through the pre-built TCP.
  • the UE and the MTS do not need to perform the traversal accessibility check.
  • the VoIP media stream can only be encapsulated by TCP tunneling, and cannot be encapsulated by UDP tunnel. Both the MGW and the MTS must integrate the ICE-lite function.
  • the UE initiates an IMS registration request.
  • the P-CSCF determines that there is a NAT problem according to the address information of the REGISTER message, and notifies the UE of the MTS information by using the registration response message.
  • the registration response message carries the IP address information of the MTS and the MGW, and the carrying method is to add an extension header to the SIP message.
  • the domain adds parameters to the existing SIP header field and carries MTS and MGW address information. If it is determined to be a non-NAT problem, the lightweight traversal scheme in the second embodiment is adopted.
  • the UE determines that a VoIP session is to be initiated, and prepares to use the TCP tunnel to traverse the firewall.
  • the UE allocates a TCP traversal tunnel port, that is, the MTC port PT1.
  • S804 ⁇ S805 and MTC initiate a TCP connection to the specific port of the MTS through the PT1 port.
  • the specific port of the MTS can be configured according to the port range allowed by the firewall, such as the HTTP protocol default port 80 or the HTTPS protocol default port 443 port. a TCP at Keep it during the call and know that the call is over.
  • the S806 ⁇ S807 and the MTS integrate the ICE-Lite function.
  • the UE queries the MTS for the public IP address IPln of the MTC, the public port PTln or the public IP address IPa of the MTC, and the public port PTln through the TCP connection established in step S805.
  • the method of querying the MTC public address in the STUN mode and applying the MTC public address in the TURN mode is similar to the STUN method. This is not mentioned here.
  • the UE initiates an INVITE request from the VoIP, and carries the client information of the traversal tunnel in the SDP, including the MTC public IP address and the public port ( ⁇ 1 ⁇ , ⁇ 1 ⁇ ), the private IP address and the private port ( ⁇ , ⁇ ), and the tunnel encapsulation type.
  • the following two methods are used to carry the traversal tunnel client information:
  • the specific port 80 of the P-CSCF allocation setting is the port of the TCP tunnel, that is, the address of the TCP tunnel network side is the MTS address of the S805 establishing the TCP connection.
  • the P-CSCF transmits the address and encapsulation mode of the communication sides of the TCP tunnel to the TCP encapsulation and the information about the address of the communication side of the media data to be encapsulated to the MTS through the H.248 protocol or other control protocol, and the MTS according to the P-CSCF
  • the sent information establishes the correspondence between the media and the traversal tunnel 811.
  • the P-CSCF sends the RTP/RTCP media information to the media gateway MGW to establish an RTP/RTCP connection.
  • the P-CSCF notifies the UE by using the session response message 200 OK or lxx message, the address information and the encapsulation mode of the MTS side of the TCP tunnel are in the TCP tunnel mode.
  • the UE and the MTS do not need to perform a path, and the UE directly sends a session success confirmation message ACK to the network.
  • the UE and the MTS perform the TCP encapsulation/unwrapping processing of the VoIP data packet as the service termination point of the TCP traversal tunnel.
  • the encapsulation mode is as shown in FIG. 10, the TCP encapsulation format, and the entire VoIP data packet is encapsulated as a payload in the TCP.
  • the IP address of the tunnel header is the public address of MTS and MTC. After the MTS/MTC unpacks the tunnel packet, it is based on the original VoIP packet. The address is forwarded.
  • the UE and the MTS perform periodic NA (P) T address binding and keep alive interaction.
  • the UE decides to initiate an MSRP session, and allocates a port PTx to the MSRP session.
  • the MTC module in the UE establishes a TCP connection through the PTx port and the specific port of the media gateway MGW.
  • This TCP keeps the long connection and knows that the session is terminated after the end of the session.
  • the MGW integrates the ICE-lite function.
  • the specific port used by the MGW for MSRP traversal can be set according to the port range that the firewall allows, for example, the HTTP protocol default port 80 or the HTTPS protocol default port 443 port.
  • S819 The UE notifies the P-CSCF that the MSRP traverses the tunnel client private IP address IP1, the private port PTx, the public IP address IPln and the public port PTxn, and the tunnel encapsulation type is transparent transmission mode through the INVITE message.
  • the MGW is assigned a specific
  • the MSRP traverses the port 80 and does not allocate the port for MSRP traversal to the MTS. That is to say, the MSRP traverses without passing through the MTS.
  • the UE and the MGW directly establish an MSRP connection.
  • the P-CSCF informs the MGW of the information establishing the MSRP connection.
  • P-CSCF responds to the message by lxx or 200 OK, and sets the address information of the MGW.
  • IPb, 80 tells the UE and informs the tunnel that the tunnel type is transparent.
  • the UE and the network do not need to perform path reachability check, and directly send an ACK session to successfully acknowledge the message to the network.
  • the MTC does not perform any encapsulation process on the received MSRP message, and directly transmits the message to the IMS client.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • FIG. 9 is a flow chart of a method of traversing a tunnel in accordance with another embodiment of the present invention.
  • the main difference from the embodiment of FIG. 8 is that the manner in which the UE acquires the MTS or the MGW is different.
  • the P-CSCF does not notify the UE of the MTS and the MGW address by using the registration message, but carries the SDP message by establishing the session.
  • the band notifies the UE to the MTS or the MGW, and the UE establishes a TCP connection by the MTS or the MGW.
  • S901, the UE, and the P-CSCF complete the IMS registration.
  • the UE decides to initiate a VoIP session, allocates a TCP traversal tunnel port PT1, and notifies the preparation that the P-CSCF needs to perform firewall traversal.
  • S903 The UE notifies the P-CSCF to perform firewall traversal by using a special parameter carried by the SDP in the INVITE message or a dedicated SDP description line.
  • S904 and the P-CSCF inform the UE of the address information of the MTC through the special parameters of the SDP in the lxx response message or the specific SDP description line, and the firewall side is also supported by the network side.
  • S905 and MTC initiate a TCP connection to the specific port of the MTS through the PT1 port.
  • the specific port of the MTS can be configured according to the port range allowed by the firewall, such as the HTTP protocol default port 80 or the HTTPS protocol default port 443 port. Keep it during the call and know that the call is over.
  • S906 ⁇ S907 and MTS integrate the ICE-Lite function.
  • the UE queries the MTS for the public IP address IPln of the MTC, and the public port PTln or the MTS public IP address IPa to the MTS through the TCP connection established in step S905.
  • the public port PTln this The invention uses the STUN method to query the MTC public address, and uses the TURN method to apply for the MTC public address.
  • the method for establishing a tunnel through the tunnel is similar to the STUN method. .
  • the UE sends a PRACK message, and the PRACK message SDP body carries the client information that establishes the traversal tunnel, including the MTC public IP address and the public port ( ⁇ 1 ⁇ , ⁇ 1 ⁇ ), the private IP address, and the private shorts ( ⁇ , ⁇ ) and the tunnel.
  • the encapsulation type is TCP tunnel encapsulation mode. The following two methods are used to carry the information of the tunneling client:
  • the specific port 80 allocated by the S909 and the P-CSCF is the port of the TCP tunnel, that is, the address of the TCP tunnel network side is the MTS address for establishing the TCP connection in step S905.
  • the S910 and the P-CSCF pass the address and encapsulation mode of the communication sides of the TCP tunnel to the TCP encapsulation, and pass the information about the address of the communication side of the media data to be encapsulated through the H.248 protocol or
  • the control protocol is transmitted to the MTS.
  • the MTS establishes the correspondence between the media and the traversal tunnel according to the information sent by the P-CSCF.
  • the P-CSCF sends the RTP/RTCP media information to the media gateway.
  • MGW establishes an RTP/RTCP connection.
  • the P-CSCF notifies the UE by using a session response message 200 OK message by using the address information and the encapsulation mode of the MTS side of the TCP tunnel to the TCP tunnel mode.
  • the UE and the MTS do not need to perform a path, and the UE directly sends a session success confirmation message ACK to the network.
  • the UE and the MTS perform the TCP encapsulation/unwrapping processing of the VoIP packet as the service termination point of the TCP traversal tunnel.
  • the encapsulation mode is as shown in FIG. 10, the TCP encapsulation format, and the entire VoIP packet is encapsulated as a payload in the TCP.
  • the IP address of the tunnel header is the public address of MTS and MTC. After the MTS/MTC unpacks the tunnel packet, it forwards it according to the address of the original VoIP packet.
  • the UE and the MTS perform periodic NA (P) T address binding and live interaction.
  • S915 The UE determines to initiate an MSRP session, and allocates a private network port PTx to the MSRP session.
  • S916 The UE notifies the P-CSCF to perform firewall traversal through a special parameter carried by the SDP in the INVITE message or a dedicated SDP description line.
  • the S917 and the P-CSCF inform the UE of the address information of the MGW through the special parameters of the SDP in the lxx response message or the specific SDP description line, and the firewall side is also supported by the network side.
  • the MTC module establishes a TCP connection through the PTx port and the media gateway MGW specific port, and the TCP keeps the long connection, and knows that the session is terminated after the end of the session, and the MGW integrates the ICE-lite function.
  • the specific port used by the MGW for MSRP traversal can be set according to the port range that the firewall allows, for example, the HTTP protocol default port 80 or the HTTPS protocol default port 443 port.
  • S920 The UE notifies the P-CSCF that the MSRP traverses the tunnel client private IP address IP1, the private port PTx, the public IP address IPln, the public PTxn, and the tunnel encapsulation type to the transparent transmission mode through the PRACK message.
  • the MGW is assigned a specific MSRP traversal port 80, and the MTS is not allocated for the MSRP traversal. That is, the MSRP traversal does not pass through the MTS, and the UE and the MGW are directly established. MSRP connection. 5922.
  • the P-CSCF informs the MGW of the information establishing the MSRP connection.
  • the P-CSCF reports the address information (IPb, 80) of the MGW to the UE through the 200 OK response message, and notifies the tunnel that the tunnel type is transparent transmission mode.
  • S924 The UE and the network do not need to perform path reachability check, and directly send an ACK session to successfully acknowledge the message to the network.
  • S925 The MTC does not perform any encapsulation processing on the received MSRP message and directly transmits the result to the IMS client.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • FIG 11 is a block diagram of a client of one embodiment of the present invention.
  • the client includes a determining unit
  • a determining unit 1101 configured to determine an address of a client in the local area network
  • the sending unit 1102 is configured to send, to the session initiation protocol SIP server, information including an address of the client;
  • the receiving unit 1103 is configured to receive, by the SIP server, information that includes an address of the media traversal server MTS on the network side;
  • the establishing unit 1104 is configured to establish, according to the address of the client and the address of the MTS, a tunnel for transmitting SIP media data between the client and the MTS, and the tunnel traverses a firewall in the local area network.
  • SIP media data includes real-time transport protocol RTP data and real-time transport control protocol RTCP data.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • the determining unit 1101 is specifically configured to determine an address of the client, where the address of the client includes a public internet protocol IP address of the client and a public port of the client.
  • the receiving unit 1103 is specifically configured to receive information including an address of the MTS, where the address of the MTS includes a public IP address of the MTS and a public port of the MTS;
  • the unit 1104 is specifically configured to establish a tunnel according to the public IP address of the client, the public port of the client, the public IP address of the MTS, and the public port of the MTS.
  • the client may further include: a determining unit, configured to determine whether the firewall needs to perform network address translation NAT; and, when determining that the firewall needs to perform NAT, the determining unit 1101 is specifically configured to acquire the client.
  • a determining unit configured to determine whether the firewall needs to perform network address translation NAT; and, when determining that the firewall needs to perform NAT, the determining unit 1101 is specifically configured to acquire the client.
  • Private IP address and assign the client's private port; Query the client's public IP address and the client's public port based on the client's private IP address and the client's private port.
  • the determining unit 1101 is specifically configured to acquire a public IP address of the MTS; and establish a transmission control protocol TCP connection with a specific port of the public IP address of the MTS according to the private port of the client and the public IP address of the MTS.
  • the port number of the specific port is the same as the port number of the port that the firewall is allowed to pass through; the address of the client is queried through the TCP connection.
  • the determining unit 1101 is specifically configured to send a request message for requesting the public IP address of the MTS to the SIP server, and receive a request response message sent by the SIP server, where the request response message carries the public IP address of the MTS. address.
  • the determining unit 1101 when determining that the firewall does not need to perform NAT, is specifically configured to acquire a public IP address of the client; detecting a specific port that the firewall allows to pass; and using a specific port that the firewall allows to pass as a client. Public port.
  • the determining unit 1101 is further configured to determine a transport protocol supported by the firewall, where the transport protocol includes at least one of TCP and a user data packet protocol UDP; the sending unit 1102 is further configured to send to the SIP server. Information indicating the transmission protocol;
  • the client further includes: an encapsulating unit, configured to encapsulate the data by using a transmission protocol when transmitting data to the MTS through the tunnel; and decapsulating the unit, configured to use the transmission protocol to solve the data when receiving the data sent by the MTS through the tunnel Package.
  • FIG. 12 is a block diagram of a SIP server in accordance with one embodiment of the present invention.
  • the SIP server includes a receiving unit 1201, an allocating unit 1202, and a transmitting unit 1203.
  • the receiving unit 1201 is configured to receive information including an address of a client in the local area network, and an allocating unit 1202, configured to allocate a public port of the media traversing server MTS;
  • the sending unit 1203 is configured to send, to the client, information including an address of the MTS, where the MTS address includes the public port of the MTS and the public IP address of the obtained MTS, and send the address including the client and the public port of the MTS to the MTS.
  • Information so that a tunnel is established between the client and the MTS for transmitting the session initiation protocol SIP media data, and the tunnel traverses the LAN.
  • SIP media data includes real-time transport protocol RTP data and real-time transport control protocol RTCP data.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • the receiving unit 1201 is specifically configured to receive information including an address of the client, where the address of the client includes a public internet protocol IP address of the client and a public port of the client; and sending the address of the MTS to the client includes: The client sends the address of the MTS.
  • the address of the MTS includes the public IP address of the MTS and the public port of the MTS.
  • the allocating unit 1202 is specifically configured to use the port number of the port that the firewall allows to pass as the port number of the public port of the MTS.
  • the receiving unit 1201 is further configured to receive a request message sent by the client for requesting the public IP address of the MTS, and send a request response message to the client, where the request response message carries the public IP of the MTS. address.
  • the receiving unit 1201 is further configured to receive, by the client, information for indicating a transport protocol supported by the firewall, where the transport protocol includes at least one of TCP and a user data packet protocol UDP; 1203 is further configured to send information to the MTS for indicating a transmission protocol.
  • the sending unit 1203 is further configured to send, to the MTS, information that includes an address of the media gateway and an address of the client.
  • FIG. 13 is a block diagram of an MTS in accordance with one embodiment of the present invention.
  • the MTS includes a receiving unit 1301 and an establishing unit 1302.
  • the receiving unit 1301 is configured to receive, by the SIP initialization server, information including an address of a client in the local area network and a public port of the MTS;
  • the establishing unit 1302 is configured to establish, according to the address of the client and the address of the MTS, a tunnel for transmitting SIP media data between the MTS and the client, and the tunnel crosses the firewall of the local area network, and the SIP media data includes real-time transmission protocol RTP data and real-time transmission. Control protocol RTCP data.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • the receiving unit 1301 is specifically configured to receive the client-side The address and the information of the public port of the MTS, the address of the client includes the public IP address of the client and the public port of the client; the establishing unit 1302 is specifically configured to establish a tunnel according to the public IP address of the client, the public port of the client, and the address of the MTS, the MTS The address includes the public IP address of the MTS and the public port of the MTS.
  • the establishing unit 1302 is further configured to establish a transmission control protocol TCP connection with the client, so that the client queries the public IP address of the client and the public port of the client according to the TCP connection.
  • the receiving unit 1301 is further configured to receive, by the SIP server, information for indicating a transport protocol supported by the firewall, where the transport protocol includes at least one of TCP and a user data packet protocol UDP;
  • the MTS further includes: an encapsulating unit, configured to encapsulate the data by using a transmission protocol when transmitting data to the client through the tunnel; and decapsulating the unit, when receiving the data sent by the client through the tunnel, using the transmission protocol to perform data Decapsulation.
  • an encapsulating unit configured to encapsulate the data by using a transmission protocol when transmitting data to the client through the tunnel
  • decapsulating the unit when receiving the data sent by the client through the tunnel, using the transmission protocol to perform data Decapsulation.
  • the receiving unit 1301 is further configured to receive, by the SIP server, information that includes an address of the media gateway and an address of the client.
  • FIG 14 is a block diagram of a client in accordance with another embodiment of the present invention.
  • the client includes a processor 1401, a transmitter 1402, and a receiver 1403.
  • a processor 1401 configured to determine an address of a client in the local area network
  • a sender 1402 configured to send, to the session initiation protocol SIP server, information including an address of the client;
  • the receiver 1403 is configured to receive, by the SIP server, information that includes an address of a media traversal server MTS on the network side;
  • the processor 1401 is further configured to establish, according to the address of the client and the address of the MTS, a tunnel for transmitting SIP media data between the client and the MTS, and the tunnel traverses a firewall in the local area network, and the SIP media data includes real-time transmission protocol RTP data and real-time. Transmission Control Protocol RTCP data.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • the processor 1401 is specifically configured to determine an address of the client, where the address of the client includes a public internet protocol IP address of the client and a public port of the client.
  • the receiver 1403 is specifically configured to receive the area including the MTS.
  • the information of the address, the address of the MTS includes the public IP address of the MTS and the public port of the MTS.
  • the processor 1401 is specifically configured to establish a tunnel according to the public IP address of the client, the public port of the client, the public IP address of the MTS, and the public port of the MTS.
  • the processor 1401 is further configured to determine whether the firewall needs to perform network address translation NAT.
  • the processor 1401 is specifically configured to obtain a private IP address of the client, and allocate the client.
  • the private port of the terminal queries the client's public IP address and the client's public port according to the client's private IP address and the client's private port.
  • the processor 1401 is specifically configured to obtain a public IP address of the MTS, and establish a transmission control protocol TCP connection with the specific port of the MTS according to the private port of the client and the public IP address of the MTS, where the specific port is The port number is the same as the port number of the port that the firewall is allowed to pass through; the client's address is queried through the TCP connection.
  • the processor 1401 is specifically configured to send a request message for requesting the public IP address of the MTS to the SIP server, and receive a request response message sent by the SIP server, where the request response message carries the public IP address of the MTS. address.
  • the processor 1401 when determining that the firewall does not need to perform NAT, is specifically configured to acquire a public IP address of the client; detect a specific port that the firewall allows to pass; and use a specific port that the firewall allows to pass as a client. Public port.
  • the processor 1401 is further configured to determine a transport protocol supported by the firewall, where the transport protocol includes at least one of TCP and a user data packet protocol UDP; the sending unit 1402 is further configured to send to the SIP server. Information indicating the transmission protocol;
  • the processor is further configured to encapsulate the data by using a transmission protocol when transmitting data to the MTS through the tunnel; and the processor is further configured to decapsulate the data by using a transmission protocol when receiving the data sent by the MTS through the tunnel.
  • FIG. 15 is a block diagram of a SIP server in accordance with another embodiment of the present invention.
  • the SIP server includes a receiver 1501, a processor 1502, and a transmitter 1503.
  • a receiver 1501 configured to receive information including an address of a client in a local area network
  • a processor 1502 configured to allocate a public port of the media traversing server MTS;
  • the sender 1503 is configured to send, to the client, information including an address of the MTS, where the MTS address includes the public port of the MTS and the public IP address of the obtained MTS, and send information including the address of the client and the public port of the MTS to the MTS, so that Established between the client and the MTS
  • the tunnel traverses the firewall in the local area network, and the SIP media data includes real-time transmission protocol RTP data and real-time transmission control protocol RTCP data.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • the receiver 1501 is specifically configured to receive information including an address of the client, where the address of the client includes a public internet protocol IP address of the client and a public port of the client.
  • the processor 1502 is specifically configured to use a port number of a port that the firewall allows to pass as a port number of the public port of the MTS.
  • the receiver 1501 is further configured to receive a request message sent by the client for requesting the public IP address of the MTS, and send a request response message to the client, where the request response message carries the public IP of the MTS. address.
  • the receiver 1501 is further configured to receive, by the client, information for indicating a transport protocol supported by the firewall, where the transport protocol includes at least one of TCP and a user data packet protocol UDP; 1503 is further configured to send information to the MTS for indicating a transmission protocol.
  • the transmitter 1503 is further configured to send, to the MTS, information including an address of the media gateway and an address of the client.
  • FIG 16 is a block diagram of an MTS in accordance with another embodiment of the present invention.
  • the MTS includes a receiver 1601 and a processor 1602.
  • the receiver 1601 is configured to receive, by the SIP server, information including an address of a client in the local area network and a public port of the MTS.
  • the processor 1602 is configured to establish, according to the address of the client and the address of the MTS, a tunnel for transmitting SIP media data between the MTS and the client, and tunneling through a firewall in the guest LAN, where the SIP media data includes real-time transport protocol RTP data and Real-time transmission control protocol RTCP data.
  • a traversal tunnel is established on the media plane between the client and the MTS on the network side, so that media data such as RTP and RTCP can be transmitted through the tunnel, thereby reducing the time consuming of the call process and improving the time. user experience.
  • the receiver 1601 is specifically configured to receive information including an address of the client and a public port of the MTS, where the address of the client includes a public IP address of the client and The public port of the client; the processor 1602 is specifically configured to establish a tunnel according to the public IP address of the client, the public port of the client, and the address of the MTS.
  • the address of the MTS includes the public IP address of the MTS and the public port of the MTS.
  • the processor 1602 is further configured to establish a transmission control protocol TCP connection with the client, so that the client queries the public IP address of the client and the public port of the client according to the TCP connection.
  • the receiver 1601 is further configured to receive, by the SIP server, information for indicating a transport protocol supported by the firewall, where the transport protocol includes at least one of TCP and a User Datagram Protocol (UDP);
  • the transport protocol includes at least one of TCP and a User Datagram Protocol (UDP);
  • UDP User Datagram Protocol
  • the processor 1602 is further configured to: when transmitting data to the client through the tunnel, encapsulate the data by using a transmission protocol; and when receiving the data sent by the client through the tunnel, decapsulate the data by using a transmission protocol.
  • the receiver 1601 is further configured to receive, by the SIP server, information that includes an address of the media gateway and an address of the client.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
  • the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, may be located in one place. Or it can be distributed to multiple network elements. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential to the prior art or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明提供穿越防火墙的方法、客户端和媒体穿越服务器。该方法包括:确定局域网中客户端的地址;向会话初始化协议SIP服务器发送包含所述客户端的地址的信息;接收所述SIP服务器发送的包含网络侧的媒体穿越服务器MTS地址的信息;根据所述客户端的地址以及所述MTS的地址,建立所述客户端与所述MTS之间的用于传输SIP媒体数据的隧道,所述隧道穿越所述客户端与所述MTS之间的所述局域网的防火墙,所述SIP媒体数据包括实时传输协议RTP数据和实时传输控制协议RTCP数据。本发明实施中,通过在客户端与网络侧的MTS之间的媒体平面建立一条穿越隧道,使得RTP、RTCP等媒体数据都可以通过该隧道进行传输,从而降低了呼叫过程的耗时,提高了用户体验。

Description

穿越防火墙的方法、 客户端和媒体穿越服务器 技术领域
本发明实施例涉及通信领域, 并且更具体地, 涉及一种穿越防火墙的方 法、 客户端、 SIP服务器和媒体穿越服务器。 背景技术
网际协议多媒体子系统( Internet Protocol Multimedia Subsystem, IMS ) 作为移动网络和固定网络相融合的基石, 广泛应用于各种网络环境中。 IMS 采用会话初始化协议 ( Session Initiation Protocol, SIP )作为会话信令协议, 在客户端与 IMS网络之间可以建立一个实时传输协议(Real-Time Transport Protocol, RTP )的传输通道,以及一条实时传输控制协议( Real-time Transport Control Protocol, RTCP )传输通道,利用该传输通道可以传输 VoIP ( Voice of IP, IP 载语音)等实时数据信息; 也可以建立消息会话中继协议(Message Session Relay Protocol, MSRP )传输通道, 利用该通道可以传输视频、 游戏、 共享内容等 IP多媒体业务。
考虑网络的安全性,企业网络或局域网与公网之间普遍部署了防火墙来 保障内网的安全性。 但是, 出于安全考虑, 防火墙只开放少量的端口, 或者 通过 HTTP代理方式, 只允许超文本传输协议 ( HTTP, Hypertext Transfer Protocol )报文通过, 造成 RTP/RTCP报文无法通过防火墙, 导致使得内网 中的客户端无法与 IMS网络进行通信, 即内网中的客户端与 IMS网络之间 存在防火墙的穿越问题。
现有技术中,常见的防火墙穿越问题有:网络地址转换(Network Address Translation, NAT ) 问题和限制性防火墙穿越问题。
在 NAT问题中, 局域网中的客户端使用私有 IP地址和端口, 不能够直 接与处于公网的 IMS网络进行通信, 而是由防火墙提供 NAT功能, 为客户 端分配一个公有地址, 然后将此公有地址与该客户端的私有地址绑定后才可 以与公网通信。 目前第三代合作伙伴计划 (The 3rd Generation Partnership, 3GPP )使用交互式连接建立 (Interactive Connectivity Establishment, ICE ) 方案解决了 NAT穿越问题。 ICE方案包括 STUN ( Simple Traversal of UDP through NAT, UDP 包的筒单 NAT 穿越)、 TURN ( Traversal Using Relay Network Address Translation, 通过 Relay方式穿越 NAT ) 以及 ICE等多种协 议, 其核心思想都是建立客户端的私有地址和公有地址的绑定关系, 利用客 户端的公有地址与 IMS网络进行通信。
在限制性防火墙穿越问题中, 防火墙不但可能限制允许通过的防火墙端 口,也可能限制允许通过防火墙的报文的类型。目前,提出一种 ICE over TLS ( Transport Layer Security, 传输层安全 )穿越方案。 该方案对基于 TURN的 ICE方案的进行优化, UE与 TURN服务器之间协商建立多条 TLS隧道, 不 同的媒体报文通过不同 TLS隧道实现防火墙穿越。 但是, 由于 UE与 TURN 建立 TLS连接的握手协商过程非常复杂, 造成呼叫过程耗时长; 而且, 由于 不同的 TLS隧道封装不同的媒体流, 所以每次呼叫 UE与 TURN服务器之 间都需要建立多条 TLS隧道,例如,要传输 VoIP业务,UE至少需要与 TRUN 服务器之间同时建立承载 TURN控制信息的 TLS隧道、传输 RTP数据的 TLS 隧道以及传输 RTCP数据的 TLS隧道, 进一步增加了呼叫过程耗时,用户体 验差。 发明内容
本发明实施例提供一种穿越防火墙的方法、 客户端、 SIP服务器和媒体 穿越服务器, 降低了呼叫过程的耗时, 提高了用户体验。
第一方面, 提供一种穿越防火墙的方法, 包括: 确定局域网中客户端的 地址; 向会话初始化协议 SIP服务器发送包含所述客户端的地址的信息; 接 根据所述客户端的地址以及所述 MTS的地址, 建立所述客户端与所述 MTS 之间的用于传输 SIP媒体数据的隧道, 所述隧道穿越局域网的防火墙, 所述
SIP媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
结合第一方面, 在第一方面的一种实现方式中, 所述确定局域网中客户 端的地址包括: 确定所述客户端的地址, 所述客户端的地址包括客户端的公 有网际协议 IP地址和客户端的公有端口。
结合第一方面及其上述实现方式, 在第一方面的另一种实现方式中, 所 述接收所述 SIP服务器发送的包含网络侧的 MTS的地址的信息包括: 接收 所述包含所述 MTS的地址的信息, 所述 MTS的地址包括所述 MTS的公有
IP地址和所述 MTS的公有端口; 则, 所述根据所述客户端的地址以及所述 MTS的地址, 建立所述客户端与所述 MTS之间的用于传输 SIP媒体数据的 隧道, 包括: 根据所述客户端的公有 IP地址、 所述客户端的公有端口、 所 述 MTS的公有 IP地址以及所述 MTS的公有端口, 建立所述隧道。
结合第一方面及其上述实现方式, 在第一方面的另一种实现方式中, 在 所述确定所述客户端的地址之前, 还包括: 判断所述防火墙是否需要进行网 络地址转换 NAT; 则, 在确定所述防火墙需要进行 NAT时, 所述确定所述 客户端的地址包括: 获取所述客户端的私有 IP地址, 并分配所述客户端的 私有端口; 根据所述客户端的私有 IP地址和所述客户端的私有端口查询所 述客户端的公有 IP地址和所述客户端的公有端口。
结合第一方面及其上述实现方式, 在第一方面的另一种实现方式中, 所 述根据所述客户端的私有 IP地址和所述客户端的私有端口查询所述客户端 的公有 IP地址和所述客户端的公有端口包括: 获取所述 MTS的公有 IP地 址;根据所述客户端的私有端口以及所述 MTS的公有 IP地址,与所述 MTS 的特定端口建立传输控制协议 TCP连接, 所述特定端口的端口号与所述防 火墙允许通过的端口的端口号相同; 通过所述 TCP连接查询所述客户端的 地址。
结合第一方面及其上述实现方式, 在第一方面的另一种实现方式中, 所 述获取所述 MTS的公有 IP地址包括: 向所述 SIP服务器发送用于请求所述 MTS的公有 IP地址的请求消息;接收所述 SIP服务器发送的请求响应消息, 所述请求响应消息中携带所述 MTS的公有 IP地址。
结合第一方面及其上述实现方式, 在第一方面的另一种实现方式中, 在 确定所述防火墙不需要进行 NAT时, 所述确定所述客户端的地址包括: 获 取所述客户端的公有 IP地址; 探测所述防火墙允许通过的特定端口; 将所 述防火墙允许通过的特定端口作为所述客户端的公有端口。
结合第一方面及其上述实现方式, 在第一方面的另一种实现方式中, 还 包括: 确定所述防火墙支持的传输协议, 所述传输协议包括 TCP和用户数 据包协议 UDP中的至少一种; 向所述 SIP服务器发送用于指示所述传输协 议的信息; 当通过所述隧道向所述 MTS发送数据时, 利用所述传输协议对 所述数据进行封装; 当接收所述 MTS通过所述隧道发送的数据时, 利用所 述传输协议对所述数据进行解封装。
第二方面, 提供一种穿越防火墙的方法, 包括: 接收包含局域网中客户 端的地址的信息; 分配媒体穿越服务器 MTS的公有端口; 向所述客户端发 送包含 MTS的地址的信息, 所述 MTS地址包括所述 MTS的公有端口以及 获取的 MTS的公有 IP地址, 并向所述 MTS发送包含所述客户端的地址以 及所述 MTS的公有端口的信息,以便所述客户端与所述 MTS之间建立用于 传输会话初始化协议 SIP媒体数据的隧道, 所述隧道穿越所述客局域网的防 火墙, 所述 SIP媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
结合第二方面, 在第二方面的一种实现方式中, 所述接收包含局域网中 客户端的地址的信息包括: 接收所述包含所述客户端的地址的信息, 所述客 户端的地址包括所述客户端的公有网际协议 IP地址和所述客户端的公有端 口。
结合第二方面及其上述实现方式, 在第二方面的另一种实现方式中, 所 述分配 MTS的公有端口包括: 将所述防火墙允许通过的端口的端口号作为 所述 MTS的公有端口的端口号。
结合第二方面及其上述实现方式, 在第二方面的另一种实现方式中, 在 所述接收局域网中客户端的地址之前, 还包括: 接收所述客户端发送的用于 请求所述 MTS的公有 IP地址的请求消息;向所述客户端发送请求响应消息, 所述请求响应消息中携带所述 MTS的公有 IP地址。
结合第二方面及其上述实现方式, 在第二方面的另一种实现方式中, 还 包括: 接收所述客户端发送的用于指示所述防火墙支持的传输协议的信息, 所述传输协议包括 TCP和用户数据包协议 UDP中的至少一种;向所述 MTS 发送用于指示所述传输协议的信息。
结合第二方面及其上述实现方式, 在第二方面的另一种实现方式中, 还 包括: 向所述 MTS发送包含媒体网关的地址以及所述客户端的地址的信息。
第三方面, 提供一种穿越防火墙的方法, 包括: 接收会话初始化协议
SIP服务器发送的包含局域网中客户端的地址以及 MTS的公有端口的信息; 根据所述客户端的地址以及所述 MTS的地址,建立所述 MTS与所述客户端 之间的用于传输 SIP媒体数据的隧道, 所述隧道穿越局域网中的防火墙, 所 述 SIP媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP数 据。
结合第三方面, 在第三方面的一种实现方式中, 所述接收 SIP服务器发 送的包含局域网中客户端的地址以及 MTS的公有端口的信息包括: 接收所 述包含所述客户端的地址以及所述 MTS的公有端口的信息, 所述客户端的 地址包括所述客户端的公有 IP地址和所述客户端的公有端口; 则, 所述根 据所述客户端的地址以及所述 MTS的地址,建立所述 MTS与所述客户端之 间的用于传输 SIP媒体数据的隧道包括: 根据所述客户端的公有 IP地址、 所述客户端的公有端口以及所述 MTS的地址建立所述隧道,所述 MTS的地 址包括所述 MTS的公有 IP地址和所述 MTS的公有端口。
结合第三方面及其上述实现方式, 在第三方面的另一种实现方式中, 在 所述接收 SIP服务器发送的包含局域网中客户端的地址以及 MTS的公有端 口的信息之前, 还包括: 与所述客户端建立传输控制协议 TCP连接, 以便 所述客户端根据所述 TCP连接查询所述客户端的公有 IP地址和所述客户端 的公有端口。
结合第三方面及其上述实现方式, 在第三方面的另一种实现方式中, 还 包括: 接收所述 SIP服务器发送的用于指示所述防火墙支持的传输协议的信 息, 所述传输协议包括 TCP和用户数据包协议 UDP中的至少一种; 当通过 所述隧道向所述客户端发送数据时, 利用所述传输协议对所述数据进行封 装; 当接收所述客户端通过所述隧道发送的数据时, 利用所述传输协议对所 述数据进行解封装。
结合第三方面及其上述实现方式, 在第三方面的另一种实现方式中, 还 址的信息。
第四方面, 提供一种客户端, 包括: 确定单元, 用于确定局域网中客户 端的地址; 发送单元, 用于向会话初始化协议 SIP服务器发送包含所述客户 端的地址的信息; 接收单元, 用于接收所述 SIP服务器发送的包含网络侧的 媒体穿越服务器 MTS的地址的信息; 建立单元, 用于根据所述客户端的地 址以及所述 MTS的地址, 建立所述客户端与所述 MTS之间的用于传输 SIP 媒体数据的隧道, 所述隧道穿越局域网中的防火墙, 所述 SIP媒体数据包括 实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
结合第四方面, 在第四方面的一种实现方式中, 所述确定单元具体用于 确定所述客户端的地址, 所述客户端的地址包括所述客户端的公有网际协议 IP地址和所述客户端的公有端口。 结合第四方面及其上述实现方式, 在第四方面的另一种实现方式中, 所 述接收单元具体用于接收所述包含所述 MTS的地址的信息,所述 MTS的地 址包括所述 MTS的公有 IP地址和所述 MTS的公有端口; 所述建立单元具 体用于根据所述所述客户端的公有 IP地址、 客户端的公有端口、 所述 MTS 的公有 IP地址以及所述 MTS的公有端口建立所述隧道。
结合第四方面及其上述实现方式, 在第四方面的另一种实现方式中, 还 包括:判断单元,用于判断所述防火墙是否需要进行网络地址转换 NAT;贝' J , 在确定所述防火墙需要进行 NAT时, 所述确定单元具体用于获取所述客户 端的私有 IP地址, 并分配所述客户端的私有端口; 根据所述客户端的私有 IP地址和所述客户端的私有端口查询所述客户端的公有 IP地址和所述客户 端的公有端口。
结合第四方面及其上述实现方式, 在第四方面的另一种实现方式中, 所 述确定单元具体用于获取所述 MTS的公有 IP地址; 根据所述客户端的私有 端口以及所述 MTS的公有 IP地址, 与所述 MTS的特定端口建立传输控制 协议 TCP连接, 所述特定端口的端口号与所述防火墙允许通过的端口的端 口号相同; 通过所述 TCP连接查询所述客户端的地址。
结合第四方面及其上述实现方式, 在第四方面的另一种实现方式中, 所 述确定单元具体用于向所述 SIP服务器发送用于请求所述 MTS的公有 IP地 址的请求消息; 接收所述 SIP服务器发送的请求响应消息, 所述请求响应消 息中携带所述 MTS的公有 IP地址。
结合第四方面及其上述实现方式, 在第四方面的另一种实现方式中, 在 确定所述防火墙不需要进行 NAT时, 所述确定单元具体用于获取所述客户 端的公有 IP地址; 探测所述防火墙允许通过的特定端口; 将所述防火墙允 许通过的特定端口作为所述客户端的公有端口。
结合第四方面及其上述实现方式, 在第四方面的另一种实现方式中, 所 述确定单元还用于确定所述防火墙支持的传输协议,所述传输协议包括 TCP 和用户数据包协议 UDP中的至少一种; 所述发送单元还用于向所述 SIP服 务器发送用于指示所述传输协议的信息; 所述客户端还包括: 封装单元, 用 于当通过所述隧道向所述 MTS发送数据时, 利用所述传输协议对所述数据 进行封装; 解封装单元, 用于当接收所述 MTS通过所述隧道发送的数据时, 利用所述传输协议对所述数据进行解封装。 第五方面, 提供一种会话初始化协议 SIP服务器, 包括: 接收单元, 用 于接收包含局域网中客户端的地址的信息; 分配单元, 用于分配媒体穿越服 务器 MTS的公有端口; 发送单元, 用于向所述客户端发送包含所述 MTS的 地址的信息, 所述 MTS地址包括所述 MTS的公有端口以及获取的 MTS的 公有 IP地址, 并向所述 MTS发送包含所述客户端的地址以及所述 MTS的 公有端口的信息, 以便所述客户端与所述 MTS之间建立用于传输会话初始 化协议 SIP媒体数据的隧道, 所述隧道穿越所述客户端与所述 MTS之间的 局域网的防火墙,所述 SIP媒体数据包括实时传输协议 RTP数据和实时传输 控制协议 RTCP数据。
结合第五方面, 在第五方面的一种实现方式中, 所述接收单元具体用于 接收所述包含所述客户端的地址的信息, 所述客户端的地址包括所述客户端 的公有网际协议 IP地址和所述客户端的公有端口; 所述向所述客户端发送 所述 MTS的地址包括: 向所述客户端发送所述 MTS的地址, 所述 MTS的 地址包括所述 MTS的公有 IP地址和所述 MTS的公有端口。
结合第五方面及其上述实现方式, 在第五方面的另一种实现方式中, 所 述分配单元具体用于将所述防火墙允许通过的端口的端口号作为所述 MTS 的公有端口的端口号。
结合第五方面及其上述实现方式, 在第五方面的另一种实现方式中, 所 述接收单元还用于接收所述客户端发送的用于请求所述 MTS的公有 IP地址 的请求消息; 向所述客户端发送请求响应消息, 所述请求响应消息中携带所 述 MTS的公有 IP地址。
结合第五方面及其上述实现方式, 在第五方面的另一种实现方式中, 所 述接收单元还用于接收所述客户端发送的用于指示所述防火墙支持的传输 协议的信息,所述传输协议包括 TCP和用户数据包协议 UDP中的至少一种; 所述发送单元还用于向所述 MTS发送用于指示所述传输协议的信息。
结合第五方面及其上述实现方式, 在第五方面的另一种实现方式中, 所 述发送单元还用于向所述 MTS发送包含媒体网关的地址以及所述客户端的 地址的信息。
第六方面, 提供一种穿越隧道服务器 MTS, 包括: 接收单元, 用于接 收会话初始化协议 SIP服务器发送的包含局域网中客户端的地址以及 MTS 的公有端口的信息; 建立单元, 用于根据所述客户端的地址以及所述 MTS 的地址, 建立所述 MTS与所述客户端之间的用于传输 SIP媒体数据的隧道, 所述隧道穿越局域网的防火墙, 所述 SIP媒体数据包括实时传输协议 RTP 数据和实时传输控制协议 RTCP数据。
结合第六方面, 在第六方面的一种实现方式中, 所述接收单元具体用于 接收所述包含所述客户端的地址以及所述 MTS的公有端口的信息, 所述客 户端的地址包括所述客户端的公有 IP地址和所述客户端的公有端口; 贝' J , 所述建立单元具体用于根据所述客户端的公有 IP地址、 所述客户端的公有 端口以及所述 MTS的地址建立所述隧道, 所述 MTS的地址包括所述 MTS 的公有 IP地址和所述 MTS的公有端口。
结合第六方面及其上述实现方式, 在第六方面的另一种实现方式中, 所 述建立单元还用于与所述客户端建立传输控制协议 TCP连接, 以便所述客 户端根据所述 TCP连接查询所述客户端的公有 IP地址和所述客户端的公有 端口。
结合第六方面及其上述实现方式, 在第六方面的另一种实现方式中, 所 述接收单元还用于接收所述 SIP服务器发送的用于指示所述防火墙支持的传 输协议的信息, 所述传输协议包括 TCP和用户数据包协议 UDP中的至少一 种; 所述 MTS还包括: 封装单元, 用于当通过所述隧道向所述客户端发送 数据时, 利用所述传输协议对所述数据进行封装; 解封装单元, 用于当接收 所述客户端通过所述隧道发送的数据时, 利用所述传输协议对所述数据进行 解封装。
结合第六方面及其上述实现方式, 在第六方面的另一种实现方式中, 所 客户端的地址的信息。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对本发明实施例中 所需要使用的附图作筒单地介绍, 显而易见地, 下面所描述的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例的一种穿越防火墙的系统架构图。
图 2是本发明一个实施例的穿越防火墙的方法的流程图。
图 3是本发明另一个实施例的穿越防火墙的方法的流程图。
图 4是本发明另一个实施例的穿越防火墙的方法的流程图。
图 5是本发明另一个实施例的穿越防火墙的方法的流程图。
图 6是本发明另一个实施例的穿越防火墙的方法的流程图。
图 7是本发明另一个实施例的穿越防火墙的方法的流程图。
图 8是本发明另一个实施例的穿越隧道的方法的流程图。
图 9是本发明另一个实施例的穿越隧道的方法的流程图。
图 10是本发明一个实施例的隧道的封装方式的示意图。
图 11是本发明一个实施例的客户端的框图。
图 12是本发明一个实施例的 SIP服务器的框图。
图 13是本发明一个实施例的 MTS的框图。
图 14是本发明另一个实施例的客户端的框图。
图 15是本发明另一个实施例的 SIP服务器的框图。
图 16是本发明另一个实施例的 MTS的框图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明的一部分实施例, 而不 是全部实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创 造性劳动的前提下所获得的所有其他实施例, 都应属于本发明保护的范围。
应理解, 本发明的技术方案可以应用于各种通信系统, 例如: 全球移动 通讯 ( Global System of Mobile communication , GSM )系统、码分多址( Code Division Multiple Access , CDMA ) 系统、 宽带码分多址 ( Wideband Code Division Multiple Access, WCDMA )系统、通用分组无线业务( General Packet Radio Service, GPRS )、 长期演进( Long Term Evolution, LTE ) 系统、 先进 的长期演进( Advanced long term evolution , LTE- A ) 系统、 通用移动通信系 统 ( Universal Mobile Telecommunication System, UMTS )等。
还应理解, 在本发明实施例中, 客户端可以是位于局域网中的实体, 例 如可以是 UE, 还可以是 UE中的逻辑单元。。
需要说明的是, 本专利申请文件中提到的限制性防火墙可以指防火墙的 端口受限也可以是报文类型受限, 例如, 防火墙只开放 80或 443等少量端 口; 也可以指防火墙对允许通过的报文类型受限, 例如, 只允许通过 TCP 报文, 或只允许通过 UDP报文; 还可以是上述两种情况的组合。
还需要说明的是,本专利申请文件中提到的防火墙需要进行 NAT, 即防 火墙存在 NAT穿越问题, 是指局域网中的客户端使用私有 IP地址, 不能够 直接与公网进行通信。 当需要与公网进行通信时, 防火墙提供 NAT功能, 为 UE分配一个公有 IP地址,然后将客户端私有 IP地址与公有 IP地址绑定, 才能与公网进行通信。
图 1是本发明实施例的一种穿越防火墙的系统架构图。
如图 1所述, 客户端位于局域网中, MTS位于网络侧, MTS可以集成 在媒体网关中, 也可以是独立的实体。
本发明实施例利用 SIP服务器在客户端与 MTS之间建立一条传输 SIP 媒体数据的隧道, 通过这条隧道既可以传输 RTP数据, 也可以传输 RTCP 数据。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
基于图 1所示的系统架构, 本发明一个实施例提供一种穿越防火墙的方 法, 该方法可以由局域网中的客户端执行, 例如可以是 UE。 如图 2所示, 该方法包括:
5201、 确定局域网中客户端的地址;
5202、 向会话初始化协议 SIP服务器发送包含客户端的地址的信息; S203、 接收 SIP服务器发送的包含网络侧的媒体穿越服务器 MTS的地 址的信息;
S204、根据客户端的地址以及 MTS的地址, 建立客户端与 MTS之间的 用于传输 SIP媒体数据的隧道, 隧道穿越局域网的防火墙, SIP媒体数据包 括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
应理解, S201中的客户端位于局域网中, 客户端的地址用于建立隧道, 即作为隧道在局域网侧的终结点的地址。 其中, 客户端可以是实体, 例如可 以是 UE, 也可以是能实现图 2中各个步骤的逻辑单元。 本发明实施例对客 户端的地址的具体形式不作限定, 例如, 可以是客户端的公有 IP地址和客 户端的公有端口。 应理解, 上述客户端的公有端口是指客户端的公有 IP地 址所对应的客户端的端口。
应理解, S203中的 MTS位于网络侧, MTS的地址是用于建立隧道, 即 作为隧道在网络侧的终结点的地址。 其中, MTS 可以是独立的实体, 也可 以是集成在现有 IMS-AGW上的功能模块。 本发明实施例对 MTS的地址的 具体形式不作限定,例如,可以是 MTS的公有 IP地址和公有端口。应理解, 上述 MTS的公有端口是指 MTS的公有 IP地址所对应的 MTS的端口也可以 是其他可以标识该客户端位置的信息, 本发明实施例以 MTS 的地址包括
MTS的公有 IP地址和公有端口为例进行说明。
应理解, S204 中的隧道用于传输媒体数据, 不用于传输信令数据, 这 样更符合目前 3GPP标准中媒体数据与信令数据分离的架构, 在媒体和信令 数据流增长不对称时, 更容易扩容。
应理解, 本发明实施例对确定局域网中客户端的地址(即客户端的公有
IP地址和客户端的公有端口) 的具体方式不作限定。
可选地, 作为一个实施例, 当局域网中的防火墙需要进行 NAT时, 确 定客户端的公有 IP地址和客户端的公有端口可包括: 获取客户端的私有 IP 地址, 并分配客户端的私有端口; 根据客户端的私有 IP地址和客户端的私 有端口查询客户端的公有 IP地址和客户端的公有端口。
需要说明的是, 本发明实施例对上述根据私有 IP地址和客户端的私有 端口查询客户端的公有 IP地址和客户端的公有端口的具体方式不作限定, 例如, 可以根据现有的 STUN协议或 TURN协议进行查询。
可选地, 作为另一个实施例, 还可以通过获取 MTS的公有 IP地址; 根 据客户端的私有端口以及 MTS的公有 IP地址, 与 MTS的公有 IP地址的特 定端口建立传输控制协议 TCP连接, 特定端口的端口号与防火墙允许通过 的端口的端口号相同;通过 TCP连接查询客户端的地址。通过事先建立 TCP 连接的方式查询客户端的公有 IP地址和公有端口, 然后在这条 TCP连接的 基础上建立隧道, 使得客户端侧与 MTS之间建立的隧道无需执行隧道路径 探测, 缩短了信令交互流程。 式不作限定。 例如, 可以向 SIP服务器发送用于请求 MTS的公有 IP地址的 请求消息;接收 SIP服务器发送的请求响应消息,请求响应消息中携带 MTS 的公有 IP地址。应理解, 上述请求消息可以是客户端向 SIP服务器(在 IMS 网络中为 P-CSCF )发送的注册消息, 也可以是呼叫请求消息。
可选地, 作为另一个实施例, 当局域网中的防火墙不需要进行 NAT时, 确定客户端的公有 IP地址和客户端的公有端口可包括: 获取客户端的公有 IP地址; 探测防火墙允许通过的特定端口; 将防火墙允许通过的特定端口作 为客户端的公有端口。
可选地, 作为一个实施例, 图 2的方法还可包括: 确定防火墙支持的传 输协议, 传输协议包括 TCP和用户数据包协议 UDP中的至少一种; 向 SIP 服务器发送用于指示传输协议的信息; 当通过隧道向 MTS发送数据时, 利 用传输协议对数据进行封装; 当接收 MTS通过隧道发送的数据时, 利用传 输协议对数据进行解封装。
上文中结合图 2, 从客户端的角度详细描述了根据本发明实施例的穿越 防火墙的方法, 下面将结合图 3, 从 SIP服务器的角度描述根据本发明实施 例的穿越防火墙的方法。
应理解, SIP服务器侧描述的客户端与 SIP服务器的交互及相关特性、 功能等与客户端侧的描述相应, 为了筒洁, 适当省略重复的描述。
图 3是本发明另一个实施例的穿越防火墙的方法的流程图。 图 3的方法 可以由 SIP服务器执行, 例如可以是 IMS网络中的 P-CSCF。
S301、 接收包含局域网中客户端的地址的信息;
S302、 分配媒体穿越服务器 MTS的公有端口;
S303、 向客户端发送包含 MTS的地址的信息, 所述 MTS地址包括所述 MTS的公有端口以及获取的 MTS的公有 IP地址, 并向 MTS发送包含客户 端的地址以及 MTS的公有端口,以便客户端与 MTS之间建立用于传输会话 初始化协议 SIP媒体数据的隧道的信息, 隧道穿越局域网中的防火墙, SIP 媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
可选地, 作为一个实施例, S301 中的接收包含局域网中客户端的地址 的信息包括: 接收包含客户端的地址的信息, 客户端的地址包括客户端的公 有网际协议 IP地址和客户端的公有端口。
可选地, 作为另一个实施例, S302中的分配 MTS的公有端口可包括: 将防火墙允许通过的端口的端口号作为 MTS的公有端口的端口号。 还可以 将客户端的公有端口作为所述 MTS的公有端口, 本发明实施例对此并不作 限定。
可选地, 作为另一个实施例, 在接收局域网中客户端的地址之前, 还可 包括: 接收客户端发送的用于请求 MTS的公有 IP地址的请求消息; 向客户 端发送请求响应消息, 请求响应消息中携带 MTS的公有 IP地址。
可选地, 作为另一个实施例, 图 3的方法还可包括: 接收客户端发送的 用于指示防火墙支持的传输协议的信息, 传输协议包括 TCP和用户数据包 协议 UDP中的至少一种; 向 MTS发送用于指示传输协议的信息。
可选地, 作为另一个实施例, 图 3的方法还包括: 向所述 MTS发送包 ^某体网关的地址以及所述客户端的地址的信息。上述地址可包括客户端用 于进行 RTP、 RTCP数据传输的 IP地址和端口和媒体网关用于进行 RTP、 RTCP数据传输的 IP地址和端口。
上文中结合图 2和图 3, 分别从客户端和 SIP服务器的角度详细描述了 根据本发明实施例的穿越防火墙的方法, 下面将结合图 4, 从 MTS 的角度 描述根据本发明实施例的穿越防火墙的方法, MTS 可以是集成在媒体网关 ( Media Gateway, MGW ) 中的新增的逻辑单元, 也可以是布置在网络侧的 新的实体网元。
应理解, 媒体网关侧描述的媒体网关与 UE以及 SIP服务器的交互及相 关特性、 功能等与 UE侧和 SIP服务器侧的描述相应, 为了筒洁, 适当省略 重复的描述。
图 4是本发明另一个实施例的穿越防火墙的方法的流程图。 图 4的方法 可以由 MTS执行。
S401、接收会话初始化协议 SIP服务器发送的包含局域网中客户端的地 址以及 MTS的公有端口的信息; S402、根据客户端的地址以及 MTS的地址, 建立 MTS与客户端之间的 用于传输 SIP媒体数据的隧道, 隧道穿越局域网的防火墙, SIP媒体数据包 括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
可选地, 作为一个实施例, 接收 SIP服务器发送的包含局域网中客户端 的地址以及 MTS 的公有端口的信息可包括: 接收包含客户端的地址以及 MTS的公有端口的信息, 客户端的地址包括客户端的公有 IP地址和客户端 的公有端口; 则, 根据客户端的地址以及 MTS的地址, 建立 MTS与客户端 之间的用于传输 SIP媒体数据的隧道包括: 根据客户端的公有 IP地址、 客 户端的公有端口以及 MTS的地址建立隧道, MTS的地址包括 MTS的公有 IP地址和 MTS的公有端口。
可选地, 作为另一个实施例, 在接收 SIP服务器发送的包含局域网中客 户端的地址以及 MTS的公有端口的信息之前, 还可包括: 与客户端建立传 输控制协议 TCP连接, 以便客户端根据 TCP连接查询客户端的公有 IP地址 和客户端的公有端口。
可选地, 作为另一个实施例, 图 4的方法还可包括: 接收 SIP服务器发 送的用于指示防火墙支持的传输协议的信息, 传输协议包括 TCP和用户数 据包协议 UDP 中的至少一种; 当通过隧道向客户端发送数据时, 利用传输 协议对数据进行封装; 当接收客户端通过隧道发送的数据时, 利用传输协议 对数据进行解封装。
可选地, 作为另一个实施例, 图 4的方法还可包括: 接收 SIP服务器发 送的包含媒体网关的地址以及客户端的地址的信息。
下面结合具体例子, 更加详细地描述本发明实施例。 应注意, 图 5至图
9的例子仅仅是为了帮助本领域技术人员理解本发明实施例, 而非要将本发 明实施例限于所例示的具体数值或具体场景。本领域技术人员根据所给出的 图 5至图 9的例子, 显然可以进行各种等价的修改或变化, 这样的修改或变 化也落入本发明实施例的范围内。
还应注意, 图 5至图 9的实施例是以局域网中的客户端与公网中的 IMS 网络进行通信来举例说明的, 但本发明实施例并不限于此, 例如, 还可以是 其他非 IMS网络的 SIP类业务场景, 如 non-3GPP接入 EPC应用场合中, UE使用 WiFi接入方式进行非 IMS的 VoIP呼叫,由于网络侧部署了防火墙, 只开放了 80端口, 导致无法进行 VoIP会话, 采用本方案能够解决上述场景 下的穿越问题。
还应注意, 图 5至图 9中的媒体穿越客户端 (Media Traversal Client,
MTC )可以集成在 UE上, 例如, 可以是 UE上的逻辑单元, 也可以是实体 装置, 本发明以 UE集成 MTC为例进行说明, 即图 5-图 9中的 UE可以执 行图 1-图 4中的由客户端执行的各个步骤; 图 5-图 9中的 MTS可以是集成 在 IMS- AGW上的逻辑单元, 也可以是独立的实体, 本发明实施例对此不作 限定。
还应注意, 图 5至图 9中的媒体穿越客户端 (Media Traversal Client, MTC ) 集成在 UE上。 UE可以实现图 1-图 3中的描述的由客户端执行的各 个步骤。
图 5是本发明另一个实施例的穿越防火墙的方法的流程图。在图 5的实 施例中,客户端所在局域网的防火墙存在 NAT穿越问题,且 UE待发起的会 话类型为 VoIP。
S501、 UE按照现有技术从 80或者 443端口完成 IMS注册。
S502~S503、 P-CSCF根据收到 UE发过来注册(REGISTER )请求判断 是否存在 NAT穿越问题, 如果网络层的源 IP地址和传输层的源端口与请求 报文中 Contact的 IP地址和端口不一致, 则存在 NAT穿越问题, 采用重量 级的防火墙穿越方案(指存在 NAT穿越问题时所采用的穿越防火墙的方案), 即本发明实施例的方案, 如果一致则不存在 NAT穿越问题, 采用轻量级的 穿越方案 (指不存在 NAT穿越问题时所采用的穿越防火墙的方案), 即图 6 实施例的穿越方案。
S504~S505、 UE确定准备发起的会话类型为 VoIP, 则采用隧道方式进 行穿越,转 S506,如果确定会话类型为 MSRP会话, 则采用非隧道的 MSRP 穿越方法, 即图 6实施例中的 S601至 S611的方案。
S506、 客户端分配客户端的私有 PT1 , 即穿越隧道的客户端 MTC的私 有 IP地址 P1 私有端口为 PT1。 分配的方法为: 存在 NAT场景下可以使用 随机分配方式分配穿越隧道端口, 不存在 NAT场景下,根据 UE发起会话请 求前进行防火墙可穿越端口探测结果选取端口, 或者直接采用特定的端口如 80或者 443端口作为穿越隧道。
S507~S509、 UE中 MTC模块采用 STUN协议查询到 MTC的公有 IP地 址为 IPln, MTC的公有端口 PTln, 并确定防火墙允许通过哪种传输协议, 是 TCP协议还是 UDP协议。
S510、 UE发起 VoIP的 INVITE请求, 在 SDP 中携带建立穿越隧道的 客户端信息, 包括 MTC公有地址、 私有地址和隧道封装类型, 隧道封装类 型包括 UDP封装模式( UDP-encaps )、 TCP封装模式( TCP-encaps ) , 上述 隧道的封装类型与图 1-图 3中描述的防火墙支持的传输协议相同, 当然, 该 隧道还可以采用不进行隧道封装的透明传输模式(transp )。 SDP通过下面两 种方式携带穿越隧道客户端信息:
1 )在现有 SDP协议中的 a=candidate描述行, 添加一个特殊的参数描述 隧道封装类型, 格式为 a=candidate : 〈现有协议的参数 > <tunnel> <tunnel type>。
2 )在 SDP body 中专门添加一个 SDP描述行, 专门用于描述包括公有 地址、 私有地址、 隧道封装模式等穿越隧道相关信息, 例如采用的格式为: a=tunnel: <公有地址 > <私有地址 > <tunnel type>。
S511、 P-CSCF根据 UE发过来的隧道封装类型信息决定是否需要为隧 道分配 MTS端口, 如果为透传模式, 则不给 MTS分配端口, 只给 MGW分 配端口; 如果为 UDP或者 TCP封装模式, 则根据隧道客户端地址信息判定 是否存在 NAT穿越, 判别方法为 SDP中 candidate行中如有 srflx标志, 则 存在 NAT问题, MTS端的端口为特定的穿越端口,如 HTTP协议默认端口 80或者 HTTPS默认端口 443; 如有 host标志, 则认为不存在 NAT问题, MTS的端口分配成和 MTC—样端口或者分配特定的穿越端口, 如 443或者 80端口。
S512、 P-CSCF通过 H.248 将穿越隧道双方地址和封装格式, 以及将需 要封装的媒体数据的通信双方地址相关信息通过 H.248协议或者其他控制协 议传给 MTS, MTS根据 P-CSCF发过的信息, 建立媒体流和穿越隧道之间 的对应关系。
5513、 和正常的 IMS会话一样, P-CSCF将建立 RTP/RTCP媒体信息发 给媒体网关 MGW, 建立 RTP/RTCP连接。
5514、 P-CSCF通过 或者200 0 会话响应消息发给 UE, SDP携带 MTS的公有地址和隧道封装模式。
S515、 MTS判定存在 NAT穿越问题, 例如, 可以通过 SIP服务器发送 的指示防火墙是否具有 NAT穿越问题的标识判定,则和 UE执行连接可达性 检查, 采用现有技术的 STUN路径可行的检查机制。
S516、 UE确认隧道连接是可达的后, 发 ACK消息, 确认 VoIP媒体协 商完成。
S517~S518、 UE中 MTC模块和 MTS作为穿越隧道的业务终结点, 执 行 VoIP数据包的封装 /解开处理, 封装方式如图 10所示, 整个 VoIP数据包 作为净荷被封装在隧道数据包中, 隧道报头的 IP地址为 MTS和 MTC的公 有地址。 MTS/MTC解开隧道数据包后,根据原 VoIP数据包的地址进行转发。
S519、 通话过程中 UE和 MTS进行周期性 NAT地址绑定保活交互。 本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
图 6是本发明另一个实施例的穿越防火墙的方法的流程图。在图 6的实 施例中, UE所在局域网的限制性防火墙存在 NAT穿越问题, 且 UE待发起 的会话类型为 MSRP。 由于 MSRP能够通过 HTTP端口 80或者 443进行传 输, 因此 MSRP不使用 UDP/TCP隧道方式进行穿越, 由 UE和媒体网关直 接通过 HTTP/HTTPS端口协商建立 MSRP连接。
S601、 UE通过注册消息确定存在 NA ( P ) T, 准备进行 MSRP会话,
MSRP用于传送 IM、 内容共享、 文件传送等非实时业务数据, UE给 MSRP 会话分配专门的私有端口 PTx, MSRP专门的 MSRP穿越端口可以根据防火 墙实际开放端口进行设置, 例如设置成 HTTP协议默认端口 80端口等。
S602~S604、 UE通过 STUN方式查询到 MSRP穿越隧道客户端的公有 地址为 ΙΡ1η/ΡΤχη。
S605、 UE通过 INVITE消息,将 MSRP穿越隧道客户端私有 IP地址 IP1 , 私有端口 PTx, 公有 IP地址 IPln, 公有端口 PTxn以及隧道封装类型为透传 模式等信息通知 P-CSCF。
S606、P-CSCF获知隧道封装类型为透传模式后,也像 UE—样,为 MGW 分配专门的 MSRP穿越端口,如 80端口或者 443端口, 不为 MTS分配用于 MSRP穿越的端口, 也就是说 MSRP穿越不经过 MTS, UE和 MGW直接建 立 MSRP连接。
5607、 和正常 IMS MSRP会话方案一样, P-CSCF将建立 MSRP连接的 信息告诉 MGW。
5608、 P-CSCF通过 lxx或者 200 OK响应消息, 将 MGW的地址和端 口信息告诉 UE, 并通知隧道类型为透传模式。
S609~S610、 UE和 MGW执行 MSRP路径可达性检查, 确认 MSRP连 接可到达后, UE发建立 MSRP通道完成确认消息。
S611、 MTC对收到 MSRP消息不做任何封装处理, 直接透传给 IMS客 户端。
S612、 MSRP传输过程, UE和 MGW使用 STUN协议, 进行周期性 NA
( P ) T地址绑定保活交互。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
图 7是本发明另一个实施例的穿越防火墙的方法的流程图。在图 7的实 施例中, UE所在局域网的限制性防火墙不存在 NAT穿越问题。 同图 4实施 例的主要区别为省略公有地址绑定查询、 连接可达性检查、 STUN keep-alive 等 NAT相关处理流程,分配 MTS的穿越隧道端口和 MTC的端口是一样的, 而不是随机分配, 穿越流程包括下面步骤:
S701~S702、 UE按照现有技术, 通过 443或者 80端口完成 IMS注册,
P-CSCF通过检查 SIP消息中网络层地址和 contact中的地址为一致, 则认为 防火墙没有 NAT, 则决定采用轻量级防火墙穿越方案。
S703~S704、 UE在完成注册后采用现有的 STUN技术或者其他端口扫 描技术, 探测防火墙允许的端口和其传输协议, UE根据现网情况配置端口 探测范围, 如 443、 80的端口。
S705、 UE准备发起 VoIP会话, 为穿越隧道分配 MTC的端口 PT1; 分 配方法为: UE确定不存在 NA(P)T场景后, 根据防火墙探测结果, 优先选 择 UDP报文可通过的端口作为穿越隧道端口, 或者直接分配一个特定的专 门用于穿越隧道的端口, 如 80或者 443端口。
S706、 UE通过 INVITE消息将客户端私有 IP地址 IP1 , 私有端口 PT1 和隧道封装类型 (即防火墙支持的传输协议)通知 P-CSCF, 通知的方法有 下面两种:
1 )在现有 SDP协议中的 a=candidate行, 添加一个特殊的参数描述描述 隧道封装类型, 格式为 a=candidate : 〈现有协议的参数 > <tunnel> <tunnel type>。
2 )在 SDP body 中专门添加一个 SDP描述行, 专门用于描述穿越隧道 相关信息, 例如采用的格式为: a=tunnel:〈公有 IP> <公有 port > <tunnel type>。
5707、 P-CSCF根据 UE发过来的隧道封装类型和隧道客户端地址信息, 获知隧道为非透传模式且为非 NAT下的场景下的穿越, 则给 MTS分配和 MTC相同的端口号。
5708、 P-CSCF通过 H.248 将穿越隧道双方地址和封装格式, 以及将需 要封装的媒体数据的通信双方地址信息通过 H.248协议或者其他控制协议传 给 MTS, 建立媒体流和穿越隧道之间的对应关系。
5709、 和正常的 IMS会话一样, P-CSCF将建立 RTP/RTCP媒体信息发 给媒体网关 MGW, 建立 RTP/RTCP连接。
5710、 P-CSCF通过 lxx或者 200 OK响应消息将穿越隧道服务器端地 址, 即 MTS的 IP和端口即隧道封装类型发给 UE。
S711、 MTS根据 P-CSCF转发过来的隧道客户端地址信息判定为非 NAT 场景下的穿越, 则不执行连接路径可达性检查。
S712、 UE不执行路径可达性检查, 直接发隧道建立完成和媒体协商完 成确认信息给 P-CSCF。
S713~S714、 UE中 MTC模块和 MTS作为穿越隧道的业务终结点, 执 行 VoIP数据包的封装 /解开处理, 封装方式如附图 10所示, 整个 VoIP数据 包作为净荷被封装在隧道数据包中, 隧道报头的 IP地址为 MTS和 MTC的 公有地址。 MTS/MTC解开隧道数据包后,根据原 VoIP数据包的地址进行转 发。 MTC和 MTS不再执行 NAT地址绑定保活流程。
S715、 UE决定发起 MSRP会话, 给 MSRP会话分配专门的防火墙穿越 端口 PTx, MSRP专门的 MSRP穿越端口可以根据防火墙实际开放端口进行 设置, 例如设置成 HTTP协议默认端口 80端口等。
S716、 UE通过 INVITE消息,将 MSRP穿越隧道客户端公有 IP地址 IP1 , 公有端口 PTx以及隧道封装类型为透传模式等信息通知 P-CSCF。 5717、 P-CSCF根据 UE的穿越隧道地址和封装模式信息, 获知隧道为 透传模式且非 NAT场景, 则给 MGW分配和 UE—样的 MSRP端口, 不分 配 MTS的 MSRP端口。
5718、 和正常 IMS MSRP会话方案一样, P-CSCF将建立 MSRP连接的 信息告诉 MGW。
S719、 P-CSCF通过 lxx或者 200 会话响应消息将 MGW的 IP和 MSRP 端口已经穿越隧道为透传模式信息通知 UE。
S720、 UE不执行路径可达性检查, 直接发送媒体协商完成确认消息给 P-CSCF。
S721、 MTC根据隧道类型为透传模式, 对该 MSRP会话连接的报文进 行透传处理, 至此 UE和 IMS网络的 MSRP会话建立完成。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
图 8是本发明另一个实施例的穿越隧道的方法的流程图。 同图 4的实施 例的主要区别是 UE没有发起 INVITE会话请求之前, 先和 MTS建立 TCP 连接, 然后在通过 SDP offer/answer方式, UE和网络协商将 VoIP媒体流通 过这条事先建好的 TCP连接封装, UE和 MTS不用再进行穿越路径可达性 检查, 但是 VoIP媒体流只能采用 TCP隧道封装, 不能采用 UDP隧道封装, MGW和 MTS都要集成 ICE-lite功能。
5801、 UE发起 IMS注册请求。
5802、 P-CSCF根据 REGISTER消息的地址信息判定存在 NAT问题, 通过注册响应消息将 MTS信息通知 UE,在注册响应消息携带 MTS和 MGW 的 IP地址信息, 携带方法为在 SIP消息中增加一个扩展头域或者在现有的 SIP头域基础上增加参数,携带 MTS和 MGW地址信息。如果判定为非 NAT 问题则采用实施例二中的轻量级穿越方案。
5803、 UE确定将要发起 VoIP会话, 准备采用 TCP隧道方式穿越防火 墙, UE分配 TCP穿越隧道的端口, 即 MTC的端口 PT1。
S804~S805、MTC通过 PT1端口向 MTS的特定端口发起一条 TCP连接, MTS 的特定端口可以根据防火墙允许通过的端口范围进行配置, 如设置为 HTTP协议默认端口 80或者 HTTPS协议默认端口 443端口,这一条 TCP在 通话过程中一直保持着, 知道通话结束。
S806~S807、 MTS集成 ICE-Lite功能, UE通过步骤 S805建立的 TCP 连接, 向 MTS查询 MTC的公有 IP地址 IPln, 公有端口 PTln或者请求分 配 MTC的公有 IP地址 IPa,公有端口 PTln, 本发明举例采用 STUN方式查 询 MTC公有地址, 采用 TURN方式申请 MTC公有地址, 建立穿越隧道的 方法和 STUN方式类似, 这里不再举例。
5808、 UE起 VoIP的 INVITE请求, 在 SDP 中携带建立穿越隧道的客 户端信息, 包括 MTC公有 IP地址和公有端口(ΙΡ1η,ΡΤ1η)、 私有 IP地址和 私有端口(ΙΡΙ,ΡΤΙ)和隧道封装类型为 TCP 隧道封装模式, 采用下面两种方 式携带穿越隧道客户端信息:
1 )在现有 SDP协议中的 a=candidate描述行, 添加一个特殊的参数描述 隧道封装类型, 格式为 a=candidate : 〈现有协议的参数 > <tunnel> <tunnel type>。
2 )在 SDP body 中专门添加一个 SDP描述行, 专门用于描述包括公有 地址、 私有地址、 隧道封装模式等穿越隧道相关信息, 例如采用的格式为: a=tunnel: <公有地址 > <私有地址 > <tunnel type>。
5809、 P-CSCF分配设置的特定端口 80为 TCP隧道的端口, 即 TCP隧 道网络侧的地址为 S805建立 TCP连接的 MTS地址。
5810、 P-CSCF将 TCP隧道的通信双方的地址和封装模式为 TCP封装 以及将需要封装的媒体数据的通信双方地址相关信息通过 H.248协议或者其 他控制协议传给 MTS, MTS根据 P-CSCF发过的信息, 建立媒体和穿越隧 道之间的对应关系 811、和正常的 IMS会话一样, P-CSCF将建立 RTP/RTCP 媒体信息发给媒体网关 MGW , 建立 RTP/RTCP连接。
5812、 P-CSCF将 TCP隧道的 MTS侧的地址信息和封装模式为 TCP隧 道模式通过会话响应消息 200 OK或者 lxx消息通知 UE。
5813、 UE和 MTS无需执行路径, UE直接发会话成功确认消息 ACK 给网络。
5814、 UE和 MTS作为 TCP穿越隧道的业务终结点, 执行 VoIP数据包 的 TCP封装 /解开处理, 封装方式如附图 10, TCP封装格式所示, 整个 VoIP 数据包作为净荷被封装在 TCP隧道数据包中, 隧道报头的 IP地址为 MTS 和 MTC的公有地址。 MTS/MTC解开隧道数据包后, 根据原 VoIP数据包的 地址进行转发。
5815、 通话过程中 UE和 MTS进行周期性 NA ( P ) T地址绑定保活交 互。
5816、 UE决定发起 MSRP会话, 给 MSRP会话分配端口 PTx。
S817、 UE中 MTC模块通过 PTx端口和媒体网关 MGW特定端口建立 一条 TCP连接, 这一条 TCP保持长连接, 知道会话结束后才终止, MGW 集成 ICE-lite功能。 MGW用于 MSRP穿越的特定端口可以根据防火墙允许 通过的端口范围进行设置, 例如设置为 HTTP协议默认端口 80或者 HTTPS 协议默认端口 443端口, 本发明实施例举例为 80端口。
S818、 MTC通过和 S806、 S807相同的方法向 MGW查询 MSRP的公 有地址 IPln, PTxn。
S819、 UE通过 INVITE消息,将 MSRP穿越隧道客户端私有 IP地址 IP1 , 和私有端口 PTx, 公有 IP地址 IPln和公有端口 PTxn以及隧道封装类型为 透传模式等信息通知 P-CSCF。
S820、 P-CSCF获知隧道封装类型为透传模式后, 为 MGW分配特定的
MSRP穿越端口 80,不为 MTS分配用于 MSRP穿越的端口,也就是说 MSRP 穿越不经过 MTS, UE和 MGW直接建立 MSRP连接。
S821、 和正常 IMS MSRP会话方案一样, P-CSCF将建立 MSRP连接的 信息告诉 MGW。
S822、 P-CSCF通过 lxx或者 200 OK响应消息, 将 MGW的地址信息
(IPb,80)告诉 UE, 并通知隧道类型为透传模式。
5823、 UE和网络无需做路径可达性检查,直接发 ACK会话成功确认消 息给网络。
5824、 MTC对收到 MSRP消息不做任何封装处理, 直接透传给 IMS客 户端。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
图 9是本发明另一个实施例的穿越隧道的方法的流程图。 同图 8的实施 例的主要区别是 UE获取 MTS或者 MGW的方式不同, P-CSCF不通过注册 消息将 MTS和 MGW地址告诉 UE, 而是通过建立会话过程中 SDP消息携 带将 MTS或者 MGW通知 UE, UE再 MTS或者 MGW建立 TCP连接。 S901、 UE和 P-CSCF完成 IMS注册。
S902、 UE决定发起 VoIP会话, 分配 TCP穿越隧道端口 PT1 , 通知准 备通知 P-CSCF需要做防火墙穿越。
S903、 UE通过 INVITE消息中的 SDP携带的专门参数或者专门 SDP描 述行, 通知 P-CSCF需要做防火墙穿越。
S904、 P-CSCF通过 lxx 响应消息中 SDP的专门参数或者专门 SDP描 述行, 将 MTC的地址信息告诉 UE, 同声明网络侧也支持防火墙穿越,。
S905、 MTC通过 PT1端口向 MTS的特定端口发起一条 TCP连接, MTS 的特定端口可以根据防火墙允许通过的端口范围进行配置, 如设置为 HTTP 协议默认端口 80或者 HTTPS协议默认端口 443端口, 这一条 TCP在通话 过程中一直保持着, 知道通话结束。
S906~S907、 MTS集成 ICE-Lite功能, UE通过步骤 S905建立的 TCP 连接, 向 MTS查询 MTC的公有 IP地址 IPln,和公有端口 PTln或者向 MTS 申请 MTC的公有 IP地址 IPa,公有端口 PTln, 本发明举例采用 STUN方式 查询 MTC公有地址, 采用 TURN方式申请 MTC公有地址, 建立穿越隧道 的方法和 STUN方式类似, 这里不再举例。。
S908、 UE发送 PRACK消息, 在 PRACK消息 SDP body中携带建立穿 越隧道的客户端信息, 包括 MTC公有 IP地址和公有端口(ΙΡ1η,ΡΤ1η)、私有 IP地址和私有短裤哦 (ΙΡΙ,ΡΤΙ)和隧道封装类型为 TCP隧道封装模式, 采用 下面两种方式携带穿越隧道客户端信息:
1 )在现有 SDP协议中的 a=candidate描述行, 添加一个特殊的参数描述 隧道封装类型, 格式为 a=candidate : 〈现有协议的参数 > <tunnel> <tunnel type>。
2 )在 SDP body 中专门添加一个 SDP描述行, 专门用于描述包括公有 地址、 私有地址、 隧道封装模式等穿越隧道相关信息, 例如采用的格式为: a=tunnel: <公有地址 > <私有地址 > <tunnel type>。
S909、 P-CSCF分配设置的特定端口 80为 TCP隧道的端口, 即 TCP隧 道网络侧的地址为步骤 S905建立 TCP连接的 MTS地址。
S910、 P-CSCF将 TCP隧道的通信双方的地址和封装模式为 TCP封装, 以及将需要封装的媒体数据的通信双方地址相关信息通过 H.248协议或者其 他控制协议传给 MTS, MTS根据 P-CSCF发过的信息, 建立媒体和穿越隧 道之间的对应关系 911、和正常的 IMS会话一样, P-CSCF将建立 RTP/RTCP 媒体信息发给媒体网关 MGW , 建立 RTP/RTCP连接。
5912、 P-CSCF将 TCP隧道的 MTS侧的地址信息和封装模式为 TCP隧 道模式通过会话响应消息 200 OK消息通知 UE。
5913、 UE和 MTS无需执行路径, UE直接发会话成功确认消息 ACK 给网络。
5914、 UE和 MTS作为 TCP穿越隧道的业务终结点, 执行 VoIP数据包 的 TCP封装 /解开处理, 封装方式如附图 10, TCP封装格式所示, 整个 VoIP 数据包作为净荷被封装在 TCP隧道数据包中, 隧道报头的 IP地址为 MTS 和 MTC的公有地址。 MTS/MTC解开隧道数据包后, 根据原 VoIP数据包的 地址进行转发。 通话过程中 UE和 MTS进行周期性 NA ( P ) T地址绑定保 活交互。
S915、 UE决定发起 MSRP会话, 给 MSRP会话分配私网端口 PTx。 S916、 UE通过 INVITE消息中的 SDP携带的专门参数或者专门 SDP描 述行, 通知 P-CSCF需要做防火墙穿越。
S917、 P-CSCF通过 lxx 响应消息中 SDP的专门参数或者专门 SDP描 述行, 将 MGW的地址信息告诉 UE, 同声明网络侧也支持防火墙穿越。
S918、 UE中 MTC模块通过 PTx端口和媒体网关 MGW特定端口建立 一条 TCP连接, 这一条 TCP保持长连接, 知道会话结束后才终止, MGW 集成 ICE-lite功能。 MGW用于 MSRP穿越的特定端口可以根据防火墙允许 通过的端口范围进行设置, 例如设置为 HTTP协议默认端口 80或者 HTTPS 协议默认端口 443端口, 本发明实施例举例为 80端口。
S919、 MTC通过和步骤 S906、 S907相同的方法向 MGW查询 MSRP 的公有 IP地址 IPln, 公有端口 PTxn。
S920、 UE通过 PRACK消息,将 MSRP穿越隧道客户端私有 IP地址 IP1 , 私有端口 PTx, 公有 IP地址 IPln, 公有 PTxn以及隧道封装类型为透传模式 等信息通知 P-CSCF。
S921、 P-CSCF获知隧道封装类型为透传模式后, 为 MGW分配特定的 MSRP穿越端口 80,不为 MTS分配用于 MSRP穿越的端口,也就是说 MSRP 穿越不经过 MTS, UE和 MGW直接建立 MSRP连接。 5922、 和正常 IMS MSRP会话方案一样, P-CSCF将建立 MSRP连接的 信息告诉 MGW。
5923、 P-CSCF通过 200 OK响应消息, 将 MGW的地址信息 (IPb,80)告 诉 UE, 并通知隧道类型为透传模式。
S924, UE和网络无需做路径可达性检查,直接发 ACK会话成功确认消 息给网络。
S925 , MTC对收到 MSRP消息不做任何封装处理, 直接透传给 IMS 客户端。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
上文中结合图 1至图 10,详细描述了根据本发明实施例的穿越防火墙的 方法, 下面将结合图 11至图 16, 详细描述根据本发明实施例的客户端、 SIP 服务器和 MTS。
图 11 是本发明一个实施例的客户端的框图。 该客户端包括确定单元
1101、 发送单元 1102、 接收单元 1103以及建立单元 1104。
确定单元 1101 , 用于确定局域网中客户端的地址;
发送单元 1102,用于向会话初始化协议 SIP服务器发送包含客户端的地 址的信息;
接收单元 1103,用于接收 SIP服务器发送的包含网络侧的媒体穿越服务 器 MTS的地址的信息;
建立单元 1104, 用于根据客户端的地址以及 MTS的地址, 建立客户端 与 MTS之间的用于传输 SIP媒体数据的隧道, 隧道穿越局域网中的防火墙,
SIP媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
可选地, 作为一个实施例, 确定单元 1101具体用于确定客户端的地址, 客户端的地址包括客户端的公有网际协议 IP地址和客户端的公有端口。
可选地, 作为另一个实施例, 接收单元 1103具体用于接收包含 MTS的 地址的信息, MTS的地址包括 MTS的公有 IP地址和 MTS的公有端口; 建 立单元 1104具体用于根据客户端的公有 IP地址、 客户端的公有端口、 MTS 的公有 IP地址以及 MTS的公有端口建立隧道。
可选地, 作为另一个实施例, 客户端还可包括: 判断单元, 用于判断防 火墙是否需要进行网络地址转换 NAT; 则, 在确定防火墙需要进行 NAT时, 确定单元 1101具体用于获取客户端的私有 IP地址, 并分配客户端的私有端 口; 根据客户端的私有 IP地址和客户端的私有端口查询客户端的公有 IP地 址和客户端的公有端口。
可选地, 作为另一个实施例, 确定单元 1101具体用于获取 MTS的公有 IP地址; 根据客户端的私有端口以及 MTS的公有 IP地址, 与 MTS的公有 IP地址的特定端口建立传输控制协议 TCP连接, 特定端口的端口号与防火 墙允许通过的端口的端口号相同; 通过 TCP连接查询客户端的地址。
可选地, 作为另一个实施例, 确定单元 1101具体用于向 SIP服务器发 送用于请求 MTS的公有 IP地址的请求消息; 接收 SIP服务器发送的请求响 应消息, 请求响应消息中携带 MTS的公有 IP地址。
可选地, 作为另一个实施例, 在确定防火墙不需要进行 NAT时, 确定 单元 1101具体用于获取客户端的公有 IP地址; 探测防火墙允许通过的特定 端口; 将防火墙允许通过的特定端口作为客户端的公有端口。
可选地, 作为另一个实施例, 确定单元 1101还用于确定防火墙支持的 传输协议, 传输协议包括 TCP和用户数据包协议 UDP中的至少一种; 发送 单元 1102还用于向 SIP服务器发送用于指示传输协议的信息;
客户端还包括: 封装单元, 用于当通过隧道向 MTS发送数据时, 利用 传输协议对数据进行封装; 解封装单元, 用于当接收 MTS通过隧道发送的 数据时, 利用传输协议对数据进行解封装。
图 12是本发明一个实施例的 SIP服务器的框图。 该 SIP服务器包括接 收单元 1201、 分配单元 1202以及发送单元 1203。
接收单元 1201 , 用于接收包含局域网中客户端的地址的信息; 分配单元 1202, 用于分配媒体穿越服务器 MTS的公有端口;
发送单元 1203, 用于向客户端发送包含 MTS的地址的信息, 所述 MTS 地址包括所述 MTS的公有端口以及获取的 MTS的公有 IP地址, 并向 MTS 发送包含客户端的地址以及 MTS的公有端口的信息, 以便客户端与 MTS之 间建立用于传输会话初始化协议 SIP媒体数据的隧道, 隧道穿越局域网中的 防火墙, SIP媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP 数据。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
可选地, 作为一个实施例, 接收单元 1201具体用于接收包含客户端的 地址的信息, 客户端的地址包括客户端的公有网际协议 IP地址和客户端的 公有端口; 向客户端发送 MTS 的地址包括: 向客户端发送 MTS 的地址, MTS的地址包括 MTS的公有 IP地址和 MTS的公有端口。
可选地, 作为另一个实施例, 分配单元 1202具体用于将防火墙允许通 过的端口的端口号作为 MTS的公有端口的端口号。
可选地, 作为另一个实施例, 接收单元 1201还用于接收客户端发送的 用于请求 MTS的公有 IP地址的请求消息; 向客户端发送请求响应消息, 请 求响应消息中携带 MTS的公有 IP地址。
可选地, 作为另一个实施例, 接收单元 1201还用于接收客户端发送的 用于指示防火墙支持的传输协议的信息, 传输协议包括 TCP和用户数据包 协议 UDP中的至少一种; 发送单元 1203还用于向 MTS发送用于指示传输 协议的信息。
可选地, 作为另一个实施例, 发送单元 1203还用于向所述 MTS发送包 含媒体网关的地址以及所述客户端的地址的信息。
图 13是本发明一个实施例的 MTS的框图。 该 MTS包括接收单元 1301 和建立单元 1302。
接收单元 1301 ,用于接收会话初始化协议 SIP服务器发送的包含局域网 中客户端的地址以及 MTS的公有端口的信息;
建立单元 1302, 用于根据客户端的地址以及 MTS 的地址, 建立 MTS 与客户端之间的用于传输 SIP媒体数据的隧道, 隧道穿越局域网的防火墙, SIP媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
可选地, 作为一个实施例, 接收单元 1301具体用于接收包含客户端的 地址以及 MTS的公有端口的信息, 客户端的地址包括客户端的公有 IP地址 和客户端的公有端口; 建立单元 1302具体用于根据客户端的公有 IP地址、 客户端的公有端口以及 MTS的地址建立隧道, MTS的地址包括 MTS的公 有 IP地址和 MTS的公有端口。
可选地, 作为另一个实施例, 建立单元 1302还用于与客户端建立传输 控制协议 TCP连接, 以便客户端根据 TCP连接查询客户端的公有 IP地址和 客户端的公有端口。
可选地, 作为另一个实施例, 接收单元 1301还用于接收 SIP服务器发 送的用于指示防火墙支持的传输协议的信息, 传输协议包括 TCP和用户数 据包协议 UDP中的至少一种;
MTS 还包括: 封装单元, 用于当通过隧道向客户端发送数据时, 利用 传输协议对数据进行封装; 解封装单元, 用于当接收客户端通过隧道发送的 数据时, 利用传输协议对数据进行解封装。
可选地, 作为另一个实施例, 接收单元 1301还用于接收所述 SIP服务 器发送的包含媒体网关的地址以及所述客户端的地址的信息。
图 14 是本发明另一个实施例的客户端的框图。 该客户端包括处理器 1401、 发送器 1402以及接收器 1403。
处理器 1401 , 用于确定局域网中客户端的地址;
发送器 1402,用于向会话初始化协议 SIP服务器发送包含客户端的地址 的信息;
接收器 1403,用于接收 SIP服务器发送的包含网络侧的媒体穿越服务器 MTS的地址的信息;
处理器 1401还用于根据客户端的地址以及 MTS的地址,建立客户端与 MTS之间的用于传输 SIP媒体数据的隧道, 隧道穿越局域网中的防火墙, SIP媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
可选地, 作为一个实施例, 处理器 1401具体用于确定客户端的地址, 客户端的地址包括客户端的公有网际协议 IP地址和客户端的公有端口。
可选地, 作为另一个实施例, 接收器 1403具体用于接收包含 MTS的地 址的信息, MTS的地址包括 MTS的公有 IP地址和 MTS的公有端口; 处理 器 1401具体用于根据客户端的公有 IP地址、客户端的公有端口、 MTS的公 有 IP地址以及 MTS的公有端口建立隧道。
可选地, 作为另一个实施例, 处理器 1401还用于判断防火墙是否需要 进行网络地址转换 NAT; 在确定防火墙需要进行 NAT时, 处理器 1401具体 用于获取客户端的私有 IP地址, 并分配客户端的私有端口; 根据客户端的 私有 IP地址和客户端的私有端口查询客户端的公有 IP地址和客户端的公有 端口。
可选地,作为另一个实施例, 处理器 1401具体用于获取 MTS的公有 IP 地址; 根据客户端的私有端口以及 MTS的公有 IP地址, 与 MTS的特定端 口建立传输控制协议 TCP连接, 特定端口的端口号与防火墙允许通过的端 口的端口号相同; 通过 TCP连接查询客户端的地址。
可选地, 作为另一个实施例, 处理器 1401具体用于向 SIP服务器发送 用于请求 MTS的公有 IP地址的请求消息; 接收 SIP服务器发送的请求响应 消息, 请求响应消息中携带 MTS的公有 IP地址。
可选地, 作为另一个实施例, 在确定防火墙不需要进行 NAT时, 处理 器 1401具体用于获取客户端的公有 IP地址; 探测防火墙允许通过的特定端 口; 将防火墙允许通过的特定端口作为客户端的公有端口。
可选地, 作为另一个实施例, 处理器 1401还用于确定防火墙支持的传 输协议, 传输协议包括 TCP和用户数据包协议 UDP中的至少一种; 发送单 元 1402还用于向 SIP服务器发送用于指示传输协议的信息;
处理器还用于当通过隧道向 MTS发送数据时, 利用传输协议对数据进 行封装; 处理器还用于当接收 MTS通过隧道发送的数据时, 利用传输协议 对数据进行解封装。
图 15是本发明另一个实施例的 SIP服务器的框图。 该 SIP服务器包括 接收器 1501、 处理器 1502以及发送器 1503。
接收器 1501 , 用于接收包含局域网中客户端的地址的信息;
处理器 1502, 用于分配媒体穿越服务器 MTS的公有端口;
发送器 1503, 用于向客户端发送包含 MTS的地址的信息, MTS地址 包括 MTS的公有端口以及获取的 MTS的公有 IP地址,并向 MTS发送包含 客户端的地址以及 MTS的公有端口的信息,以便客户端与 MTS之间建立用 于传输会话初始化协议 SIP媒体数据的隧道, 隧道穿越局域网中的防火墙, SIP媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
可选地, 作为一个实施例, 接收器 1501具体用于接收包含客户端的地 址的信息, 客户端的地址包括客户端的公有网际协议 IP地址和客户端的公 有端口。
可选地, 作为另一个实施例, 处理器 1502具体用于将防火墙允许通过 的端口的端口号作为 MTS的公有端口的端口号。
可选地, 作为另一个实施例, 接收器 1501还用于接收客户端发送的用 于请求 MTS的公有 IP地址的请求消息; 向客户端发送请求响应消息, 请求 响应消息中携带 MTS的公有 IP地址。
可选地, 作为另一个实施例, 接收器 1501还用于接收客户端发送的用 于指示防火墙支持的传输协议的信息, 传输协议包括 TCP和用户数据包协 议 UDP中的至少一种; 发送器 1503还用于向 MTS发送用于指示传输协议 的信息。
可选地, 作为另一个实施例, 发送器 1503还用于向所述 MTS发送包含 媒体网关的地址以及所述客户端的地址的信息。
图 16是本发明另一个实施例的 MTS的框图。 该 MTS包括接收器 1601 和处理器 1602。
接收器 1601 ,用于接收会话初始化协议 SIP服务器发送的包含局域网中 客户端的地址以及 MTS的公有端口的信息;
处理器 1602, 用于根据客户端的地址以及 MTS的地址, 建立 MTS与 客户端之间的用于传输 SIP媒体数据的隧道,隧道穿越客局域网中的防火墙, SIP媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
本发明实施中, 通过在客户端与网络侧的 MTS之间的媒体平面建立一 条穿越隧道, 使得 RTP、 RTCP等媒体数据都可以通过该隧道进行传输, 从 而降低了呼叫过程的耗时, 提高了用户体验。
可选地, 作为一个实施例, 接收器 1601具体用于接收包含客户端的地 址以及 MTS的公有端口的信息, 客户端的地址包括客户端的公有 IP地址和 客户端的公有端口; 处理器 1602具体用于根据客户端的公有 IP地址、 客户 端的公有端口以及 MTS的地址建立隧道, MTS的地址包括 MTS的公有 IP 地址和 MTS的公有端口。
可选地, 作为另一个实施例, 处理器 1602还用于与客户端建立传输控 制协议 TCP连接,以便客户端根据 TCP连接查询客户端的公有 IP地址和客 户端的公有端口。
可选地, 作为另一个实施例, 接收器 1601还用于接收 SIP服务器发送 的用于指示防火墙支持的传输协议的信息, 传输协议包括 TCP和用户数据 包协议 UDP中的至少一种;
处理器 1602还用于当通过隧道向客户端发送数据时, 利用传输协议对 数据进行封装; 当接收客户端通过隧道发送的数据时, 利用传输协议对数据 进行解封装。
可选地, 作为另一个实施例, 接收器 1601还用于接收所述 SIP服务器 发送的包含媒体网关的地址以及所述客户端的地址的信息。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结 合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特 定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方 法来实现所描述的功能, 但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到, 为描述的方便和筒洁, 上述描 述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应 过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间 的耦合或直接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合 或通信连接, 可以是电性, 机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一 个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使 用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明 的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部 分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质 中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。 而前 述的存储介质包括: U盘、移动硬盘、只读存储器( ROM, Read-Only Memory )、 随机存取存储器(RAM, Random Access Memory ), 磁碟或者光盘等各种可 以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。

Claims

权利要求
1. 一种穿越防火墙的方法, 其特征在于, 包括:
确定局域网中客户端的地址;
向会话初始化协议 SIP服务器发送包含所述客户端的地址的信息; 接收所述 SIP服务器发送的包含网络侧的媒体穿越服务器 MTS的地址 的信息;
根据所述客户端的地址以及所述 MTS的地址, 建立所述客户端与所述 MTS之间的用于传输 SIP媒体数据的隧道,所述隧道穿越所述局域网中的防 火墙, 所述 SIP媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
2. 如权利要求 1所述的方法, 其特征在于, 所述确定局域网中客户端 的地址包括:
确定所述客户端的地址,所述客户端的地址包括所述客户端的公有网际 协议 IP地址和所述客户端的公有端口。
3. 如权利要求 1或 2所述的方法, 其特征在于, 所述接收所述 SIP服 务器发送的包含网络侧的 MTS的地址的信息包括:
接收所述包含所述 MTS的地址的信息,所述 MTS的地址包括所述 MTS 的公有 IP地址和所述 MTS的公有端口;
贝' J , 所述根据所述客户端的地址以及所述 MTS的地址, 建立所述客户 端与所述 MTS之间的用于传输 SIP媒体数据的隧道, 包括:
根据所述客户端的公有 IP地址、 所述客户端的公有端口、 所述 MTS的 公有 IP地址以及所述 MTS的公有端口, 建立所述隧道。
4. 如权利要求 3所述的方法, 其特征在于, 在所述确定所述客户端的 地址之前, 还包括:
判断所述防火墙是否需要进行网络地址转换 NAT;
贝' J , 在确定所述防火墙需要进行 NAT时, 所述确定所述客户端的地址 包括:
获取所述客户端的私有 IP地址, 并分配所述客户端的私有端口; 根据所述客户端的私有 IP地址和所述客户端的私有端口, 查询所述客 户端的公有 IP地址和所述客户端的公有端口。
5. 如权利要求 4所述的方法, 其特征在于, 所述根据所述客户端的私 有 IP地址和所述客户端的私有端口, 查询所述客户端的公有 IP地址和所述 客户端的公有端口包括:
获取所述 MTS的公有 IP地址;
根据所述客户端的私有端口以及所述 MTS的公有 IP地址,与所述 MTS 的特定端口建立传输控制协议 TCP连接, 所述特定端口的端口号与所述防 火墙允许通过的端口的端口号相同;
通过所述 TCP连接查询所述客户端的地址。
6. 如权利要求 5所述的方法, 其特征在于, 所述获取所述 MTS的公有 IP地址包括:
向所述 SIP服务器发送用于请求所述 MTS的公有 IP地址的请求消息; 接收所述 SIP服务器发送的请求响应消息, 所述请求响应消息中携带所 述 MTS的公有 IP地址。
7. 如权利要求 4-6中任一项所述的方法, 其特征在于,
在确定所述防火墙不需要进行 NAT时, 所述确定所述客户端的地址包 括:
获取所述客户端的公有 IP地址;
探测所述防火墙允许通过的特定端口;
将所述防火墙允许通过的特定端口作为所述客户端的公有端口。
8. 如权利要求 1-7中任一项所述的方法, 其特征在于, 还包括: 确定所述防火墙支持的传输协议, 所述传输协议包括 TCP和用户数据 包协议 UDP中的至少一种;
向所述 SIP服务器发送用于指示所述传输协议的信息;
当通过所述隧道向所述 MTS发送数据时, 利用所述传输协议对所述数 据进行封装;
当接收所述 MTS通过所述隧道发送的数据时, 利用所述传输协议对所 述数据进行解封装。
9. 一种穿越防火墙的方法, 其特征在于, 包括:
接收包含局域网中客户端的地址的信息;
分配媒体穿越服务器 MTS的公有端口;
向所述客户端发送包含 MTS 的地址的信息, 所述 MTS地址包括所述
MTS的公有端口以及获取的 MTS的公有 IP地址, 并向所述 MTS发送包含 所述客户端的地址以及所述 MTS的公有端口的信息, 以便所述客户端与所 述 MTS之间建立用于传输会话初始化协议 SIP媒体数据的隧道, 所述隧道 穿越所述局域网中的防火墙,所述 SIP媒体数据包括实时传输协议 RTP数据 和实时传输控制协议 RTCP数据。
10. 如权利要求 9所述的方法, 其特征在于, 所述接收包含局域网中客 户端的地址的信息包括:
接收所述包含所述客户端的地址的信息, 所述客户端的地址包括所述客 户端的公有网际协议 IP地址和所述客户端的公有端口。
11. 如权利要求 10所述的方法, 其特征在于, 所述分配 MTS的公有端 口包括:
将所述防火墙允许通过的端口的端口号作为所述 MTS的公有端口的端 口号。
12. 如权利要求 9-11中任一项所述的方法, 其特征在于, 在所述接收局 域网中客户端的地址之前, 还包括:
接收所述客户端发送的用于请求所述 MTS的公有 IP地址的请求消息; 向所述客户端发送请求响应消息, 所述请求响应消息中携带所述 MTS 的公有 IP地址。
13. 如权利要求 9-12中任一项所述的方法, 其特征在于, 还包括: 接收所述客户端发送的用于指示所述防火墙支持的传输协议的信息, 所 述传输协议包括 TCP和用户数据包协议 UDP中的至少一种;
向所述 MTS发送用于指示所述传输协议的信息。
14. 如权利要求 9-13中任一项所述的方法, 其特征在于, 还包括: 向所述 MTS发送包含媒体网关的地址以及所述客户端的地址的信息。
15. 一种穿越防火墙的方法, 其特征在于, 包括:
接收会话初始化协议 SIP服务器发送的包含局域网中客户端的地址以及
MTS的公有端口的信息;
根据所述客户端的地址以及所述 MTS的地址,建立所述 MTS与所述客 户端之间的用于传输 SIP媒体数据的隧道, 所述隧道穿越所述局域网中的防 火墙, 所述 SIP媒体数据包括实时传输协议 RTP数据和实时传输控制协议 RTCP数据。
16. 如权利要求 15所述的方法, 其特征在于, 所述接收 SIP服务器发 送的包含局域网中客户端的地址以及 MTS的公有端口的信息包括: 接收所述包含所述客户端的地址以及所述 MTS的公有端口的信息, 所 述客户端的地址包括所述客户端的公有 IP地址和所述客户端的公有端口; 贝' J , 所述根据所述客户端的地址以及所述 MTS的地址, 建立所述 MTS 与所述客户端之间的用于传输 SIP媒体数据的隧道包括:
根据所述客户端的公有 IP地址、 所述客户端的公有端口以及所述 MTS 的地址, 建立所述隧道, 所述 MTS的地址包括所述 MTS的公有 IP地址和 所述 MTS的公有端口。
17. 如权利要求 15或 16所述的方法, 其特征在于, 在所述接收 SIP服 务器发送的包含局域网中客户端的地址以及 MTS的公有端口的信息之前, 还包括:
与所述客户端建立传输控制协议 TCP连接, 以便所述客户端根据所述 TCP连接查询所述客户端的公有 IP地址和所述客户端的公有端口。
18. 如权利要求 15-17中任一项所述的方法, 其特征在于, 还包括: 接收所述 SIP服务器发送的用于指示所述防火墙支持的传输协议的信 息, 所述传输协议包括 TCP和用户数据包协议 UDP中的至少一种;
当通过所述隧道向所述客户端发送数据时, 利用所述传输协议对所述数 据进行封装;
当接收所述客户端通过所述隧道发送的数据时, 利用所述传输协议对所 述数据进行解封装。
19. 如权利要求 15-18中任一项所述的方法, 其特征在于, 还包括: 的信息。
20. 一种客户端, 其特征在于, 包括:
确定单元, 用于确定局域网中客户端的地址;
发送单元, 用于向会话初始化协议 SIP服务器发送包含所述客户端的地 址的信息;
接收单元, 用于接收所述 SIP服务器发送的包含网络侧的媒体穿越服务 器 MTS的地址的信息;
建立单元, 用于根据所述客户端的地址以及所述 MTS的地址, 建立所 述客户端与所述 MTS之间的用于传输 SIP媒体数据的隧道, 所述隧道穿越 所述局域网中的防火墙,所述 SIP媒体数据包括实时传输协议 RTP数据和实 时传输控制协议 RTCP数据。
21. 如权利要求 20所述的客户端, 其特征在于, 所述确定单元具体用 于确定所述客户端的地址, 所述客户端的地址包括所述客户端的公有网际协 议 IP地址和所述客户端的公有端口。
22. 如权利要求 20或 21所述的方法, 其特征在于, 所述接收单元具体 用于接收所述包含所述 MTS的地址的信息,所述 MTS的地址包括所述 MTS 的公有 IP地址和所述 MTS的公有端口;
所述建立单元具体用于根据所述客户端的公有 IP地址、 所述客户端的 公有端口、 所述 MTS的公有 IP地址以及所述 MTS的公有端口, 建立所述 隧道。
23. 如权利要求 22所述的客户端, 其特征在于, 还包括:
判断单元, 用于判断所述防火墙是否需要进行网络地址转换 NAT; 贝' J , 在确定所述防火墙需要进行 NAT时, 所述确定单元具体用于获取 所述客户端的私有 IP地址, 并分配所述客户端的私有端口; 根据所述客户 端的私有 IP地址和所述客户端的私有端口查询所述客户端的公有 IP地址和 所述客户端的公有端口。
24. 如权利要求 23所述的客户端, 其特征在于, 所述确定单元具体用 于获取所述 MTS的公有 IP地址;根据所述客户端的私有端口以及所述 MTS 的公有 IP地址,与所述 MTS的特定端口建立传输控制协议 TCP连接,所述 特定端口的端口号与所述防火墙允许通过的端口的端口号相同; 通过所述 TCP连接查询所述客户端的地址。
25. 如权利要求 24所述的客户端, 其特征在于, 所述确定单元具体用 于向所述 SIP服务器发送用于请求所述 MTS的公有 IP地址的请求消息; 接 收所述 SIP服务器发送的请求响应消息,所述请求响应消息中携带所述 MTS 的公有 IP地址。
26. 如权利要求 23-25中任一项所述的客户端, 其特征在于,
在确定所述防火墙不需要进行 NAT时, 所述确定单元具体用于获取所 述客户端的公有 IP地址; 探测所述防火墙允许通过的特定端口; 将所述防 火墙允许通过的特定端口作为所述客户端的公有端口。
27. 如权利要求 20-26中任一项所述的客户端, 其特征在于, 所述确定 单元还用于确定所述防火墙支持的传输协议, 所述传输协议包括 TCP和用 户数据包协议 UDP中的至少一种; 息; 、 。 , , 、 所述客户端还包括:
封装单元, 用于当通过所述隧道向所述 MTS发送数据时, 利用所述传 输协议对所述数据进行封装;
解封装单元, 用于当接收所述 MTS通过所述隧道发送的数据时, 利用 所述传输协议对所述数据进行解封装。
28. 一种会话初始化协议 SIP服务器, 其特征在于, 包括:
接收单元, 用于接收包含局域网中客户端的地址的信息;
分配单元, 用于分配媒体穿越服务器 MTS的公有端口;
发送单元, 用于向所述客户端发送包含 MTS的地址的信息, 所述 MTS 地址包括所述 MTS的公有端口以及获取的 MTS的公有 IP地址, 并向所述 MTS发送包含所述客户端的地址以及所述 MTS的公有端口的信息, 以便所 述客户端与所述 MTS之间建立用于传输会话初始化协议 SIP媒体数据的隧 道, 所述隧道穿越所述局域网的防火墙, 所述 SIP媒体数据包括实时传输协 议 RTP数据和实时传输控制协议 RTCP数据。
29. 如权利要求 27所述的 SIP服务器, 其特征在于, 所述接收单元具 体用于接收所述包含所述客户端的地址的信息, 所述客户端的地址包括所述 客户端的公有网际协议 IP地址和所述客户端的公有端口。
30. 如权利要求 29所述的 SIP服务器, 其特征在于, 所述分配单元具 体用于将所述防火墙允许通过的端口的端口号作为所述 MTS的公有端口的 端口号。
31. 如权利要求 28-30中任一项所述的 SIP服务器, 其特征在于, 所述 请求消息; 向所述客户端发送请求响应消息, 所述请求响应消息中携带所述 MTS的公有 IP地址。
32. 如权利要求 28-31中任一项所述的 SIP服务器, 其特征在于, 所述 接收单元还用于接收所述客户端发送的用于指示所述防火墙支持的传输协 议的信息, 所述传输协议包括 TCP和用户数据包协议 UDP中的至少一种; 所述发送单元还用于向所述 MTS发送用于指示所述传输协议的信息。
33. 如权利要求 28-32中任一项所述的 SIP服务器, 其特征在于, 所述 发送单元还用于向所述 MTS发送包含媒体网关的地址以及所述客户端的地 址的信息。
34. 一种穿越隧道服务器 MTS, 其特征在于, 包括:
接收单元, 用于接收会话初始化协议 SIP服务器发送的包含局域网中客 户端的地址以及 MTS的公有端口的信息;
建立单元, 用于根据所述客户端的地址以及所述 MTS的地址, 建立所 述 MTS与所述客户端之间的用于传输 SIP媒体数据的隧道, 所述隧道穿越 局域网的防火墙,所述 SIP媒体数据包括实时传输协议 RTP数据和实时传输 控制协议 RTCP数据。
35. 如权利要求 34所述的 MTS, 其特征在于, 所述接收单元具体用于 接收所述包含所述客户端的地址以及所述 MTS的公有端口的信息, 所述客 户端的地址包括所述客户端的公有 IP地址和所述客户端的公有端口;
则, 所述建立单元具体用于根据所述客户端的公有 IP地址、 所述客户 端的公有端口以及所述 MTS的地址建立所述隧道,所述 MTS的地址包括所 述 MTS的公有 IP地址和所述 MTS的公有端口。
36. 如权利要求 34或 35所述的 MTS, 其特征在于, 所述建立单元还 用于与所述客户端建立传输控制协议 TCP连接, 以便所述客户端根据所述 TCP连接查询所述客户端的公有 IP地址和所述客户端的公有端口。
37. 如权利要求 34-36中任一项所述的 MTS, 其特征在于, 所述接收单 元还用于接收所述 SIP服务器发送的用于指示所述防火墙支持的传输协议的 信息, 所述传输协议包括 TCP和用户数据包协议 UDP中的至少一种; 所述 MTS还包括:
封装单元, 用于当通过所述隧道向所述客户端发送数据时, 利用所述传 输协议对所述数据进行封装;
解封装单元, 用于当接收所述客户端通过所述隧道发送的数据时, 利用 所述传输协议对所述数据进行解封装。
38. 如权利要求 34-37中任一项所述的 MTS, 其特征在于, 所述接收单 地址的信息。
PCT/CN2013/070395 2013-01-11 2013-01-11 穿越防火墙的方法、客户端和媒体穿越服务器 WO2014107894A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/070395 WO2014107894A1 (zh) 2013-01-11 2013-01-11 穿越防火墙的方法、客户端和媒体穿越服务器
CN201380000069.8A CN103392316B (zh) 2013-01-11 穿越防火墙的方法、客户端和媒体穿越服务器

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/070395 WO2014107894A1 (zh) 2013-01-11 2013-01-11 穿越防火墙的方法、客户端和媒体穿越服务器

Publications (1)

Publication Number Publication Date
WO2014107894A1 true WO2014107894A1 (zh) 2014-07-17

Family

ID=49535844

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/070395 WO2014107894A1 (zh) 2013-01-11 2013-01-11 穿越防火墙的方法、客户端和媒体穿越服务器

Country Status (1)

Country Link
WO (1) WO2014107894A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465844A (zh) * 2007-12-18 2009-06-24 华为技术有限公司 一种防火墙穿越方法、系统和设备
US20100182995A1 (en) * 2009-01-21 2010-07-22 National Taipei University Of Technology NAT traversal method in Session Initial Protocol
CN101873359A (zh) * 2010-06-28 2010-10-27 北京神州泰岳软件股份有限公司 实现udp打洞的方法
CN101938532A (zh) * 2010-09-17 2011-01-05 北京神州泰岳软件股份有限公司 基于udp的穿越nat设备的方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465844A (zh) * 2007-12-18 2009-06-24 华为技术有限公司 一种防火墙穿越方法、系统和设备
US20100182995A1 (en) * 2009-01-21 2010-07-22 National Taipei University Of Technology NAT traversal method in Session Initial Protocol
CN101873359A (zh) * 2010-06-28 2010-10-27 北京神州泰岳软件股份有限公司 实现udp打洞的方法
CN101938532A (zh) * 2010-09-17 2011-01-05 北京神州泰岳软件股份有限公司 基于udp的穿越nat设备的方法及系统

Also Published As

Publication number Publication date
CN103392316A (zh) 2013-11-13

Similar Documents

Publication Publication Date Title
US9137200B2 (en) Ice based NAT traversal
US9497411B2 (en) Establishing a connection for a video call
RU2660620C1 (ru) Устройство связи и способ обхода брандмауэра шлюза уровня приложения при установлении rtc-соединения связи между rtc-клиентом и rtc-сервером
JP6138340B2 (ja) インターネットプロトコルマルチメディアサブシステム(ims)にアクセスするためのウェブベースリアルタイム通信(webrtc)のアーキテクチャ
US8601144B1 (en) Systems and methods for automatic ICE relay candidate creation
JP6367339B2 (ja) プレゼンスおよびオンデバイスプロキシング
US8611354B2 (en) Method and apparatus for relaying packets
US8688842B2 (en) Methods, apparatuses, system, and related computer program product for user equipment access
US8639844B2 (en) System for establishing a media stream
WO2015096302A1 (zh) 基于sip媒体能力重协商的nat穿越方法、代理服务器和系统
JP6101997B2 (ja) リアルタイム通信セッションを確立する通信システム
WO2016066027A1 (zh) 一种媒体传输方法和设备
CN106921624B (zh) 会话边界控制器及数据传输方法
WO2014107894A1 (zh) 穿越防火墙的方法、客户端和媒体穿越服务器
US9516575B2 (en) Mobile device based proxy for browser-originated procedures
WO2009127138A1 (zh) 通信请求的发送方法和装置
JP5103031B2 (ja) ネットワーク通信方法及びそのシステム
CN103392316B (zh) 穿越防火墙的方法、客户端和媒体穿越服务器
JP5782407B2 (ja) ネットワークシステムおよびnapt実施回数低減方法
US20130039367A1 (en) Peer-to-Peer Packet Switching

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13870625

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13870625

Country of ref document: EP

Kind code of ref document: A1