Outbound route not functioning, yealink provisioning issue

Hello,

I’m extremely new to FreePBX and with my current configuration the inbound routing seems to be working well into the ring group however outbound doesn’t seem to function correctly. I’m using a Patton SN4112 gateway (two POTS lines coming in from landline provider) into a Sangoma 40 system with 5 Yealink T23G endpoints. Extensions seem to be able to call between each other but are not getting routed out the gateway correctly.

At this point I’m assuming the outbound issue has something to do with my trunk and/or outbound routing config. Do I need to have dial number manipulation rules on the trunk? I’m trying to set it up so that users can just pick up the receiver and start dialing to get out as the current system does.

Also, while I can get phone endpoints registered in the system to take calls the provisioning doesn’t work correctly. When I can get the auto-provision working it just gets sent incomprehensible system setup with buttons showing things like “line1Name” which makes me thing that then endpoint manager isn’t creating the template correctly.

I can provide the patton’s config or any other information that may be needed to diagnose the issue.

https://wiki.freepbx.org/display/SUP/Providing+Great+Debug#ProvidingGreatDebug-AsteriskLogs-PartII

How did you provision these phones?

1 Like

I apologize for the late response. If you’re asking what protocol I’m trying to use it’s HTTP.

Hi @Sharkeri Could you upgrade the EPM module to the latest and then try to provision the phones again? If still, you find the same behavior then provide the EPM module version details.

Thank you all for the help, I’ve updated it to the latest version. It looks like it’s provisioning but the behavior has changed a bit. Instead of buttons displaying things like line1Name it’s just not setting up the Dsskey options according to what I’ve set up in the template. It sets the line keys to N/A and doesn’t change the programmable softkeys at all. The EPM version is 14.0.37. I also have a the logs for the failed “all circuits busy” outbound event but I need to make sure it’s anonymized before I post it but I won’t have time to do that until tomorrow.

I’ve still not worked out why the autoprovision isn’t setting up the softkeys properly. Is there any diagnostic information that would help diagnose the issue with the provisioning?

With regards to the call out problem.
Here is the log from a failed call where “all circuits are busy” not sure what I need to do to fix this for outgoing. the 816XXXXXXX is an actual number just replaced the last 7 with X’s. CID replaced with “BUSINESS”.

[root@freepbx ~]# grep C-0000000b /var/log/asterisk/full*

pbx.c: Executing [816XXXXXXX@from-internal:1] Macro("PJSIP/004-00000011", "user-callerid,LIMIT") in new stack

pbx.c: Executing [s@macro-user-callerid:1] Set("PJSIP/004-00000011", "TOUCH_MONITOR=1582529592.32") in new stack

pbx.c: Executing [s@macro-user-callerid:2] Set("PJSIP/004-00000011", "AMPUSER=004") in new stack

pbx.c: Executing [s@macro-user-callerid:3] GotoIf("PJSIP/004-00000011", "0?report") in new stack

pbx.c: Executing [s@macro-user-callerid:4] ExecIf("PJSIP/004-00000011", "1?Set(REALCALLERIDNUM=004)") in new stack

pbx.c: Executing [s@macro-user-callerid:5] Set("PJSIP/004-00000011", "AMPUSER=004") in new stack

pbx.c: Executing [s@macro-user-callerid:6] GotoIf("PJSIP/004-00000011", "0?limit") in new stack

pbx.c: Executing [s@macro-user-callerid:7] Set("PJSIP/004-00000011", "AMPUSERCIDNAME=Shop") in new stack

pbx.c: Executing [s@macro-user-callerid:8] ExecIf("PJSIP/004-00000011", "0?Set(__CIDMASQUERADING=TRUE)") in new stack

pbx.c: Executing [s@macro-user-callerid:9] GotoIf("PJSIP/004-00000011", "0?report") in new stack

pbx.c: Executing [s@macro-user-callerid:10] Set("PJSIP/004-00000011", "AMPUSERCID=004") in new stack

pbx.c: Executing [s@macro-user-callerid:11] Set("PJSIP/004-00000011", "__DIAL_OPTIONS=HhTtr") in new stack

pbx.c: Executing [s@macro-user-callerid:12] Set("PJSIP/004-00000011", "CALLERID(all)="Shop" <004>") in new stack

pbx.c: Executing [s@macro-user-callerid:13] ExecIf("PJSIP/004-00000011", "0?Set(CALLERID(all)=)") in new stack

