SIP 2012 :: ICE – Interactive Connectivity Establishment

Goal: To find the best media path for Alice and Bob

Since SIP was created NAT traversal has been an issue. With the migration to IPv6 we get many devices with dual stack support, which is a similar problem. The SIP call setup needs to involve a procedure to find the best media path across a complicated network – and keep doing that during the call. The real time protocol, RTP, is just a media packet forwarding solution, it has no intelligence in finding the best path. The recommended solution is named ICE – Interactive Connectivity Establishment. It’s a standard that assists the involved SIP implementations to find the best media path, always. And if the network changes during the session, the SIP user agent can restart the procedure and seamlessly move the media to adopt to the new situation. This is something that happens much more now that the number of mobile devices with SIP softphones is growing.

Show me yours and I’ll show you mine

ICE is in theory quite simple. Alice’s SIP client that  to set sup a session to Bob takes inventory of all local IP addresses. It could be a VPN address and  the address from DHCP allocated to the Wifi interface. It then tests with STUN if there’s a NAT in front of the network. If so, it can add the NATs public IP address. In addition, it can allocate a RTP relay address from a TURN server on the public Internet. All four addresses are added to the INVITE, the call setup request.

When Bob gets this request, his SIP device performs the same procedure and answers with all his addresses, called “candidates”. Now, both devices can probe the various addresses and check for connectivity. An extra benefit is that a session ID and password was sent in the INVITE, so that Alice can verify that she is getting the probes from Bob’s phone and no one else. After both devices has probed some probes failed and some succeeded. Alice’s SIP device selects a working media path and sends a media selection probe that Bob’s device confirms. This makes sure that there is a working media path both ways. If not, the call fails.

ICE is part of SIP2012

 

ICE is part of SIP2012 – a reference profile for SIP. Make sure you include a requirement on ICE – RFC 5245 and 5768 – when you purchase SIP implementations. ICE is also part of the new WebRTC standard for implementing a video and audio layer for RTP in web browsers. Thanks to that project, there is ongoing work to add new features to ICE, so ICE is definitely an important part of any solution that wants to handle real time media across today’s networks.

 

SIP 2012:: ICE – NAT traversal for media from Olle E Johansson
The presentation is part of Edvina’s SIP Masterclass trainings. Find out more by clicking here!