FreePBX | Register | Issues | Wiki | Portal | Support

TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 1 - failing through to other trunks


(Ian Arman) #1

I’m receiving the following error when attempting to make an outbound call from my trunk:

TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 1 - failing through to other trunks

my trunk settings have not changed, only my server was rebooted.


(Vinod Kunchanur) #2

Check the trunk status.
If the trunk is registering to provider then check whether it is registered and reachable.


(Tom Ray) #3

That would not be the issue. Please see https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings

Hangup Cause = 1 means a 404, 485 or 604 where sent back as the SIP Code which maps to the Unallocated Number which generally means the number isn’t assigned in some way.


(Ian Arman) #4

hello,

i used the command sip show peers, and my Twilio sip trunk is connected properly.

twillo1/ 54.172.60.1 Yes Yes 5060 OK (69 ms)


(Tom Ray) #6

Yeah no one is going to read that misformatted mess of a log output. Fix it.


(Ian Arman) #7

Connected to Asterisk 13.26.0 currently running on sip-siliconvalley (pid = 1318
3)
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [+16135272653@from-internal:1] Macro("SIP/8083-0000002f", "user-callerid,LIMIT,EXTERNAL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/8083-0000002f", "TOUCH_MONITOR=1559682055.97") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/8083-0000002f", "AMPUSER=8083") in new stack
-- Executing [s@macro-user-callerid:3] GotoIf("SIP/8083-0000002f", "0?report") in new stack
-- Executing [s@macro-user-callerid:4] ExecIf("SIP/8083-0000002f", "1?Set(REALCALLERIDNUM=8083)") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/8083-0000002f", "AMPUSER=8083") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/8083-0000002f", "0?limit") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/8083-0000002f", "AMPUSERCIDNAME=OttawaKaraoke.com") in new stack
-- Executing [s@macro-user-callerid:8] ExecIf("SIP/8083-0000002f", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:9] GotoIf("SIP/8083-0000002f", "0?report") in new stack
-- Executing [s@macro-user-callerid:10] Set("SIP/8083-0000002f", "AMPUSERCID=8083") in new stack
-- Executing [s@macro-user-callerid:11] Set("SIP/8083-0000002f", "__DIAL_OPTIONS=HhTtr") in new stack
-- Executing [s@macro-user-callerid:12] Set("SIP/8083-0000002f", "CALLERID(all)="OttawaKaraoke.com" <8083>") in new stack
-- Executing [s@macro-user-callerid:13] GotoIf("SIP/8083-0000002f", "0?limit") in new stack
-- Executing [s@macro-user-callerid:14] ExecIf("SIP/8083-0000002f", "1?Set(GROUP(concurrency_limit)=8083)") in new stack
-- Executing [s@macro-user-callerid:15] ExecIf("SIP/8083-0000002f", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:16] NoOp("SIP/8083-0000002f", "Macro Depth is 1") in new stack
-- Executing [s@macro-user-callerid:17] GotoIf("SIP/8083-0000002f", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,18)