pbx.c: Executing [s@macro-user-callerid:14] GotoIf("PJSIP/004-00000011", "0?limit") in new stack

pbx.c: Executing [s@macro-user-callerid:15] ExecIf("PJSIP/004-00000011", "1?Set(GROUP(concurrency_limit)=004)") in new stack

pbx.c: Executing [s@macro-user-callerid:16] ExecIf("PJSIP/004-00000011", "1?Set(CHANNEL(language)=en)") in new stack

pbx.c: Executing [s@macro-user-callerid:17] NoOp("PJSIP/004-00000011", "Macro Depth is 1") in new stack

pbx.c: Executing [s@macro-user-callerid:18] GotoIf("PJSIP/004-00000011", "1?report2:macroerror") in new stack

pbx_builtins.c: Goto (macro-user-callerid,s,19)

pbx.c: Executing [s@macro-user-callerid:19] GotoIf("PJSIP/004-00000011", "1?continue") in new stack

pbx_builtins.c: Goto (macro-user-callerid,s,38)

pbx.c: Executing [s@macro-user-callerid:38] Set("PJSIP/004-00000011", "CALLERID(number)=004") in new stack

pbx.c: Executing [s@macro-user-callerid:39] Set("PJSIP/004-00000011", "CALLERID(name)=Shop") in new stack

pbx.c: Executing [s@macro-user-callerid:40] GotoIf("PJSIP/004-00000011", "0?cnum") in new stack

pbx.c: Executing [s@macro-user-callerid:41] Set("PJSIP/004-00000011", "CDR(cnam)=Shop") in new stack

pbx.c: Executing [s@macro-user-callerid:42] Set("PJSIP/004-00000011", "CDR(cnum)=004") in new stack

pbx.c: Executing [s@macro-user-callerid:43] Set("PJSIP/004-00000011", "CHANNEL(language)=en") in new stack

pbx.c: Executing [816XXXXXXX@from-internal:2] Set("PJSIP/004-00000011", "ROUTEUSER=004") in new stack

pbx.c: Executing [816XXXXXXX@from-internal:3] Set("PJSIP/004-00000011", "ROUTEUSER=004") in new stack

pbx.c: Executing [816XXXXXXX@from-internal:4] GotoIf("PJSIP/004-00000011", "1?notblind") in new stack

pbx_builtins.c: Goto (from-internal,816XXXXXXX,7)

pbx.c: Executing [816XXXXXXX@from-internal:7] GotoIf("PJSIP/004-00000011", "1?restrictedroute-a87ff679a2f3e71d9181a67b7542122c,816XXXXXXX,2:outbound-allroutes,816XXXXXXX,2") in new stack

pbx_builtins.c: Goto (restrictedroute-a87ff679a2f3e71d9181a67b7542122c,816XXXXXXX,2)

pbx.c: Executing [816XXXXXXX@restrictedroute-a87ff679a2f3e71d9181a67b7542122c:2] Gosub("PJSIP/004-00000011", "sub-record-check,s,1(out,816XXXXXXX,dontcare)") in new stack

pbx.c: Executing [s@sub-record-check:1] GotoIf("PJSIP/004-00000011", "0?initialized") in new stack

pbx.c: Executing [s@sub-record-check:2] Set("PJSIP/004-00000011", "__REC_STATUS=INITIALIZED") in new stack

pbx.c: Executing [s@sub-record-check:3] Set("PJSIP/004-00000011", "NOW=1582529592") in new stack

pbx.c: Executing [s@sub-record-check:4] Set("PJSIP/004-00000011", "__DAY=24") in new stack

pbx.c: Executing [s@sub-record-check:5] Set("PJSIP/004-00000011", "__MONTH=02") in new stack

pbx.c: Executing [s@sub-record-check:6] Set("PJSIP/004-00000011", "__YEAR=2020") in new stack

pbx.c: Executing [s@sub-record-check:7] Set("PJSIP/004-00000011", "__TIMESTR=20200224-013312") in new stack

pbx.c: Executing [s@sub-record-check:8] Set("PJSIP/004-00000011", "__FROMEXTEN=004") in new stack

pbx.c: Executing [s@sub-record-check:9] Set("PJSIP/004-00000011", "__MON_FMT=wav") in new stack

pbx.c: Executing [s@sub-record-check:10] NoOp("PJSIP/004-00000011", "Recordings initialized") in new stack

pbx.c: Executing [s@sub-record-check:11] ExecIf("PJSIP/004-00000011", "0?Set(ARG3=dontcare)") in new stack

