Some friends may be familiar with the SIP protocol. In this regard, the most prominent thing is the VoIP service. In VoIP services, the SIP protocol and the SIP server are often involved. Next, let's take a look at the traversal problem on the SIP server.
1. Description of SIP server problems
Most traditional voip protocols such as SIP and h323 ...) At the beginning of the design, we did not fully consider the NAT traversal problem. They only focused on how to transmit call signal connections, dislink ...) And the application of RTP real-time transmission protocol) to transmit sound information.
Call signals usually use fixed or standard ports, while RTP uses any port to send and receive sound information.
Most firewalls/NATs do not have the ability to bind Call signal protocol packets with sound packets, nor can they identify where the sound will be sent.
In this way, when a caller initiates a call, the caller can pick up or stop the call even if the call passes smoothly and rings a ring, there may be no sound on either or both sides of the line.
2. NATs and Firewall
In the following situations, UDP may be affected by NAT or firewall:
2.1 full-cone NAT:
All requests from the same internal IP address and port are directed to the same external IP address and port, any external host can send an information package to the specified external address by sending an information package.
2.2 restrict cone NAT:
Restricted cone NAT means that all requests from the same internal IP address and port are directed to the same external IP address and port, only an external host with the IP address XXXX can send messages to the internal host after an internal host sends an information packet to the IP address XXXX.
Port 2.3 limit cone NAT:
The limited bandwidth of a port is similar to that of a limited bandwidth of a NAT gateway.
Specifically, only after an internal host sends an information packet to the IP address XXXX and the port PPPP can the external host send an information packet through the IP address XXXX and port PPPP.
2.4 symmetric NAT:
Symmetric NAT refers to all requests from the same internal IP address and port. When a request is sent to a specific destination IP address and port, it is directed to the same external IP address and port. If the same host sends packets to different targets through the same IP address and port, only the external host that receives the information packet can reply the UDP information packet to the internal host.
Which of the above do you belong? You can view it by applying a stun client:
Example: http://sourceforge.net/projects/stun/