IAX was created by Mark Spencer (also author of AsterisK) to improve some of the problems related with SIP in VoIP and that he thought that can be solved.
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.