pbx.c: Executing [s@sub-record-check:12] Set("PJSIP/004-00000011", "REC_POLICY_MODE_SAVE=") in new stack

pbx.c: Executing [s@sub-record-check:13] ExecIf("PJSIP/004-00000011", "0?Set(REC_STATUS=NO)") in new stack

pbx.c: Executing [s@sub-record-check:14] GotoIf("PJSIP/004-00000011", "3?checkaction") in new stack

pbx_builtins.c: Goto (sub-record-check,s,17)

pbx.c: Executing [s@sub-record-check:17] GotoIf("PJSIP/004-00000011", "1?sub-record-check,out,1") in new stack

pbx_builtins.c: Goto (sub-record-check,out,1)

pbx.c: Executing [out@sub-record-check:1] NoOp("PJSIP/004-00000011", "Outbound Recording Check from 004 to 816XXXXXXX") in new stack

pbx.c: Executing [out@sub-record-check:2] Set("PJSIP/004-00000011", "RECMODE=dontcare") in new stack

pbx.c: Executing [out@sub-record-check:3] ExecIf("PJSIP/004-00000011", "1?Goto(routewins)") in new stack

pbx_builtins.c: Goto (sub-record-check,out,7)

pbx.c: Executing [out@sub-record-check:7] Gosub("PJSIP/004-00000011", "recordcheck,1(dontcare,out,816XXXXXXX)") in new stack

pbx.c: Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/004-00000011", "Starting recording check against dontcare") in new stack

pbx.c: Executing [recordcheck@sub-record-check:2] Goto("PJSIP/004-00000011", "dontcare") in new stack

pbx_builtins.c: Goto (sub-record-check,recordcheck,3)

pbx.c: Executing [recordcheck@sub-record-check:3] Return("PJSIP/004-00000011", "") in new stack

pbx.c: Executing [out@sub-record-check:8] Return("PJSIP/004-00000011", "") in new stack

pbx.c: Executing [816XXXXXXX@restrictedroute-a87ff679a2f3e71d9181a67b7542122c:3] ExecIf("PJSIP/004-00000011", "0 ?Set(CDR(accountcode)=)") in new stack

pbx.c: Executing [816XXXXXXX@restrictedroute-a87ff679a2f3e71d9181a67b7542122c:4] Set("PJSIP/004-00000011", "MOHCLASS=default") in new stack

pbx.c: Executing [816XXXXXXX@restrictedroute-a87ff679a2f3e71d9181a67b7542122c:5] Set("PJSIP/004-00000011", "_NODEST=") in new stack

pbx.c: Executing [816XXXXXXX@restrictedroute-a87ff679a2f3e71d9181a67b7542122c:6] Macro("PJSIP/004-00000011", "dialout-trunk,1,816XXXXXXX,off") in new stack

pbx.c: Executing [s@macro-dialout-trunk:1] Set("PJSIP/004-00000011", "DIAL_TRUNK=1") in new stack

pbx.c: Executing [s@macro-dialout-trunk:2] UserEvent("PJSIP/004-00000011", "zulu-outbound-call,from:004,to:816XXXXXXX") in new stack

pbx.c: Executing [s@macro-dialout-trunk:3] ExecIf("PJSIP/004-00000011", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:4] GosubIf("PJSIP/004-00000011", "0?sub-pincheck,s,1()") in new stack

