New IAX trunk, only works 1 way

I have 2 FreePBX boxes - one runs Asterisk 2.5.1.X and some older version of FreePBX. The other runs FreePBX 13.0.188.9 and Asterisk 13.11.2. The new FreePBX was a fresh install for a previous old version box that died. Ok, so that’s the history.

I setup an IAX2 trunk on the new box using the same settings that were on the trunk on the old box. Didn’t work. I setup a new trunk on both the old and new box, and it works from the new box to the old box, but not vice versa.
New Box-Incoming:
USER Context -
ToSpg
USER Details -
secret=VerySecret
type=user
context=from-internal

Old Box-outgoing:
PEER Details -
host=10.20.0.225
username=ToSpg
secret=VerySecret
type=peer
;insecure=very
qualify=yes

I have spent the last week reading every post on this that I can find. At first, I could see the call reaching the remote PBX, and it said to add “requirecalltoken=no” to iax.conf. Now it doesn’t even seem to reach the remote box at all. I have tried to add requirecalltoken=no through the “Asterisk IAX Settings/Advanced” and nothing changed. I tried adding “calltokenoptional=0.0.0.0/0.0.0.0” in the same location, but no change. I removed those entries and edited the iax_custom.conf file directly, and nothing changed. I removed those settings from there and tried to add to the iax_custom.conf on the old PBX, and then I stopped being able to see the calls coming in on the new box. I quickly removed those lines from the old PBX but the problem persisted. I rebooted both PBX boxes and still have the same problem. I cannot complete a call from an extension on the old PBX to an extension on the new PBX, and nothing is showing in the Asterisk -rvvv on the new box (relating to this problem). Asterisk -rvvv shows error:
– Hungup ‘IAX2/ToFrom-9455’
== Everyone is busy/congested at this time (1:0/0/1)

I really don’t know where the calltokenoptional and requirecalltoken parameters are supposed to go, but everything says to not edit the files directly, and use the GUI for all modifications, but I don’t know if I’m even doing that correctly.

Did you ever get this resolved. We just installed a new FreePBX server and are now having the same issue.
New server can call all others. Older versions cannot call new over a IAX2 trunk

Yes- we had to rebuild all trunks from scratch as follows:

On PBX1 with address 10.10.135.250 (Washington site)
Outgoing Settings
Trunk Name: Durham
Peer Settings:
host=10.30.135.250
requirecalltoken=no
type=friend
context=from-internal

Incoming Settings
User Context:
…leave blank
User Details:
…leave blank

On PBX2 with address 10.30.135.250 (Durham site)
Outgoing Settings
Trunk Name: Washington
Peer Settings:
host=10.10.135.250
requirecalltoken=no
type=friend
context=from-internal

Incoming Settings
User Context:
…leave blank
User Details:
…leave blank

Then, do the same thing on all other boxes at the remaining sites.

Any update?

Hi Matt,

Thanks. No we tried that also, but no luck. I ended up creating SIP trunks for the offices and they work fine.
Will have to live with that until we migrate the other offices to updated systems