FreePBX | Register | Issues | Wiki | Portal | Support

911 & 933 All Circuits are Busy Now

freepbx
configuration
Tags: #<Tag:0x00007fcd212b7d98> #<Tag:0x00007fcd212b7be0>

(Chad Warren) #1

I am trying to setup emergency number dialing. When I dial 911 or 933 to test, I am getting “All Circuits are Busy Now”.

Our sip provider is Twilio

We have 2 Outbound Routes setup. One for every day dialing and a separate route for emergency.

No issues with the every day dialing outbound route config. We can call outbound all day long. The emergency route is the only one with the problem.

Outbound Routes priority order is as follows:
Emergency Route
Every Day Dialing Route

Note, I’ve tried moving the priority order around and there is no difference.

Emergency Outbound Route Settings is set to:
Route Type: Emergency
Trunk Sequence for Matched Routes: Our Twilio Trunk

Here is the dial patterns for Emergency:

Prepend [blank] Prefix [blank] Match Pattern 911
Prepend [blank] Prefix [blank] Match Pattern 933
Prepend [blank] Prefix 1 Match Pattern 911
Prepend [blank] Prefix 9 Match Pattern 911
Prepend [blank] Prefix 91 Match Pattern 911

Here is the Asterisk command line output

Connected to Asterisk 13.22.0 currently running on freepbx (pid = 1973)
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [933@from-internal:1] Macro(“SIP/101-000001de”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/101-000001de”, “TOUCH_MONITOR=1539207321.512”) in new stack
– Executing [s@macro-user-callerid:2] Set(“SIP/101-000001de”, “AMPUSER=101”) in new stack
– Executing [s@macro-user-callerid:3] GotoIf(“SIP/101-000001de”, “0?report”) in new stack
– Executing [s@macro-user-callerid:4] ExecIf(“SIP/101-000001de”, “1?Set(REALCALLERIDNUM=101)”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/101-000001de”, “AMPUSER=101”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/101-000001de”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/101-000001de”, “AMPUSERCIDNAME=Chad Warren”) in new stack
– Executing [s@macro-user-callerid:8] ExecIf(“SIP/101-000001de”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“SIP/101-000001de”, “0?report”) in new stack
– Executing [s@macro-user-callerid:10] Set(“SIP/101-000001de”, “AMPUSERCID=101”) in new stack
– Executing [s@macro-user-callerid:11] Set(“SIP/101-000001de”, “__DIAL_OPTIONS=HhTtr”) in new stack
– Executing [s@macro-user-callerid:12] Set(“SIP/101-000001de”, “CALLERID(all)=“Chad Warren” <101>”) in new stack
– Executing [s@macro-user-callerid:13] GotoIf(“SIP/101-000001de”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:14] ExecIf(“SIP/101-000001de”, “1?Set(GROUP(concurrency_limit)=101)”) in new stack
– Executing [s@macro-user-callerid:15] ExecIf(“SIP/101-000001de”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:16] NoOp(“SIP/101-000001de”, “Macro Depth is 1”) in new stack
– Executing [s@macro-user-callerid:17] GotoIf(“SIP/101-000001de”, “1?report2:macroerror”) in new stack
– Goto (macro-user-callerid,s,18)
– Executing [s@macro-user-callerid:18] GotoIf(“SIP/101-000001de”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,37)
– Executing [s@macro-user-callerid:37] Set(“SIP/101-000001de”, “CALLERID(number)=101”) in new stack
– Executing [s@macro-user-callerid:38] Set(“SIP/101-000001de”, “CALLERID(name)=Chad Warren”) in new stack
– Executing [s@macro-user-callerid:39] GotoIf(“SIP/101-000001de”, “0?cnum”) in new stack
– Executing [s@macro-user-callerid:40] Set(“SIP/101-000001de”, “CDR(cnam)=Chad Warren”) in new stack
– Executing [s@macro-user-callerid:41] Set(“SIP/101-000001de”, “CDR(cnum)=101”) in new stack
– Executing [s@macro-user-callerid:42] Set(“SIP/101-000001de”, “CHANNEL(language)=en”) in new stack
– Executing [933@from-internal:2] Gosub(“SIP/101-000001de”, “sub-record-check,s,1(out,933,yes)”) in new stack
– Executing [s@sub-record-check:1] GotoIf(“SIP/101-000001de”, “0?initialized”) in new stack
– Executing [s@sub-record-check:2] Set(“SIP/101-000001de”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [s@sub-record-check:3] Set(“SIP/101-000001de”, “NOW=1539207321”) in new stack
– Executing [s@sub-record-check:4] Set(“SIP/101-000001de”, “__DAY=10”) in new stack
– Executing [s@sub-record-check:5] Set(“SIP/101-000001de”, “__MONTH=10”) in new stack
– Executing [s@sub-record-check:6] Set(“SIP/101-000001de”, “__YEAR=2018”) in new stack
– Executing [s@sub-record-check:7] Set(“SIP/101-000001de”, “__TIMESTR=20181010-213521”) in new stack
– Executing [s@sub-record-check:8] Set(“SIP/101-000001de”, “__FROMEXTEN=101”) in new stack
– Executing [s@sub-record-check:9] Set(“SIP/101-000001de”, “__MON_FMT=wav”) in new stack
– Executing [s@sub-record-check:10] NoOp(“SIP/101-000001de”, “Recordings initialized”) in new stack
– Executing [s@sub-record-check:11] ExecIf(“SIP/101-000001de”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [s@sub-record-check:12] Set(“SIP/101-000001de”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [s@sub-record-check:13] ExecIf(“SIP/101-000001de”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [s@sub-record-check:14] GotoIf(“SIP/101-000001de”, “3?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [s@sub-record-check:17] GotoIf(“SIP/101-000001de”, “1?sub-record-check,out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [out@sub-record-check:1] NoOp(“SIP/101-000001de”, “Outbound Recording Check from 101 to 933”) in new stack
– Executing [out@sub-record-check:2] Set(“SIP/101-000001de”, “RECMODE=dontcare”) in new stack
– Executing [out@sub-record-check:3] ExecIf(“SIP/101-000001de”, “1?Goto(routewins)”) in new stack
– Goto (sub-record-check,out,7)
– Executing [out@sub-record-check:7] Gosub(“SIP/101-000001de”, “recordcheck,1(yes,out,933)”) in new stack
– Executing [recordcheck@sub-record-check:1] NoOp(“SIP/101-000001de”, “Starting recording check against yes”) in new stack
– Executing [recordcheck@sub-record-check:2] Goto(“SIP/101-000001de”, “yes”) in new stack
– Goto (sub-record-check,recordcheck,9)
– Executing [recordcheck@sub-record-check:9] ExecIf(“SIP/101-000001de”, “0?Return()”) in new stack
– Executing [recordcheck@sub-record-check:10] Set(“SIP/101-000001de”, “__REC_POLICY_MODE=YES”) in new stack
– Executing [recordcheck@sub-record-check:11] Goto(“SIP/101-000001de”, “startrec”) in new stack
– Goto (sub-record-check,recordcheck,16)
– Executing [recordcheck@sub-record-check:16] NoOp(“SIP/101-000001de”, “Starting recording: out, 933”) in new stack
– Executing [recordcheck@sub-record-check:17] Set(“SIP/101-000001de”, “AUDIOHOOK_INHERIT(MixMonitor)=yes”) in new stack
[2018-10-10 21:35:21] ERROR[29538][C-000001c3]: pbx_functions.c:701 ast_func_write: Function AUDIOHOOK_INHERIT not registered
– Executing [recordcheck@sub-record-check:18] Set(“SIP/101-000001de”, “__CALLFILENAME=out-933-101-20181010-213521-1539207321.512”) in new stack
– Executing [recordcheck@sub-record-check:19] MixMonitor(“SIP/101-000001de”, “2018/10/10/out-933-101-20181010-213521-1539207321.512.wav,abi(LOCAL_MIXMON_ID),”) in new stack
– Executing [recordcheck@sub-record-check:20] Set(“SIP/101-000001de”, “__MIXMON_ID=0x31be1f0”) in new stack
– Executing [recordcheck@sub-record-check:21] Set(“SIP/101-000001de”, “__RECORD_ID=SIP/101-000001de”) in new stack
– Executing [recordcheck@sub-record-check:22] Set(“SIP/101-000001de”, “__REC_STATUS=RECORDING”) in new stack
– Executing [recordcheck@sub-record-check:23] Set(“SIP/101-000001de”, “CDR(recordingfile)=out-933-101-20181010-213521-1539207321.512.wav”) in new stack
– Executing [recordcheck@sub-record-check:24] Return(“SIP/101-000001de”, “”) in new stack
– Executing [out@sub-record-check:8] Return(“SIP/101-000001de”, “”) in new stack
– Executing [933@from-internal:3] ExecIf(“SIP/101-000001de”, “0 ?Set(CDR(accountcode)=)”) in new stack
– Executing [933@from-internal:4] Set(“SIP/101-000001de”, “EMERGENCYROUTE=YES”) in new stack
– Executing [933@from-internal:5] Set(“SIP/101-000001de”, “MOHCLASS=default”) in new stack
– Executing [933@from-internal:6] Set(“SIP/101-000001de”, “_NODEST=”) in new stack
– Executing [933@from-internal:7] Macro(“SIP/101-000001de”, “dialout-trunk,1,933,off”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/101-000001de”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] ExecIf(“SIP/101-000001de”, “0?Set(DIAL_OPTIONS=Hhtr)”) in new stack
– Executing [s@macro-dialout-trunk:3] GosubIf(“SIP/101-000001de”, “0?sub-pincheck,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:4] ExecIf(“SIP/101-000001de”, “0?Set(CALLERID(num)=101)”) in new stack
– Executing [s@macro-dialout-trunk:5] GotoIf(“SIP/101-000001de”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/101-000001de”, “DIAL_NUMBER=933”) in new stack
– Executing [s@macro-dialout-trunk:7] Set(“SIP/101-000001de”, “DIAL_TRUNK_OPTIONS=HhTtr”) in new stack
– Executing [s@macro-dialout-trunk:8] Set(“SIP/101-000001de”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:9] Set(“SIP/101-000001de”, “DIAL_TRUNK_OPTIONS=T”) in new stack
– Executing [s@macro-dialout-trunk:10] GotoIf(“SIP/101-000001de”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,12)
– Executing [s@macro-dialout-trunk:12] GotoIf(“SIP/101-000001de”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:13] Macro(“SIP/101-000001de”, “outbound-callerid,1”) in new stack
– Executing [s@macro-outbound-callerid:1] NoOp(“SIP/101-000001de”, “101”) in new stack
– Executing [s@macro-outbound-callerid:2] NoOp(“SIP/101-000001de”, “”) in new stack
– Executing [s@macro-outbound-callerid:3] NoOp(“SIP/101-000001de”, “off”) in new stack
– Executing [s@macro-outbound-callerid:4] ExecIf(“SIP/101-000001de”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:5] ExecIf(“SIP/101-000001de”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:6] ExecIf(“SIP/101-000001de”, “0?Set(REALCALLERIDNUM=101)”) in new stack
– Executing [s@macro-outbound-callerid:7] ExecIf(“SIP/101-000001de”, “0?Set(AMPUSER=101)”) in new stack
– Executing [s@macro-outbound-callerid:8] GotoIf(“SIP/101-000001de”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] Set(“SIP/101-000001de”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:13] Set(“SIP/101-000001de”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:14] Set(“SIP/101-000001de”, “TRUNKOUTCID=XXXXXXXXXX”) in new stack
– Executing [s@macro-outbound-callerid:15] GotoIf(“SIP/101-000001de”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,20)
– Executing [s@macro-outbound-callerid:20] ExecIf(“SIP/101-000001de”, “1?Set(CALLERID(all)=XXXXXXXXXX)”) in new stack
– Executing [s@macro-outbound-callerid:21] ExecIf(“SIP/101-000001de”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:22] ExecIf(“SIP/101-000001de”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:23] ExecIf(“SIP/101-000001de”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:24] ExecIf(“SIP/101-000001de”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:25] Set(“SIP/101-000001de”, “CDR(outbound_cnum)=XXXXXXXXXX”) in new stack
– Executing [s@macro-outbound-callerid:26] Set(“SIP/101-000001de”, “CDR(outbound_cnam)=”) in new stack
– Executing [s@macro-dialout-trunk:14] GosubIf(“SIP/101-000001de”, “1?sub-flp-1,s,1()”) in new stack
– Executing [s@sub-flp-1:1] ExecIf(“SIP/101-000001de”, “0?Set(TARGET_FLP_1=)”) in new stack
– Executing [s@sub-flp-1:2] GotoIf(“SIP/101-000001de”, “0?match”) in new stack
– Executing [s@sub-flp-1:3] Return(“SIP/101-000001de”, “”) in new stack
– Executing [s@macro-dialout-trunk:15] Set(“SIP/101-000001de”, “OUTNUM=933”) in new stack
– Executing [s@macro-dialout-trunk:16] Set(“SIP/101-000001de”, “custom=SIP/BHITwilioSIP”) in new stack
– Executing [s@macro-dialout-trunk:17] ExecIf(“SIP/101-000001de”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
– Executing [s@macro-dialout-trunk:18] ExecIf(“SIP/101-000001de”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:19] Macro(“SIP/101-000001de”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/101-000001de”, “”) in new stack
– Executing [s@macro-dialout-trunk:20] GotoIf(“SIP/101-000001de”, “0?skipcrm”) in new stack
– Executing [s@macro-dialout-trunk:21] Set(“SIP/101-000001de”, “__CRM_DIRECTION=OUTBOUND”) in new stack
– Executing [s@macro-dialout-trunk:22] Set(“SIP/101-000001de”, “__CRM_DESTINATION=933”) in new stack
– Executing [s@macro-dialout-trunk:23] Set(“SIP/101-000001de”, “__CRM_SOURCE=101”) in new stack
– Executing [s@macro-dialout-trunk:24] AGI(“SIP/101-000001de”, “sangomacrm.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
== Begin MixMonitor Recording SIP/101-000001de
– <SIP/101-000001de>AGI Script sangomacrm.agi completed, returning 0
– Executing [s@macro-dialout-trunk:25] Set(“SIP/101-000001de”, “CHANNEL(hangup_handler_push)=crm-hangup,s,1”) in new stack
– Executing [s@macro-dialout-trunk:26] NoOp(“SIP/101-000001de”, “CRM Finished”) in new stack
– Executing [s@macro-dialout-trunk:27] GotoIf(“SIP/101-000001de”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:28] ExecIf(“SIP/101-000001de”, “1?Set(CONNECTEDLINE(num,i)=933)”) in new stack
– Executing [s@macro-dialout-trunk:29] ExecIf(“SIP/101-000001de”, “1?Set(CONNECTEDLINE(name,i)=CID:XXXXXXXXXX)”) in new stack
– Executing [s@macro-dialout-trunk:30] ExecIf(“SIP/101-000001de”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)XXXXXXXXXX)”) in new stack
– Executing [s@macro-dialout-trunk:31] GotoIf(“SIP/101-000001de”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:32] Dial(“SIP/101-000001de”, “SIP/BHITwilioSIP/933,300,Tb(func-apply-sipheaders^s^1)”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– SIP/BHITwilioSIP-000001df Internal Gosub(func-apply-sipheaders,s,1) start
– Executing [s@func-apply-sipheaders:1] ExecIf(“SIP/BHITwilioSIP-000001df”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
– Executing [s@func-apply-sipheaders:2] NoOp(“SIP/BHITwilioSIP-000001df”, “Applying SIP Headers to channel”) in new stack
– Executing [s@func-apply-sipheaders:3] Set(“SIP/BHITwilioSIP-000001df”, “SIPHEADERKEYS=”) in new stack
– Executing [s@func-apply-sipheaders:4] ExecIf(“SIP/BHITwilioSIP-000001df”, “0?Set(Rheader=1)”) in new stack
– Executing [s@func-apply-sipheaders:5] While(“SIP/BHITwilioSIP-000001df”, “0”) in new stack
– Jumping to priority 9
– Executing [s@func-apply-sipheaders:10] ExecIf(“SIP/BHITwilioSIP-000001df”, “0?SIPRemoveHeader(Alert-Info:)”) in new stack
– Executing [s@func-apply-sipheaders:11] ExecIf(“SIP/BHITwilioSIP-000001df”, “0?Set(PJSIP_HEADER(remove,Alert-Info)=)”) in new stack
– Executing [s@func-apply-sipheaders:12] Return(“SIP/BHITwilioSIP-000001df”, “”) in new stack
== Spawn extension (from-pstn-e164-us, 933, 1) exited non-zero on ‘SIP/BHITwilioSIP-000001df’
– SIP/BHITwilioSIP-000001df Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
– Called SIP/BHITwilioSIP/933
[2018-10-10 21:35:21] WARNING[2071][C-000001c3]: chan_sip.c:24055 handle_response_invite: Received response: “Forbidden” from ‘<sip:XXXXXXXXXX @ XXX.XXX>XXX>XXX>;tag=as28a2d6f0’
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:33] NoOp(“SIP/101-000001de”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21”) in new stack
– Executing [s@macro-dialout-trunk:34] GotoIf(“SIP/101-000001de”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“SIP/101-000001de”, “RC=21”) in new stack
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(“SIP/101-000001de”, “21,1”) in new stack
– Goto (macro-dialout-trunk,21,1)
– Executing [21@macro-dialout-trunk:1] Goto(“SIP/101-000001de”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [continue@macro-dialout-trunk:1] NoOp(“SIP/101-000001de”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 21 - failing through to other trunks”) in new stack
– Executing [continue@macro-dialout-trunk:2] ExecIf(“SIP/101-000001de”, “1?Set(CALLERID(number)=101)”) in new stack
– Executing [933@from-internal:8] Macro(“SIP/101-000001de”, “outisbusy,”) in new stack
– Executing [s@macro-outisbusy:1] Progress(“SIP/101-000001de”, “”) in new stack
– Executing [s@macro-outisbusy:2] GotoIf(“SIP/101-000001de”, “1?emergency,1”) in new stack
– Goto (macro-outisbusy,emergency,1)
– Executing [emergency@macro-outisbusy:1] Playback(“SIP/101-000001de”, “all-circuits-busy-now&please-try-call-later”) in new stack
– <SIP/101-000001de> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
– <SIP/101-000001de> Playing ‘please-try-call-later.ulaw’ (language ‘en’)
– Executing [h@from-internal:1] Macro(“SIP/101-000001de”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/101-000001de”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“SIP/101-000001de”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“SIP/101-000001de”, " monior file= /var/spool/asterisk/monitor/2018/10/10/out-933-101-20181010-213521-1539207321.512.wav") in new stack
– Executing [s@macro-hangupcall:5] AGI(“SIP/101-000001de”, “attendedtransfer-rec-restart.php,/var/spool/asterisk/monitor/2018/10/10/out-933-101-20181010-213521-1539207321.512.wav”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
– <SIP/101-000001de>AGI Script attendedtransfer-rec-restart.php completed, returning 0
– Executing [s@macro-hangupcall:6] Hangup(“SIP/101-000001de”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘SIP/101-000001de’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/101-000001de’
– SIP/101-000001de Internal Gosub(crm-hangup,s,1) start
– Executing [s@crm-hangup:1] NoOp(“SIP/101-000001de”, “Sending Hangup to CRM”) in new stack
– Executing [s@crm-hangup:2] NoOp(“SIP/101-000001de”, “HANGUP CAUSE: 21”) in new stack
– Executing [s@crm-hangup:3] ExecIf(“SIP/101-000001de”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
– Executing [s@crm-hangup:4] NoOp(“SIP/101-000001de”, “MASTER CHANNEL: 1539207321.512 = 1539207321.512”) in new stack
– Executing [s@crm-hangup:5] GotoIf(“SIP/101-000001de”, “0?return”) in new stack
– Executing [s@crm-hangup:6] Set(“SIP/101-000001de”, “__CRM_HANGUP=1”) in new stack
– Executing [s@crm-hangup:7] AGI(“SIP/101-000001de”, “sangomacrm.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
– <SIP/101-000001de>AGI Script sangomacrm.agi completed, returning 0
– Executing [s@crm-hangup:8] Return(“SIP/101-000001de”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/101-000001de’
– SIP/101-000001de Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
== MixMonitor close filestream (mixed)
== End MixMonitor Recording SIP/101-000001de

I appreciate any insight.


(Lorne Gaetz) #2
– Called SIP/BHITwilioSIP/933
[2018-10-10 21:35:21] WARNING[2071][C-000001c3]: chan_sip.c:24055 handle_response_invite: Received response: “Forbidden” from ‘&lt;sip:XXXXXXXXXX @ XXX.XXX&gt;XXX&gt;XXX&gt;;tag=as28a2d6f0’
== Everyone is busy/congested at this time (1:0/0/1)

This is a question for your provider, the call was rejected.


(Chad Warren) #3

Thank you. I followed up with Twilio and they said:

  • When placing an emergency call, the Request-URI must be formatted as follows: sip:911@{your-trunk}.pstn.twilio.com or sip:933@{your-trunk}.pstn.twilio.com for an emergency test call.

  • Ensure that your equipment’s dial plan is set-up to send outbound 911 and 933 calls to Twilio.

I’m not sure where within FreePBX to set that. The trunk for the emergency outbound route is set the to my Twilio trunk {your-trunk}.pstn.twilio.com

When a call is made from the emergency outbound route, shouldn’t it inherently have the sip request formatted sip:911@{your-trunk}.pstn.twilio.com ?


(Chad Warren) #4

SOLVED:

The reason I was getting “All Circuits Are Busy” is because Twilio was unable to match the outbound caller ID of the SIP trunk setup within FreePBX to the DID I chose within Twilio to attach the verified office physical address to.

When the call was being made to 933 or 911, the SIP connection appeared to becoming from XXXXXXXXXX@ mytrunk pstn twilio com (sorry new account on forum and I can’t add links :frowning: )

The fix was to change that CID for the trunk to be in the E.164 format i.e. +1XXXXXXXXXX@ mytrunk pstn twilio com (sorry new account on forum and I can’t add links :frowning: )

Once I adjusted that in the Trunk settings within FreePBX, all went well with the 933 test. It was able to successfully match the outgoing CID for the trunk to the DID I registered within Twilio to be the Emergency DID and corresponding physical address.


(system) #5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.