I’m configuring FreePBX for use across two sites but I cannot get one extension at one site to call another extension at the other site. I have been following this guide:
https://wiki.freepbx.org/pages/viewpage.action?pageId=4161588
The sites are connected via site-to-site VPN, which works fine. I have created an IAX2 trunk, which registers and appears healthy. I have created one extension on each PBX (1001 and 7001). I have added all networks connected via VPN to the local networks section of the SIP settings. I have made sure the SIP and IAX settings allow my codecs.
My trunk looks like this:
host=192.168.40.95
username=guisyd
secret=password (changed for this post)
type=friend
context=from-internal
transfer=no
allow=all
qualify=yes
My outbound route looks like this (as per the docs):
But I have also tried without the +
When dialed, I get the message “Your number cannot be completed as dialed…”. The logs show:
Connected to Asterisk 13.18.5 currently running on FreePBX-Gui (pid = 11410)
== Setting global variable ‘SIPDOMAIN’ to ‘10.0.0.95’
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
– Executing [7001@from-internal:1] ResetCDR(“PJSIP/1001-00000007”, “”) in new stack
– Executing [7001@from-internal:2] NoCDR(“PJSIP/1001-00000007”, “”) in new stack
– Executing [7001@from-internal:3] Progress(“PJSIP/1001-00000007”, “”) in new stack
– Executing [7001@from-internal:4] Wait(“PJSIP/1001-00000007”, “1”) in new stack
– Executing [7001@from-internal:5] Playback(“PJSIP/1001-00000007”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
– <PJSIP/1001-00000007> Playing ‘silence/1.ulaw’ (language ‘en’)
– <PJSIP/1001-00000007> Playing ‘cannot-complete-as-dialed.ulaw’ (language ‘en’)
– <PJSIP/1001-00000007> Playing ‘check-number-dial-again.ulaw’ (language ‘en’)
– Executing [7001@from-internal:6] Wait(“PJSIP/1001-00000007”, “1”) in new stack
– Executing [7001@from-internal:7] Congestion(“PJSIP/1001-00000007”, “20”) in new stack
== Spawn extension (from-internal, 7001, 7) exited non-zero on ‘PJSIP/1001-00000007’
– Executing [h@from-internal:1] Macro(“PJSIP/1001-00000007”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/1001-00000007”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/1001-00000007”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“PJSIP/1001-00000007”, " monior file= ") in new stack
– Executing [s@macro-hangupcall:5] AGI(“PJSIP/1001-00000007”, “attendedtransfer-rec-restart.php,”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
– <PJSIP/1001-00000007>AGI Script attendedtransfer-rec-restart.php completed, returning 0
– Executing [s@macro-hangupcall:6] Hangup(“PJSIP/1001-00000007”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/1001-00000007’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/1001-00000007’
There is nothing in the logs of the other PBX.
I’m not sure what’s going wrong - any hints what else I should be checking?