pbx.c: Executing [s@macro-dialout-trunk:5] ExecIf("PJSIP/004-00000011", "0?Set(CALLERID(num)=004)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:6] GotoIf("PJSIP/004-00000011", "0?disabletrunk,1") in new stack

pbx.c: Executing [s@macro-dialout-trunk:7] Set("PJSIP/004-00000011", "DIAL_NUMBER=816XXXXXXX") in new stack

pbx.c: Executing [s@macro-dialout-trunk:8] Set("PJSIP/004-00000011", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack

pbx.c: Executing [s@macro-dialout-trunk:9] Set("PJSIP/004-00000011", "OUTBOUND_GROUP=OUT_1") in new stack

pbx.c: Executing [s@macro-dialout-trunk:10] Set("PJSIP/004-00000011", "DIAL_TRUNK_OPTIONS=T") in new stack

pbx.c: Executing [s@macro-dialout-trunk:11] GotoIf("PJSIP/004-00000011", "1?nomax") in new stack

pbx_builtins.c: Goto (macro-dialout-trunk,s,13)

pbx.c: Executing [s@macro-dialout-trunk:13] GotoIf("PJSIP/004-00000011", "0?skipoutcid") in new stack

pbx.c: Executing [s@macro-dialout-trunk:14] Macro("PJSIP/004-00000011", "outbound-callerid,1") in new stack

pbx.c: Executing [s@macro-outbound-callerid:1] NoOp("PJSIP/004-00000011", "004") in new stack

pbx.c: Executing [s@macro-outbound-callerid:2] NoOp("PJSIP/004-00000011", "") in new stack

pbx.c: Executing [s@macro-outbound-callerid:3] NoOp("PJSIP/004-00000011", "off") in new stack

pbx.c: Executing [s@macro-outbound-callerid:4] ExecIf("PJSIP/004-00000011", "0?Set(CALLERPRES(name-pres)=)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:5] ExecIf("PJSIP/004-00000011", "0?Set(CALLERPRES(num-pres)=)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:6] ExecIf("PJSIP/004-00000011", "0?Set(REALCALLERIDNUM=004)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:7] ExecIf("PJSIP/004-00000011", "0?Set(AMPUSER=004)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:8] GotoIf("PJSIP/004-00000011", "1?normcid") in new stack

pbx_builtins.c: Goto (macro-outbound-callerid,s,12)

pbx.c: Executing [s@macro-outbound-callerid:12] Set("PJSIP/004-00000011", "USEROUTCID=") in new stack

pbx.c: Executing [s@macro-outbound-callerid:13] Set("PJSIP/004-00000011", "EMERGENCYCID=") in new stack

pbx.c: Executing [s@macro-outbound-callerid:14] Set("PJSIP/004-00000011", "TRUNKOUTCID=BUSINESS") in new stack

pbx.c: Executing [s@macro-outbound-callerid:15] GotoIf("PJSIP/004-00000011", "1?trunkcid") in new stack

pbx_builtins.c: Goto (macro-outbound-callerid,s,21)

pbx.c: Executing [s@macro-outbound-callerid:21] ExecIf("PJSIP/004-00000011", "1?Set(CALLERID(all)=BUSINESS)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:22] ExecIf("PJSIP/004-00000011", "0?Set(CALLERID(all)=)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:23] ExecIf("PJSIP/004-00000011", "0?Set(CALLERID(all)=)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:24] ExecIf("PJSIP/004-00000011", "0?Set(CALLERID(all)=004)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:25] ExecIf("PJSIP/004-00000011", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:26] ExecIf("PJSIP/004-00000011", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:27] Set("PJSIP/004-00000011", "CDR(outbound_cnum)=") in new stack

pbx.c: Executing [s@macro-outbound-callerid:28] Set("PJSIP/004-00000011", "CDR(outbound_cnam)=BUSINESS") in new stack

pbx.c: Executing [s@macro-dialout-trunk:15] GosubIf("PJSIP/004-00000011", "0?sub-flp-1,s,1()") in new stack

pbx.c: Executing [s@macro-dialout-trunk:16] Set("PJSIP/004-00000011", "OUTNUM=816XXXXXXX") in new stack

pbx.c: Executing [s@macro-dialout-trunk:17] Set("PJSIP/004-00000011", "custom=PJSIP") in new stack

pbx.c: Executing [s@macro-dialout-trunk:18] ExecIf("PJSIP/004-00000011", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/004-00000011", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack

pbx.c: Executing [s@macro-dialout-trunk:20] Macro("PJSIP/004-00000011", "dialout-trunk-predial-hook,") in new stack

pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/004-00000011", "") in new stack

pbx.c: Executing [s@macro-dialout-trunk:21] GotoIf("PJSIP/004-00000011", "0?skipcrm") in new stack

pbx.c: Executing [s@macro-dialout-trunk:22] Set("PJSIP/004-00000011", "__CRM_DIRECTION=OUTBOUND") in new stack

pbx.c: Executing [s@macro-dialout-trunk:23] Set("PJSIP/004-00000011", "__CRM_DESTINATION=816XXXXXXX") in new stack

pbx.c: Executing [s@macro-dialout-trunk:24] Set("PJSIP/004-00000011", "__CRM_SOURCE=004") in new stack

pbx.c: Executing [s@macro-dialout-trunk:25] AGI("PJSIP/004-00000011", "sangomacrm.agi") in new stack

res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi

res_agi.c: <PJSIP/004-00000011>AGI Script sangomacrm.agi completed, returning 0

pbx.c: Executing [s@macro-dialout-trunk:26] Set("PJSIP/004-00000011", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack

pbx.c: Executing [s@macro-dialout-trunk:27] NoOp("PJSIP/004-00000011", "CRM Finished") in new stack

pbx.c: Executing [s@macro-dialout-trunk:28] GotoIf("PJSIP/004-00000011", "0?bypass,1") in new stack

pbx.c: Executing [s@macro-dialout-trunk:29] ExecIf("PJSIP/004-00000011", "1?Set(CONNECTEDLINE(num,i)=816XXXXXXX)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:30] ExecIf("PJSIP/004-00000011", "1?Set(CONNECTEDLINE(name,i)=CID:)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:31] ExecIf("PJSIP/004-00000011", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden))") in new stack

pbx.c: Executing [s@macro-dialout-trunk:32] GotoIf("PJSIP/004-00000011", "0?customtrunk") in new stack

pbx.c: Executing [s@macro-dialout-trunk:33] ExecIf("PJSIP/004-00000011", "0?Set(DIAL_TRUNK_OPTIONS=)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:34] Dial("PJSIP/004-00000011", "PJSIP/816XXXXXXX@PSTN1,300,Tb(func-apply-sipheaders^s^1,(1))") in new stack

app_stack.c: PJSIP/PSTN1-00000012 Internal Gosub(func-apply-sipheaders,s,1(1)) start

pbx.c: Executing [s@func-apply-sipheaders:1] ExecIf("PJSIP/PSTN1-00000012", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack

pbx.c: Executing [s@func-apply-sipheaders:2] NoOp("PJSIP/PSTN1-00000012", "Applying SIP Headers to channel PJSIP/PSTN1-00000012") in new stack

pbx.c: Executing [s@func-apply-sipheaders:3] Set("PJSIP/PSTN1-00000012", "TECH=PJSIP") in new stack

pbx.c: Executing [s@func-apply-sipheaders:4] Set("PJSIP/PSTN1-00000012", "SIPHEADERKEYS=") in new stack

pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/PSTN1-00000012", "0") in new stack

app_while.c: Jumping to priority 13

pbx.c: Executing [s@func-apply-sipheaders:14] Return("PJSIP/PSTN1-00000012", "") in new stack

app_stack.c: Spawn extension (from-pstn, 816XXXXXXX, 1) exited non-zero on ‘PJSIP/PSTN1-00000012’

app_stack.c: PJSIP/PSTN1-00000012 Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=

app_dial.c: Called PJSIP/816XXXXXXX@PSTN1

app_dial.c: Everyone is busy/congested at this time (1:0/0/1)

pbx.c: Executing [s@macro-dialout-trunk:35] NoOp("PJSIP/004-00000011", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 102") in new stack

pbx.c: Executing [s@macro-dialout-trunk:36] GotoIf("PJSIP/004-00000011", "0?continue,1:s-CHANUNAVAIL,1") in new stack

pbx_builtins.c: Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)

pbx.c: Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("PJSIP/004-00000011", "RC=102") in new stack

pbx.c: Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("PJSIP/004-00000011", "102,1") in new stack

pbx_builtins.c: Goto (macro-dialout-trunk,102,1)

pbx.c: Executing [102@macro-dialout-trunk:1] Goto("PJSIP/004-00000011", "continue,1") in new stack

pbx_builtins.c: Goto (macro-dialout-trunk,continue,1)

pbx.c: Executing [continue@macro-dialout-trunk:1] NoOp("PJSIP/004-00000011", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 102 - failing through to other trunks") in new stack

pbx.c: Executing [continue@macro-dialout-trunk:2] ExecIf("PJSIP/004-00000011", "1?Set(CALLERID(number)=004)") in new stack

pbx.c: Executing [816XXXXXXX@restrictedroute-a87ff679a2f3e71d9181a67b7542122c:7] Macro("PJSIP/004-00000011", "dialout-trunk,2,816XXXXXXX,off") in new stack

pbx.c: Executing [s@macro-dialout-trunk:1] Set("PJSIP/004-00000011", "DIAL_TRUNK=2") in new stack

pbx.c: Executing [s@macro-dialout-trunk:2] UserEvent("PJSIP/004-00000011", "zulu-outbound-call,from:004,to:816XXXXXXX") in new stack

pbx.c: Executing [s@macro-dialout-trunk:3] ExecIf("PJSIP/004-00000011", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:4] GosubIf("PJSIP/004-00000011", "0?sub-pincheck,s,1()") in new stack

pbx.c: Executing [s@macro-dialout-trunk:5] ExecIf("PJSIP/004-00000011", "0?Set(CALLERID(num)=004)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:6] GotoIf("PJSIP/004-00000011", "0?disabletrunk,1") in new stack

pbx.c: Executing [s@macro-dialout-trunk:7] Set("PJSIP/004-00000011", "DIAL_NUMBER=816XXXXXXX") in new stack

pbx.c: Executing [s@macro-dialout-trunk:8] Set("PJSIP/004-00000011", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack

pbx.c: Executing [s@macro-dialout-trunk:9] Set("PJSIP/004-00000011", "OUTBOUND_GROUP=OUT_2") in new stack

pbx.c: Executing [s@macro-dialout-trunk:10] Set("PJSIP/004-00000011", "DIAL_TRUNK_OPTIONS=T") in new stack

pbx.c: Executing [s@macro-dialout-trunk:11] GotoIf("PJSIP/004-00000011", "1?nomax") in new stack

pbx_builtins.c: Goto (macro-dialout-trunk,s,13)

pbx.c: Executing [s@macro-dialout-trunk:13] GotoIf("PJSIP/004-00000011", "0?skipoutcid") in new stack

pbx.c: Executing [s@macro-dialout-trunk:14] Macro("PJSIP/004-00000011", "outbound-callerid,2") in new stack

pbx.c: Executing [s@macro-outbound-callerid:1] NoOp("PJSIP/004-00000011", "004") in new stack

pbx.c: Executing [s@macro-outbound-callerid:2] NoOp("PJSIP/004-00000011", "") in new stack

pbx.c: Executing [s@macro-outbound-callerid:3] NoOp("PJSIP/004-00000011", "off") in new stack

pbx.c: Executing [s@macro-outbound-callerid:4] ExecIf("PJSIP/004-00000011", "0?Set(CALLERPRES(name-pres)=)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:5] ExecIf("PJSIP/004-00000011", "0?Set(CALLERPRES(num-pres)=)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:6] ExecIf("PJSIP/004-00000011", "0?Set(REALCALLERIDNUM=004)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:7] ExecIf("PJSIP/004-00000011", "0?Set(AMPUSER=004)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:8] GotoIf("PJSIP/004-00000011", "1?normcid") in new stack

pbx_builtins.c: Goto (macro-outbound-callerid,s,12)

pbx.c: Executing [s@macro-outbound-callerid:12] Set("PJSIP/004-00000011", "USEROUTCID=") in new stack

pbx.c: Executing [s@macro-outbound-callerid:13] Set("PJSIP/004-00000011", "EMERGENCYCID=") in new stack

pbx.c: Executing [s@macro-outbound-callerid:14] Set("PJSIP/004-00000011", "TRUNKOUTCID=BUSINESS") in new stack

pbx.c: Executing [s@macro-outbound-callerid:15] GotoIf("PJSIP/004-00000011", "1?trunkcid") in new stack

pbx_builtins.c: Goto (macro-outbound-callerid,s,21)

pbx.c: Executing [s@macro-outbound-callerid:21] ExecIf("PJSIP/004-00000011", "1?Set(CALLERID(all)=BUSINESS)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:22] ExecIf("PJSIP/004-00000011", "0?Set(CALLERID(all)=)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:23] ExecIf("PJSIP/004-00000011", "0?Set(CALLERID(all)=)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:24] ExecIf("PJSIP/004-00000011", "0?Set(CALLERID(all)=004)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:25] ExecIf("PJSIP/004-00000011", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:26] ExecIf("PJSIP/004-00000011", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack

pbx.c: Executing [s@macro-outbound-callerid:27] Set("PJSIP/004-00000011", "CDR(outbound_cnum)=") in new stack

pbx.c: Executing [s@macro-outbound-callerid:28] Set("PJSIP/004-00000011", "CDR(outbound_cnam)=BUSINESS") in new stack

pbx.c: Executing [s@macro-dialout-trunk:15] GosubIf("PJSIP/004-00000011", "0?sub-flp-2,s,1()") in new stack

pbx.c: Executing [s@macro-dialout-trunk:16] Set("PJSIP/004-00000011", "OUTNUM=816XXXXXXX") in new stack

pbx.c: Executing [s@macro-dialout-trunk:17] Set("PJSIP/004-00000011", "custom=PJSIP") in new stack

pbx.c: Executing [s@macro-dialout-trunk:18] ExecIf("PJSIP/004-00000011", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/004-00000011", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack

pbx.c: Executing [s@macro-dialout-trunk:20] Macro("PJSIP/004-00000011", "dialout-trunk-predial-hook,") in new stack

pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/004-00000011", "") in new stack

pbx.c: Executing [s@macro-dialout-trunk:21] GotoIf("PJSIP/004-00000011", "1?skipcrm") in new stack

pbx_builtins.c: Goto (macro-dialout-trunk,s,27)

pbx.c: Executing [s@macro-dialout-trunk:27] NoOp("PJSIP/004-00000011", "CRM Finished") in new stack

pbx.c: Executing [s@macro-dialout-trunk:28] GotoIf("PJSIP/004-00000011", "0?bypass,1") in new stack

pbx.c: Executing [s@macro-dialout-trunk:29] ExecIf("PJSIP/004-00000011", "1?Set(CONNECTEDLINE(num,i)=816XXXXXXX)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:30] ExecIf("PJSIP/004-00000011", "1?Set(CONNECTEDLINE(name,i)=CID:)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:31] ExecIf("PJSIP/004-00000011", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden))") in new stack

pbx.c: Executing [s@macro-dialout-trunk:32] GotoIf("PJSIP/004-00000011", "0?customtrunk") in new stack

pbx.c: Executing [s@macro-dialout-trunk:33] ExecIf("PJSIP/004-00000011", "0?Set(DIAL_TRUNK_OPTIONS=)") in new stack

pbx.c: Executing [s@macro-dialout-trunk:34] Dial("PJSIP/004-00000011", "PJSIP/816XXXXXXX@PSTN2,300,Tb(func-apply-sipheaders^s^1,(2))") in new stack

app_stack.c: PJSIP/PSTN2-00000013 Internal Gosub(func-apply-sipheaders,s,1(2)) start

pbx.c: Executing [s@func-apply-sipheaders:1] ExecIf("PJSIP/PSTN2-00000013", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack

pbx.c: Executing [s@func-apply-sipheaders:2] NoOp("PJSIP/PSTN2-00000013", "Applying SIP Headers to channel PJSIP/PSTN2-00000013") in new stack

pbx.c: Executing [s@func-apply-sipheaders:3] Set("PJSIP/PSTN2-00000013", "TECH=PJSIP") in new stack

pbx.c: Executing [s@func-apply-sipheaders:4] Set("PJSIP/PSTN2-00000013", "SIPHEADERKEYS=") in new stack

pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/PSTN2-00000013", "0") in new stack

app_while.c: Jumping to priority 13

pbx.c: Executing [s@func-apply-sipheaders:14] Return("PJSIP/PSTN2-00000013", "") in new stack

app_stack.c: Spawn extension (from-pstn, 816XXXXXXX, 1) exited non-zero on ‘PJSIP/PSTN2-00000013’

app_stack.c: PJSIP/PSTN2-00000013 Internal Gosub(func-apply-sipheaders,s,1(2)) complete GOSUB_RETVAL=

app_dial.c: Called PJSIP/816XXXXXXX@PSTN2

app_dial.c: Everyone is busy/congested at this time (1:0/0/1)

pbx.c: Executing [s@macro-dialout-trunk:35] NoOp("PJSIP/004-00000011", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 102") in new stack

pbx.c: Executing [s@macro-dialout-trunk:36] GotoIf("PJSIP/004-00000011", "0?continue,1:s-CHANUNAVAIL,1") in new stack

pbx_builtins.c: Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)

pbx.c: Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("PJSIP/004-00000011", "RC=102") in new stack

pbx.c: Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("PJSIP/004-00000011", "102,1") in new stack

pbx_builtins.c: Goto (macro-dialout-trunk,102,1)

pbx.c: Executing [102@macro-dialout-trunk:1] Goto("PJSIP/004-00000011", "continue,1") in new stack

pbx_builtins.c: Goto (macro-dialout-trunk,continue,1)

pbx.c: Executing [continue@macro-dialout-trunk:1] NoOp("PJSIP/004-00000011", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 102 - failing through to other trunks") in new stack

pbx.c: Executing [continue@macro-dialout-trunk:2] ExecIf("PJSIP/004-00000011", "1?Set(CALLERID(number)=004)") in new stack

pbx.c: Executing [816XXXXXXX@restrictedroute-a87ff679a2f3e71d9181a67b7542122c:8] Macro("PJSIP/004-00000011", "outisbusy,") in new stack

pbx.c: Executing [s@macro-outisbusy:1] Progress("PJSIP/004-00000011", "") in new stack

pbx.c: Executing [s@macro-outisbusy:2] GotoIf("PJSIP/004-00000011", "0?emergency,1") in new stack

pbx.c: Executing [s@macro-outisbusy:3] GotoIf("PJSIP/004-00000011", "0?intracompany,1") in new stack

pbx.c: Executing [s@macro-outisbusy:4] Playback("PJSIP/004-00000011", "all-circuits-busy-now&please-try-call-later, noanswer") in new stack

file.c: <PJSIP/004-00000011> Playing ‘all-circuits-busy-now.g722’ (language ‘en’)

file.c: <PJSIP/004-00000011> Playing ‘please-try-call-later.ulaw’ (language ‘en’)

pbx.c: Executing [s@macro-outisbusy:5] Congestion("PJSIP/004-00000011", "20") in new stack

app_macro.c: Spawn extension (macro-outisbusy, s, 5) exited non-zero on ‘PJSIP/004-00000011’ in macro ‘outisbusy’

pbx.c: Spawn extension (restrictedroute-a87ff679a2f3e71d9181a67b7542122c, 816XXXXXXX, 8) exited non-zero on ‘PJSIP/004-00000011’

pbx.c: Executing [h@restrictedroute-a87ff679a2f3e71d9181a67b7542122c:1] Hangup("PJSIP/004-00000011", "") in new stack

pbx.c: Spawn extension (restrictedroute-a87ff679a2f3e71d9181a67b7542122c, h, 1) exited non-zero on ‘PJSIP/004-00000011’

app_stack.c: PJSIP/004-00000011 Internal Gosub(crm-hangup,s,1) start

pbx.c: Executing [s@crm-hangup:1] NoOp("PJSIP/004-00000011", "Sending Hangup to CRM") in new stack

pbx.c: Executing [s@crm-hangup:2] NoOp("PJSIP/004-00000011", "HANGUP CAUSE: 34") in new stack

pbx.c: Executing [s@crm-hangup:3] ExecIf("PJSIP/004-00000011", "0?Set(__CRM_VOICEMAIL=)") in new stack

pbx.c: Executing [s@crm-hangup:4] NoOp("PJSIP/004-00000011", "MASTER CHANNEL: 1582529592.32 = 1582529592.32") in new stack

pbx.c: Executing [s@crm-hangup:5] GotoIf("PJSIP/004-00000011", "0?return") in new stack

pbx.c: Executing [s@crm-hangup:6] Set("PJSIP/004-00000011", "__CRM_HANGUP=1") in new stack

pbx.c: Executing [s@crm-hangup:7] AGI("PJSIP/004-00000011", "sangomacrm.agi") in new stack

res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi

res_agi.c: <PJSIP/004-00000011>AGI Script sangomacrm.agi completed, returning 0

pbx.c: Executing [s@crm-hangup:8] Return("PJSIP/004-00000011", "") in new stack

app_stack.c: Spawn extension (restrictedroute-a87ff679a2f3e71d9181a67b7542122c, h, 1) exited non-zero on ‘PJSIP/004-00000011’

app_stack.c: PJSIP/004-00000011 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

You replaced the name, but what about the number? It appears to be 004, which may be why your gateway rejected the call. Cause code 102 is supposedly a timeout, but it’s hard to tell because your log seems to be missing timestamps and entry types. When you view Reports → Asterisk Logfiles, do you see them?

In any case, at the Asterisk command prompt, type
pjsip set logger on
then make a failing call. The SIP trace will now appear in the regular Asterisk log and you should be able to see the outgoing INVITE and the gateway’s response. Possibly, the gateway (or the POTS line) requires 1816XXXXXXX. If you can’t figure it out from the SIP, the Patton should have logs providing more detail.

Yeah, sorry about the missing info. I was trying to get under the post character limit I have the timestamps and everything there just wasn’t room. 004 is the actual extension number - attempting to maintain their original extension setup with 6 extensions- “BUSINESS” is what I replaced the actual caller ID (name of the organization) with for posting purposes. Is that 00X unsupported or problematic? I’ll try looking at the gateway’s logs tonight with a few failed outbound calls, for some reason it slipped my mind to check if the call was hitting the gateway and what it was doing. Thank you.

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