Configuring Asterisk – Part 3
OK, writing this one quickly in my lunch hour.
Connecting to Asterisk boxes together using IAX2.
Basically, I’m creating two IAX2 connections between two boxes, one in each direction. The code below goes in iax.conf – or if you’ve been following my other posts iax_local.conf.
Replace the fields listed below with whatever is appropriate for you. Usernames and passwords can be whatever you like, they only exist within Asterisk.
And of course, swap the local and remote stuff around for one end of the connection
LOCALNAME : username for the remote connection to use when connecting to the local connection
LOCALPASSWORD : A local password for the remote connection to use when connecting to the local connection
REMOTENAME : username for the local connection to use when connecting to the remote connection
REMOTEPASSWORD : password for the local connection to use when connecting to the remote connection
REMOTE.ASTERISK.BOX : The ip for name of the remote asterisk box (I use dyndns.org)
If the Asterisk servers are behind firewalls, then the approriate port (4569) will need to be forwarded
[LOCALNAME]
type=user
secret=LOCALPASSWORD
nat=yes
context=from-remote
[ToRemote]
username=REMOTENAME
type=peer
secret=REMOTEPASSWORD
qualify=yes
nat=yes
host=REMOTE.ASTERISK.BOX
context=from-remote
My next post will cover dialling rules which should make everything work together nicely.
Possibly Related Posts:
- Configuring Asterisk – Part 4
- Configuring Asterisk – Part 2
- Configuring Asterisk – Part 1
- OpenWRT and Asterisk – my new PABX
- It begins…
