I am tasked with doing a migration test to see how we can get our system migrated to using FreePBX. Currently we have 17 locations and a corporate office management of flat files varried versions has proven to be less than ideal. For this first test I am testing out how it would work having an IAX2 trunk that will pass calls from one system to another. I have been following this tutorial Connecting Two FreePBX/Asterisk Systems Together Over the Internet - PBX GUI - Documentation
FreePBX = Sangoma Linux release 7.8.2003 (Core) with Asterisk 16.17.0
The setup has been performed exactly how it is described for Step 1. System1 to the letter (minus the last three lines). System 2 beginning on step 3 however is a vanilla asterisk system running 15.6.2 below is the config I have so far.
extensions.conf
;FREEPBX TESTING
exten => _2XXX,1,Dial(IAX2/System1/${EXTEN},30,g)
same => n,Hangup(${HANGUPCAUSE})
iax.conf
[System1]
username=System1
secret=password
host=172.31.18.53
type=friend
context=SANITIZED-voip
qualify=yes
qualifyfreqok=25000
transfer=no
trunk=yes
Yes for the purpose of testing I am just using secret=password from the console of System2 I can see the followign when a call is made to 2002 below you see that I am getting a busy/congested error and instant hangup.
spk-asterisk*CLI>
== Setting global variable 'SIPDOMAIN' to '172.31.18.1'
-- Executing [2002@SANITIZED-voip:1] Dial("PJSIP/4912-00000171", "IAX2/System1/2002,,g") in new stack
-- Called IAX2/System1/2002
-- Hungup 'IAX2/System1-20892'
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [2002@SANITIZED-voip:2] Hangup("PJSIP/4912-00000171", "50") in new stack
== Spawn extension (SANITIZED-voip, 2002, 2) exited non-zero on 'PJSIP/4912-00000171'
-- Executing [h@SANITIZED-voip:1] NoOp("PJSIP/4912-00000171", "DialStatus returned: CHANUNAVAIL HangupCause returned: 50") in new stack
-- Executing [h@SANITIZED-voip:2] Hangup("PJSIP/4912-00000171", "50") in new stack
== Spawn extension (SANITIZED-voip, h, 2) exited non-zero on 'PJSIP/4912-00000171'
spk-asterisk*CLI>
Here is an iax peer query…
spk-asterisk*CLI> iax2 show peers
Name/Username Host Mask Port Status Description
System1/System1 172.31.18.53 (S) 255.255.255.255 4569 (T) OK (3 ms)
1 iax2 peers [1 online, 0 offline, 0 unmonitored]
I am hoping that someone out here has an idea of where I may be going wrong on this setup. I can ping from one system to another. I can setup a sip trunk and get calls flowing in a single direction. We would really like to get away from the legacy sip trunks that we are using now. Both systems are on the same subnet. Systems do not have overlapping extensions. When I dial out from FreePBX I can see the call using outbound route 3 on the correct trunk. Nothing displays in either console when the other initiates a call.
I have tried this as well:
exten => _2XXX,1,Dial(IAX/System1/${EXTEN},30,g)
That told me I have to use the IAX2.
Thank you for any assistance you may be able to lend and I hope that I have provided a clear enough picture of what I am working with to easy in diagnosis and if more information is required of me I can pass that along in a jiffy.