-- Executing [s@macro-user-callerid:18] GotoIf("SIP/8083-0000002f", "1?continue") in new stack
-- Goto (macro-user-callerid,s,37)
-- Executing [s@macro-user-callerid:37] Set("SIP/8083-0000002f", "CALLERID(number)=8083") in new stack
-- Executing [s@macro-user-callerid:38] Set("SIP/8083-0000002f", "CALLERID(name)=OttawaKaraoke.com") in new stack
-- Executing [s@macro-user-callerid:39] GotoIf("SIP/8083-0000002f", "0?cnum") in new stack
-- Executing [s@macro-user-callerid:40] Set("SIP/8083-0000002f", "CDR(cnam)=OttawaKaraoke.com") in new stack
-- Executing [s@macro-user-callerid:41] Set("SIP/8083-0000002f", "CDR(cnum)=8083") in new stack
-- Executing [s@macro-user-callerid:42] Set("SIP/8083-0000002f", "CHANNEL(language)=en") in new stack
-- Executing [+16135272653@from-internal:2] Gosub("SIP/8083-0000002f", "sub-record-check,s,1(out,+16135272653,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("SIP/8083-0000002f", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("SIP/8083-0000002f", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("SIP/8083-0000002f", "NOW=1559682055") in new stack
-- Executing [s@sub-record-check:4] Set("SIP/8083-0000002f", "__DAY=04") in new stack
-- Executing [s@sub-record-check:5] Set("SIP/8083-0000002f", "__MONTH=06") in new stack
-- Executing [s@sub-record-check:6] Set("SIP/8083-0000002f", "__YEAR=2019") in new stack
-- Executing [s@sub-record-check:7] Set("SIP/8083-0000002f", "__TIMESTR=20190604-170055") in new stack
-- Executing [s@sub-record-check:8] Set("SIP/8083-0000002f", "__FROMEXTEN=8083") in new stack
-- Executing [s@sub-record-check:9] Set("SIP/8083-0000002f", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("SIP/8083-0000002f", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("SIP/8083-0000002f", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("SIP/8083-0000002f", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("SIP/8083-0000002f", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("SIP/8083-0000002f", "3?checkaction") in new stack
-- Goto (sub-record-check,s,17)

-- Executing [s@sub-record-check:17] GotoIf("SIP/8083-0000002f", "1?sub-record-check,out,1") in new stack
-- Goto (sub-record-check,out,1)
-- Executing [out@sub-record-check:1] NoOp("SIP/8083-0000002f", "Outbound Recording Check from 8083 to +16135272653") in new stack
-- Executing [out@sub-record-check:2] Set("SIP/8083-0000002f", "RECMODE=dontcare") in new stack
-- Executing [out@sub-record-check:3] ExecIf("SIP/8083-0000002f", "1?Goto(routewins)") in new stack
-- Goto (sub-record-check,out,7)

-- Executing [out@sub-record-check:7] Gosub("SIP/8083-0000002f", "recordcheck,1(dontcare,out,+16135272653)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("SIP/8083-0000002f", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("SIP/8083-0000002f", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)

-- Executing [recordcheck@sub-record-check:3] Return("SIP/8083-0000002f", "") in new stack
-- Executing [out@sub-record-check:8] Return("SIP/8083-0000002f", "") in new stack
-- Executing [+16135272653@from-internal:3] ExecIf("SIP/8083-0000002f", "0 ?Set(CDR(accountcode)=)") in new stack
-- Executing [+16135272653@from-internal:4] Set("SIP/8083-0000002f", "ROUTE_CIDSAVE="OttawaKaraoke.com" <8083>") in new stack
-- Executing [+16135272653@from-internal:5] Set("SIP/8083-0000002f", "MOHCLASS=default") in new stack
-- Executing [+16135272653@from-internal:6] Set("SIP/8083-0000002f", "_NODEST=") in new stack
-- Executing [+16135272653@from-internal:7] Macro("SIP/8083-0000002f", "dialout-trunk,2,+16135272653,,on") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/8083-0000002f", "DIAL_TRUNK=2") in new stack
-- Executing [s@macro-dialout-trunk:2] ExecIf("SIP/8083-0000002f", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
-- Executing [s@macro-dialout-trunk:3] GosubIf("SIP/8083-0000002f", "0?sub-pincheck,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:4] ExecIf("SIP/8083-0000002f", "0?Set(CALLERID(num)=8083)") in new stack
-- Executing [s@macro-dialout-trunk:5] GotoIf("SIP/8083-0000002f", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/8083-0000002f", "DIAL_NUMBER=+16135272653") in new stack
-- Executing [s@macro-dialout-trunk:7] Set("SIP/8083-0000002f", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack
-- Executing [s@macro-dialout-trunk:8] Set("SIP/8083-0000002f", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [s@macro-dialout-trunk:9] Set("SIP/8083-0000002f", "DIAL_TRUNK_OPTIONS=T") in new stack
-- Executing [s@macro-dialout-trunk:10] GotoIf("SIP/8083-0000002f", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,12)

-- Executing [s@macro-dialout-trunk:12] GotoIf("SIP/8083-0000002f", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:13] Macro("SIP/8083-0000002f", "outbound-callerid,2") in new stack
-- Executing [s@macro-outbound-callerid:1] NoOp("SIP/8083-0000002f", "8083") in new stack
-- Executing [s@macro-outbound-callerid:2] NoOp("SIP/8083-0000002f", "") in new stack
-- Executing [s@macro-outbound-callerid:3] NoOp("SIP/8083-0000002f", "off") in new stack
-- Executing [s@macro-outbound-callerid:4] ExecIf("SIP/8083-0000002f", "0?Set(CALLERPRES(name-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:5] ExecIf("SIP/8083-0000002f", "0?Set(CALLERPRES(num-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:6] ExecIf("SIP/8083-0000002f", "0?Set(REALCALLERIDNUM=8083)") in new stack
-- Executing [s@macro-outbound-callerid:7] ExecIf("SIP/8083-0000002f", "0?Set(AMPUSER=8083)") in new stack
-- Executing [s@macro-outbound-callerid:8] GotoIf("SIP/8083-0000002f", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,12)

-- Executing [s@macro-outbound-callerid:12] Set("SIP/8083-0000002f", "USEROUTCID=+16135272653") in new stack
-- Executing [s@macro-outbound-callerid:13] Set("SIP/8083-0000002f", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:14] Set("SIP/8083-0000002f", "TRUNKOUTCID=+16135194257") in new stack
-- Executing [s@macro-outbound-callerid:15] GotoIf("SIP/8083-0000002f", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,21)

-- Executing [s@macro-outbound-callerid:21] ExecIf("SIP/8083-0000002f", "1?Set(CALLERID(all)=+16135194257)") in new stack
-- Executing [s@macro-outbound-callerid:22] ExecIf("SIP/8083-0000002f", "1?Set(CALLERID(all)=+16135272653)") in new stack
-- Executing [s@macro-outbound-callerid:23] ExecIf("SIP/8083-0000002f", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:24] ExecIf("SIP/8083-0000002f", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:25] ExecIf("SIP/8083-0000002f", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:26] Set("SIP/8083-0000002f", "CDR(outbound_cnum)=+16135272653") in new stack
-- Executing [s@macro-outbound-callerid:27] Set("SIP/8083-0000002f", "CDR(outbound_cnam)=") in new stack
-- Executing [s@macro-dialout-trunk:14] GosubIf("SIP/8083-0000002f", "1?sub-flp-2,s,1()") in new stack
-- Executing [s@sub-flp-2:1] ExecIf("SIP/8083-0000002f", "0?Set(TARGET_FLP_2=+135272653)") in new stack
-- Executing [s@sub-flp-2:2] GotoIf("SIP/8083-0000002f", "0?match") in new stack
-- Executing [s@sub-flp-2:3] Return("SIP/8083-0000002f", "") in new stack
-- Executing [s@macro-dialout-trunk:15] Set("SIP/8083-0000002f", "OUTNUM=+16135272653") in new stack
-- Executing [s@macro-dialout-trunk:16] Set("SIP/8083-0000002f", "custom=SIP/twillo1") in new stack
-- Executing [s@macro-dialout-trunk:17] ExecIf("SIP/8083-0000002f", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
-- Executing [s@macro-dialout-trunk:18] ExecIf("SIP/8083-0000002f", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
-- Executing [s@macro-dialout-trunk:19] Macro("SIP/8083-0000002f", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/8083-0000002f", "") in new stack
-- Executing [s@macro-dialout-trunk:20] GotoIf("SIP/8083-0000002f", "0?skipcrm") in new stack
-- Executing [s@macro-dialout-trunk:21] Set("SIP/8083-0000002f", "__CRM_DIRECTION=OUTBOUND") in new stack
-- Executing [s@macro-dialout-trunk:22] Set("SIP/8083-0000002f", "__CRM_DESTINATION=+16135272653") in new stack
-- Executing [s@macro-dialout-trunk:23] Set("SIP/8083-0000002f", "__CRM_SOURCE=8083") in new stack
-- Executing [s@macro-dialout-trunk:24] AGI("SIP/8083-0000002f", "sangomacrm.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
-- <SIP/8083-0000002f>AGI Script sangomacrm.agi completed, returning 0
-- Executing [s@macro-dialout-trunk:25] Set("SIP/8083-0000002f", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack
-- Executing [s@macro-dialout-trunk:26] NoOp("SIP/8083-0000002f", "CRM Finished") in new stack
-- Executing [s@macro-dialout-trunk:27] GotoIf("SIP/8083-0000002f", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:28] ExecIf("SIP/8083-0000002f", "1?Set(CONNECTEDLINE(num,i)=+16135272653)") in new stack
-- Executing [s@macro-dialout-trunk:29] ExecIf("SIP/8083-0000002f", "1?Set(CONNECTEDLINE(name,i)=CID:+16135272653)") in new stack
-- Executing [s@macro-dialout-trunk:30] ExecIf("SIP/8083-0000002f", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)+16135272653)") in new stack
-- Executing [s@macro-dialout-trunk:31] GotoIf("SIP/8083-0000002f", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:32] Dial("SIP/8083-0000002f", "SIP/twillo1/+16135272653,300,Tb(func-apply-sipheaders^s^1,(2))") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5

-- SIP/twillo1-00000030 Internal Gosub(func-apply-sipheaders,s,1(2)) start
-- Executing [s@func-apply-sipheaders:1] ExecIf("SIP/twillo1-00000030", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
-- Executing [s@func-apply-sipheaders:2] NoOp("SIP/twillo1-00000030", "Applying SIP Headers to channel SIP/twillo1-00000030") in new stack
-- Executing [s@func-apply-sipheaders:3] Set("SIP/twillo1-00000030", "TECH=SIP") in new stack
-- Executing [s@func-apply-sipheaders:4] Set("SIP/twillo1-00000030", "SIPHEADERKEYS=") in new stack
-- Executing [s@func-apply-sipheaders:5] While("SIP/twillo1-00000030", "0") in new stack
-- Jumping to priority 12
-- Executing [s@func-apply-sipheaders:13] Return("SIP/twillo1-00000030", "") in new stack
== Spawn extension (from-trunk-sip-twillo1, +16135272653, 1) exited non-zero on 'SIP/twillo1-00000030'
-- SIP/twillo1-00000030 Internal Gosub(func-apply-sipheaders,s,1(2)) complete GOSUB_RETVAL=
-- Called SIP/twillo1/+16135272653

== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [s@macro-dialout-trunk:33] NoOp("SIP/8083-0000002f", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 1") in new stack
-- Executing [s@macro-dialout-trunk:34] GotoIf("SIP/8083-0000002f", "1?continue,1:s-CHANUNAVAIL,1") in new stack
-- Goto (macro-dialout-trunk,continue,1)
-- Executing [continue@macro-dialout-trunk:1] NoOp("SIP/8083-0000002f", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 1 - failing through to other trunks") in new stack
-- Executing [continue@macro-dialout-trunk:2] ExecIf("SIP/8083-0000002f", "1?Set(CALLERID(number)=8083)") in new stack
-- Executing [+16135272653@from-internal:8] Set("SIP/8083-0000002f", "CALLERID(all)="OttawaKaraoke.com" <8083>") in new stack
-- Executing [+16135272653@from-internal:9] Set("SIP/8083-0000002f", "_KEEPCID=TRUE") in new stack
-- Executing [+16135272653@from-internal:10] Goto("SIP/8083-0000002f", "app-blackhole,hangup,1") in new stack
-- Goto (app-blackhole,hangup,1)
-- Executing [hangup@app-blackhole:1] NoOp("SIP/8083-0000002f", "Blackhole Dest: Hangup") in new stack
-- Executing [hangup@app-blackhole:2] Hangup("SIP/8083-0000002f", "") in new stack
== Spawn extension (app-blackhole, hangup, 2) exited non-zero on 'SIP/8083-0000002f'
-- SIP/8083-0000002f Internal Gosub(crm-hangup,s,1) start
-- Executing [s@crm-hangup:1] NoOp("SIP/8083-0000002f", "Sending Hangup to CRM") in new stack
-- Executing [s@crm-hangup:2] NoOp("SIP/8083-0000002f", "HANGUP CAUSE: 1") in new stack
-- Executing [s@crm-hangup:3] ExecIf("SIP/8083-0000002f", "0?Set(__CRM_VOICEMAIL=)") in new stack
-- Executing [s@crm-hangup:4] NoOp("SIP/8083-0000002f", "MASTER CHANNEL: 1559682055.97 = 1559682055.97") in new stack
-- Executing [s@crm-hangup:5] GotoIf("SIP/8083-0000002f", "0?return") in new stack
-- Executing [s@crm-hangup:6] Set("SIP/8083-0000002f", "__CRM_HANGUP=1") in new stack
-- Executing [s@crm-hangup:7] AGI("SIP/8083-0000002f", "sangomacrm.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
-- <SIP/8083-0000002f>AGI Script sangomacrm.agi completed, returning 0
-- Executing [s@crm-hangup:8] Return("SIP/8083-0000002f", "") in new stack
== Spawn extension (app-blackhole, hangup, 2) exited non-zero on 'SIP/8083-0000002f'
-- SIP/8083-0000002f Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
``


(Ian Arman) #8

@BlazeStudios

your comment has affected my post

please delete your comment, or reply to my post


(Tom Ray) #9

Sames as my original post, unknown or unallowed number. This is a real number? Are you having issues calling other numbers or just this one.


(Itzik) #10

(Ian Arman) #11

Hello, @BlazeStudios

Thank you for your reply.

I’m calling the following number +16135272653, from extension 8083.

I can call extensions properly, they ring each other, but I can’t call external numbers.


(Dave Burgess) #12

Contact the support people from your ITSP/VSP and ask them to look at their logs for the call. I expect they can steer you towards the correct solution to the problem.


(system) closed #13

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