SIP vs IAX

From TD-er's Wiki
Revision as of 15:00, 19 February 2007 by Gijs (talk | contribs) (→‎Links)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

IAX and SIP are two different protocols for use with VoIP.

The main advantage of IAX, compared to SIP, is its ability to operate behind a NAT-router. IAX uses only 1 UDP connection for both control- and data-traffic. It is also possible to combine more than one channel (conversation) over this connection. This means only 1 (UDP) port has to be forwarded in the NAT-router to the Trixbox. IAX(2) uses a single UDP port 4569, the obsolete IAX1 protocol used port 5036. SIP uses port 5060

Main differences

(Source)

The main differences between IAX and SIP are the following ones:

  • Bandwidth - The bandwidth uses by IAX is less than the one uses by SIP since the messages are binary instead of text messages (SIP). IAX also tries to reduce the headers of the messages reducing therefore the bandwidth used.
  • NAT - Signaling and data travel togheter in IAX avoiding the problems of NAT that usually appear in SIP. Signaling and data in SIP travel using different protocols and that is why NAT problems appears. Audio stream have to pass through routers and firewalls. SIP usually needs a STUN server to avoid these problems.
  • Standarization and use - SIP is a protocol standardized by the IETF long time ago and it is widely used by the equipment and software manufacturers. IAX is still being standardized and for that reason not many devices can use it nowadays
  • Ports used - IAX uses only one port (4569) to send signalling and data of all the calls. To do it IAX use a trunking system. IAX multiplexes signaling and multiple media streams over a single User Datagram Protocol (UDP). SIP, otherwise, uses one port (5060) for signalling and 2 RTP ports for each audio connection (at least 3 ports). For example, if we have 100 simultaneous calls we should use 200 RTP ports and one port for signalling (5060) . IAX uses only one port for everything (4569)
  • Audio flow when using a server - If SIP is using a server signaling messages always pass through the server but audio messages (RTP flow) can travel end to end without passing through the server. In IAX, signaling and data must pass always through IAX server. This increases the bandwidth need by the IAX servers when there are many simultaneous calls.
  • Other functionalities - IAX is a protocol developed to VoIP and video transmission and it has interesting functionalities, for example, the possibility to send or receive dialplans. These funtionalities are very interesting if using Asterisk PBX. SIP is a general porpouse protocol and can transmit any information and not only audio or video.


Links