IAX2
IAX2 (Inter-Asterisk eXchange version 2) is a VoIP signaling and media protocol developed specifically for Asterisk. Unlike SIP, which uses separate channels for signaling and media, IAX2 multiplexes both over a single UDP port (4569), making it inherently NAT-friendly and efficient for inter-server communication.
How It Works in VICIdial
In VICIdial environments, IAX2 is primarily used for two purposes: inter-server communication within a VICIdial cluster and agent phone connections. When multiple VICIdial servers work together in a cluster, IAX2 trunks between servers carry call audio and transfer signaling efficiently through firewalls without NAT configuration.
IAX2 agent connections are configured in iax.conf and are particularly useful for remote agents behind restrictive NAT devices or firewalls. Since all IAX2 traffic flows over a single port, firewall configuration is simpler than SIP, which requires opening ranges of RTP ports.
IAX2 also supports trunking mode, where multiple calls between two servers are bundled into single network frames, significantly reducing bandwidth and packet overhead compared to individual SIP/RTP streams. This is especially valuable in multi-server VICIdial clusters handling hundreds of concurrent calls.
Why It Matters
IAX2 remains relevant in VICIdial for specific use cases even as SIP and PJSIP dominate carrier connectivity. Its NAT traversal simplicity makes it the preferred protocol for remote agent connections in challenging network environments. The trunking efficiency makes it ideal for inter-server audio within VICIdial clusters.
However, IAX2 has limited support from external carriers and hardware phones, so it should not be used as a primary carrier protocol. Most deployments use SIP for carrier trunks and IAX2 for internal cluster communication and select agent connections. See our VICIdial cluster guide for inter-server IAX2 configuration details.
Part of the VICIdial Performance Optimization Guide
Need Help With Your VICIdial Setup?
Get a free performance audit from our team of VICIdial experts. We'll identify quick wins and long-term improvements.
Get Your Free Audit →