I am trying to setup an IAX trunk between a FreePBX instance (10.0.30.200, pbx1) and an Asterisk instance (10.0.30.201, pbx2).
FreePBX has an IAX trunk setup with the outgoing being:
username=pbx1
type=peer
host=10.0.30.201
secret=redacted
context=from-trunk
qualify=yes
disallow=all
allow=ulaw
And the ingoing being:
type=user
secret=redacted
host=10.0.30.201
context=from-internal
disallow=all
allow=ulaw
On my asterisk instance, the relevant config in iax.conf is the following:
[pbx2]
username=pbx2
type=peer
host=10.0.30.200
secret=redacted
context=from-trunk
disallow=all
allow=ulaw
What are the ip addresses of your two IAX2 servers, If you are .201 then it is unlikely that the incoming will also be .201, conversely with the server at 200, (using a secret on a 10. network is unnecessary for what should be obvious reasons, but you will need a username both ways for peers and users, you can use type=friend and avoid the need for username and secret, if so for efficiency add trunk=yes both ends )
I’ve now followed this guide to the letter, and something still isn’t working. For the hell of it I tried pasting the exact configuration and it still shows as offline. They are on the same network so I don’t get why this isn’t working.
I have fixed this issue, when I did a reload on iax, it turned out there was an include statement (from the NPSTN boilerplate) that led to a file that didn’t exist. I wish I saw this sooner.