Trunking calls between Asterisk servers with IAX2.

Trevor testing a pair of Asterisk servers

Trevor testing a pair of Asterisk servers

At the end of last week we managed to create an IAX to IAX trunk between 2 asterisk servers on the local wired LAN. IAX trunking is a way to connect multiple Asterisk servers and allow clients of different servers to place calls to each other.There are two Asterisk configuration files that need changing to make this possible – the definitions of other iax servers to communicate with in /etc/asterisk/iax.conf and amending the dialplan to direct calls to clients of remote asterisk servers in /etc.asterisk/extensions.conf. In our case, we defined two Asterisk servers – beach and base, and commanded each of them to contact the other by IP address and set up a trunk using the default iax2 portย  4569 – all this happens in iax.conf . In the dialplan file extensions.conf , we re-arranged the phone extension numbers for users era1 to era8 so that they would register with the beach Asterisk server along with the MeetMe conference location 1234. Phone extensions era8 and era9 were both defined as registered with Asterisk server base. In the beach dialplan, calls to extensions registered at the base Asterisk server were told to route through server base using iax2, and vice versa.ย  Calls placed by a beach user to another beach user were connected using SIP as before.
This is a little complex to describe, but perhaps following the output of the base server in this graphic will help:
At the top line there’s a call being made between a SIP client of base and era2 (phone number 2222), which (in line 2 of the output) is accepted by the beach server which has era2‘s registration, a common codec is agreed to be Speex in line 3 and the softphone at era2 rings (line 4) and is answered (line 6).

3 thoughts on “Trunking calls between Asterisk servers with IAX2.

  1. Pingback: Portable VoWLAN: A portable voice over wireless local area network for mobile learning « VoWLAN

  2. Pingback: Asterisk running peer to user « VoWLAN

  3. Pingback: Asterisk running peer to user « Portable WLAN

Comments are closed.