Call Today 716.688.4675

TURN: Traversal Using Relay NAT Software

VOCAL’s software library supports TURN (Traversal Using Relay NAT). TURN is a client-server protocol that was created to work around the problems for Voice over IP implementations presented by a NAT. The TURN protocol utilizes a TURN server to relay data from a client to any number of peers. Contact us to discuss your network application requirements.

A TURN client first sends a message to a TURN server to allocate an IP address and port on the TURN server that the client can use to communicate with peers. Once the allocation has succeeded, the client will use this IP address and port as its SIP URI in registrations and as its media address and port in its SDP. All data meant for the client’s peer is then encapsulated in a TURN packet and sent to the TURN server. The TURN packet also contains the destination address of the peer. The TURN server then converts this packet into a UDP packet and sends it on to the peer. In the reverse direction the TURN server receives a UDP packet from the peer and encapsulates this packet into a TURN packet and sends it to the client. The TURN packet also contains the peer’s address so that the client knows where the packet originated.

Consider using the SIP protocol where a SIP device with user Bob sits behind a NAT and wants to register its location with a SIP registrar located on the public Internet. The SIP device has a non-routable Private IP address 192.168.0.10. The SIP device registers its location with the registrar as sip:bob@192.168.0.10:5060. This tells the registrar that Bob can be reached at the IP address 192.168.0.10 at port 5060 (the default SIP port). This private IP address is meaningless to a device on the public Internet and the registrar would not know how to reach Bob.

A second example involves problems in sending RTP media. Alice calls Bob and Alice’s invite contains SDP with her local IP address 10.1.1.10 and media port 1234. Bob accepts Alice’s invite with his SDP containing his local IP address 192.168.0.10 and media port 1234. Both of these IP addresses are meaningless outside the scope of each individual’s private local network and neither party will receive the other’s RTP packets.

In these examples, both Alice and Bob would set up an IP address and port mapping with a TURN server. Alice and Bob would then be able to communicate with each other using the TURN server as an intermediary.

More Information

VOCAL Technologies, Ltd.
520 Lee Entrance, Suite 202
Amherst New York 14228
Phone: +1-716-688-4675
Fax: +1-716-639-0713
Email: sales@vocal.com