Custom Destination

Hi Everyone,

We just transferred our users from FreePBX 13.0.197 to FreePBX 16.0.10.49, everything is working except for the custom destination. I just copied all the settings in the previous in the custom destination portion (ex. ext-local,1234,1), extension, including settings in extensions_custom.conf are exactly the same. Take note that in the previous FreePBX everything is working including the custom destination.

I am wondering what else is missing. Below are the logs from the new FreePBX after doing test call (I change some variables such as the trunk, caller id, extension, IP address for security reasons). I am not sure why it is treating the extension that it should be registered whereas in the previous version, it just executes as what is configured in the extensions_custom.conf (no need to log in the extension in the softphone)

entry in extensions_custom.conf
[7777]
exten => 7777,1,Answer
exten => 7777,n,wait(1)
… and so on…

Here is the log

   -- Executing [+19234567890@from-pstn:1] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__DIRECTION=INBOUND") in new stack
-- Executing [+19234567890@from-pstn:2] Gosub("PJSIP/Trunk-1.2.3.4-00000bb4", "sub-record-check,s,1(in,+19234567890,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "NOW=1647960570") in new stack
-- Executing [s@sub-record-check:4] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__DAY=22") in new stack
-- Executing [s@sub-record-check:5] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__MONTH=03") in new stack
-- Executing [s@sub-record-check:6] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__YEAR=2022") in new stack
-- Executing [s@sub-record-check:7] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__TIMESTR=20220322-094930") in new stack
-- Executing [s@sub-record-check:8] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__FROMEXTEN=unknown") in new stack
-- Executing [s@sub-record-check:9] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("PJSIP/Trunk-1.2.3.4-00000bb4", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "2?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "1?sub-record-check,in,1") in new stack
-- Goto (sub-record-check,in,1)
-- Executing [in@sub-record-check:1] NoOp("PJSIP/Trunk-1.2.3.4-00000bb4", "Inbound Recording Check to +19234567890") in new stack
-- Executing [in@sub-record-check:2] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "FROMEXTEN=unknown") in new stack
-- Executing [in@sub-record-check:3] ExecIf("PJSIP/Trunk-1.2.3.4-00000bb4", "12?Set(FROMEXTEN=+19144444440)") in new stack
-- Executing [in@sub-record-check:4] Gosub("PJSIP/Trunk-1.2.3.4-00000bb4", "recordcheck,1(dontcare,in,+19234567890)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/Trunk-1.2.3.4-00000bb4", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/Trunk-1.2.3.4-00000bb4", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [recordcheck@sub-record-check:3] Return("PJSIP/Trunk-1.2.3.4-00000bb4", "") in new stack
-- Executing [in@sub-record-check:5] Return("PJSIP/Trunk-1.2.3.4-00000bb4", "") in new stack
-- Executing [+19234567890@from-pstn:3] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CHANNEL(tonezone)=us") in new stack
-- Executing [+19234567890@from-pstn:4] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__FROM_DID=+19234567890") in new stack
-- Executing [+19234567890@from-pstn:5] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "returnhere=1") in new stack
-- Executing [+19234567890@from-pstn:6] Gosub("PJSIP/Trunk-1.2.3.4-00000bb4", "app-blacklist-check,s,1()") in new stack
-- Executing [s@app-blacklist-check:1] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:2] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CALLED_BLACKLIST=1") in new stack
-- Executing [s@app-blacklist-check:3] Return("PJSIP/Trunk-1.2.3.4-00000bb4", "") in new stack
-- Executing [+19234567890@from-pstn:7] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CDR(did)=+19234567890") in new stack
-- Executing [+19234567890@from-pstn:8] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?") in new stack
-- Executing [+19234567890@from-pstn:9] ExecIf("PJSIP/Trunk-1.2.3.4-00000bb4", "1 ?Set(CALLERID(name)=+19144444440)") in new stack
-- Executing [+19234567890@from-pstn:10] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__MOHCLASS=") in new stack
-- Executing [+19234567890@from-pstn:11] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__REVERSAL_REJECT=FALSE") in new stack
-- Executing [+19234567890@from-pstn:12] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "1?post-reverse-charge") in new stack
-- Goto (from-pstn,+19234567890,14)
-- Executing [+19234567890@from-pstn:14] NoOp("PJSIP/Trunk-1.2.3.4-00000bb4", "") in new stack
-- Executing [+19234567890@from-pstn:15] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__CALLINGNAMEPRES_SV=allowed_not_screened") in new stack
-- Executing [+19234567890@from-pstn:16] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__CALLINGNUMPRES_SV=allowed_not_screened") in new stack
-- Executing [+19234567890@from-pstn:17] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CALLERID(name-pres)=allowed_not_screened") in new stack
-- Executing [+19234567890@from-pstn:18] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CALLERID(num-pres)=allowed_not_screened") in new stack
-- Executing [+19234567890@from-pstn:19] NoOp("PJSIP/Trunk-1.2.3.4-00000bb4", "CallerID Entry Point") in new stack
-- Executing [+19234567890@from-pstn:20] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__CRM_DIRECTION=INBOUND") in new stack
-- Executing [+19234567890@from-pstn:21] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__CRM_SOURCE=+19144444440") in new stack
-- Executing [+19234567890@from-pstn:22] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__CRM_LINKEDID=1647960570.5330") in new stack
-- Executing [+19234567890@from-pstn:23] AGI("PJSIP/Trunk-1.2.3.4-00000bb4", "sangomacrm.agi,true") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
-- <PJSIP/Trunk-1.2.3.4-00000bb4>AGI Script sangomacrm.agi completed, returning 0
-- Executing [+19234567890@from-pstn:24] ExecIf("PJSIP/Trunk-1.2.3.4-00000bb4", "1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
-- Executing [+19234567890@from-pstn:25] Goto("PJSIP/Trunk-1.2.3.4-00000bb4", "ext-local,7777,1") in new stack
-- Goto (ext-local,7777,1)
-- Executing [7777@ext-local:1] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__RINGTIMER=15") in new stack
-- Executing [7777@ext-local:2] ExecIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?Set(__CWIGNORE=)") in new stack
-- Executing [7777@ext-local:3] Macro("PJSIP/Trunk-1.2.3.4-00000bb4", "exten-vm,7777,7777,1,0,0") in new stack
-- Executing [s@macro-exten-vm:1] Macro("PJSIP/Trunk-1.2.3.4-00000bb4", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "TOUCH_MONITOR=1647960570.5330") in new stack
-- Executing [s@macro-user-callerid:2] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:3] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:4] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CHANEXTENCONTEXT=Trunk-1.2.3.4-00000bb4") in new stack
-- Executing [s@macro-user-callerid:5] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CHANEXTEN=Trunk-1.2.3.4-00000bb4") in new stack
-- Executing [s@macro-user-callerid:6] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CALLERID(number)=+19144444440") in new stack
-- Executing [s@macro-user-callerid:7] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "AMPUSER=+19144444440") in new stack
-- Executing [s@macro-user-callerid:8] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "HOTDESCKCHAN=Trunk-1.2.3.4-00000bb4") in new stack
-- Executing [s@macro-user-callerid:9] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "HOTDESKEXTEN=IB") in new stack
-- Executing [s@macro-user-callerid:10] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-user-callerid:11] ExecIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-user-callerid:12] ExecIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-user-callerid:13] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?report") in new stack
-- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/Trunk-1.2.3.4-00000bb4", "1?Set(REALCALLERIDNUM=+19144444440)") in new stack
-- Executing [s@macro-user-callerid:15] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:16] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?limit") in new stack
-- Executing [s@macro-user-callerid:17] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:18] ExecIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:19] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "1?report") in new stack
-- Goto (macro-user-callerid,s,28)
-- Executing [s@macro-user-callerid:28] NoOp("PJSIP/Trunk-1.2.3.4-00000bb4", "Macro Depth is 2") in new stack
-- Executing [s@macro-user-callerid:29] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,30)
-- Executing [s@macro-user-callerid:30] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?continue") in new stack
-- Executing [s@macro-user-callerid:31] ExecIf("PJSIP/Trunk-1.2.3.4-00000bb4", "1?Set(__CALLEE_ACCOUNCODE=Corporate:7777)") in new stack
-- Executing [s@macro-user-callerid:32] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:33] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "1?continue") in new stack
-- Goto (macro-user-callerid,s,49)
-- Executing [s@macro-user-callerid:49] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CALLERID(number)=+19144444440") in new stack
-- Executing [s@macro-user-callerid:50] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CALLERID(name)=+19144444440") in new stack
-- Executing [s@macro-user-callerid:51] GotoIf("PJSIP/Trunk-1.2.3.4-00000bb4", "0?cnum") in new stack
-- Executing [s@macro-user-callerid:52] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CDR(cnam)=+19144444440") in new stack
-- Executing [s@macro-user-callerid:53] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CDR(cnum)=+19144444440") in new stack
-- Executing [s@macro-user-callerid:54] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "CHANNEL(language)=en") in new stack
-- Executing [s@macro-exten-vm:2] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "RingGroupMethod=none") in new stack
-- Executing [s@macro-exten-vm:3] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__EXTTOCALL=7777") in new stack
-- Executing [s@macro-exten-vm:4] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "__PICKUPMARK=7777") in new stack
-- Executing [s@macro-exten-vm:5] Set("PJSIP/Trunk-1.2.3.4-00000bb4", "RT=15") in new stack

[2022-03-22 09:49:30] WARNING[30717][C-00000a6d]: chan_sip.c:23269 func_header_read: This function can only be used on SIP channels.
– Executing [s@macro-exten-vm:6] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Macro(vm,7777,DIRECTDIAL,)”) in new stack
[2022-03-22 09:49:30] WARNING[30717][C-00000a6d]: chan_sip.c:23269 func_header_read: This function can only be used on SIP channels.
[2022-03-22 09:49:30] WARNING[30717][C-00000a6d]: chan_sip.c:23269 func_header_read: This function can only be used on SIP channels.
– Executing [s@macro-exten-vm:7] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?MacroExit()”) in new stack
[2022-03-22 09:49:30] WARNING[30717][C-00000a6d]: chan_sip.c:23269 func_header_read: This function can only be used on SIP channels.
– Executing [s@macro-exten-vm:8] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Macro(vm,7777,DIRECTDIAL,)”) in new stack
– Executing [s@macro-exten-vm:9] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?MacroExit()”) in new stack
– Executing [s@macro-exten-vm:10] Gosub(“PJSIP/Trunk-1.2.3.4-00000bb4”, “sub-record-check,s,1(exten,7777,dontcare)”) in new stack
– Executing [s@sub-record-check:1] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “12?initialized”) in new stack
– Goto (sub-record-check,s,10)
– Executing [s@sub-record-check:10] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, “Recordings initialized”) in new stack
– Executing [s@sub-record-check:11] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [s@sub-record-check:12] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [s@sub-record-check:13] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [s@sub-record-check:14] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “5?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [s@sub-record-check:17] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?sub-record-check,exten,1”) in new stack
– Goto (sub-record-check,exten,1)
– Executing [exten@sub-record-check:1] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, “Exten Recording Check between +19144444440 and 7777”) in new stack
– Executing [exten@sub-record-check:2] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CALLTYPE=external”) in new stack
– Executing [exten@sub-record-check:3] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(CALLTYPE=)”) in new stack
– Executing [exten@sub-record-check:4] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CALLEE=dontcare”) in new stack
– Executing [exten@sub-record-check:5] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(CALLEE=dontcare)”) in new stack
– Executing [exten@sub-record-check:6] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?callee”) in new stack
– Goto (sub-record-check,exten,11)
– Executing [exten@sub-record-check:11] Gosub(“PJSIP/Trunk-1.2.3.4-00000bb4”, “recordcheck,1(dontcare,external,7777)”) in new stack
– Executing [recordcheck@sub-record-check:1] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, “Starting recording check against dontcare”) in new stack
– Executing [recordcheck@sub-record-check:2] Goto(“PJSIP/Trunk-1.2.3.4-00000bb4”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [recordcheck@sub-record-check:3] Return(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
– Executing [exten@sub-record-check:12] Return(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
– Executing [s@macro-exten-vm:11] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?macrodial”) in new stack
– Goto (macro-exten-vm,s,17)
– Executing [s@macro-exten-vm:17] GosubIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?clrheader,1()”) in new stack
– Executing [s@macro-exten-vm:18] Macro(“PJSIP/Trunk-1.2.3.4-00000bb4”, “dial-one,15,Ttr,7777”) in new stack
– Executing [s@macro-dial-one:1] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “DEXTEN=7777”) in new stack
– Executing [s@macro-dial-one:2] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “__CRM_SOURCE=+19144444440”) in new stack
– Executing [s@macro-dial-one:3] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(__EXTTOCALL=7777)”) in new stack
– Executing [s@macro-dial-one:4] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “DIALSTATUS_CW=”) in new stack
– Executing [s@macro-dial-one:5] GosubIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?screen,1()”) in new stack
– Executing [s@macro-dial-one:6] GosubIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?cf,1()”) in new stack
– Executing [s@macro-dial-one:7] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?skip1”) in new stack
– Goto (macro-dial-one,s,10)
– Executing [s@macro-dial-one:10] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?nodial”) in new stack
– Executing [s@macro-dial-one:11] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?continue”) in new stack
– Executing [s@macro-dial-one:12] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “EXTHASCW=ENABLED”) in new stack
– Executing [s@macro-dial-one:13] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?next1:cwinusebusy”) in new stack
– Goto (macro-dial-one,s,25)
– Executing [s@macro-dial-one:25] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?next3:continue”) in new stack
– Goto (macro-dial-one,s,27)
– Executing [s@macro-dial-one:27] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?nodial”) in new stack
– Executing [s@macro-dial-one:28] GosubIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?dstring,1():dlocal,1()”) in new stack
– Executing [dstring@macro-dial-one:1] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “DSTRING=”) in new stack
– Executing [dstring@macro-dial-one:2] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “DEVICES=7777”) in new stack
– Executing [dstring@macro-dial-one:3] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Return()”) in new stack
– Executing [dstring@macro-dial-one:4] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(DEVICES=707)”) in new stack
– Executing [dstring@macro-dial-one:5] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “LOOPCNT=1”) in new stack
– Executing [dstring@macro-dial-one:6] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “ITER=1”) in new stack
– Executing [dstring@macro-dial-one:7] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “THISDIAL=SIP/7777”) in new stack
– Executing [dstring@macro-dial-one:8] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?docheck”) in new stack
– Goto (macro-dial-one,dstring,14)
– Executing [dstring@macro-dial-one:14] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?skipset”) in new stack
– Executing [dstring@macro-dial-one:15] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “DSTRING=SIP/7777&”) in new stack
– Executing [dstring@macro-dial-one:16] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “ITER=2”) in new stack
– Executing [dstring@macro-dial-one:17] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?begin”) in new stack
– Executing [dstring@macro-dial-one:18] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Return()”) in new stack
– Executing [dstring@macro-dial-one:19] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “DSTRING=SIP/7777”) in new stack
– Executing [dstring@macro-dial-one:20] Return(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
– Executing [s@macro-dial-one:29] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?nodial”) in new stack
– Executing [s@macro-dial-one:30] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?skiptrace”) in new stack
– Executing [s@macro-dial-one:31] GosubIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?ctset,1():ctclear,1()”) in new stack
– Executing [ctset@macro-dial-one:1] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “DB(CALLTRACE/7777)=+19144444440”) in new stack
– Executing [ctset@macro-dial-one:2] Return(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
– Executing [s@macro-dial-one:32] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “D_OPTIONS=Ttr”) in new stack
– Executing [s@macro-dial-one:33] GosubIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
– Executing [s@macro-dial-one:34] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, "Blind Transfer: , Attended Transfer: , User: , Alert Info: ") in new stack
– Executing [s@macro-dial-one:35] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [s@macro-dial-one:36] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [s@macro-dial-one:37] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [s@macro-dial-one:38] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack
– Executing [s@macro-dial-one:39] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack

Continuation of log:

– Executing [s@macro-dial-one:40] GosubIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
– Executing [s@macro-dial-one:41] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(CHANNEL(musicclass)=)”) in new stack
– Executing [s@macro-dial-one:42] GosubIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?qwait,1()”) in new stack
– Executing [s@macro-dial-one:43] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “__CWIGNORE=”) in new stack
– Executing [s@macro-dial-one:44] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “__KEEPCID=TRUE”) in new stack
– Executing [s@macro-dial-one:45] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?usegoto,1”) in new stack
– Executing [s@macro-dial-one:46] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?godial”) in new stack
– Goto (macro-dial-one,s,51)
– Executing [s@macro-dial-one:51] Macro(“PJSIP/Trunk-1.2.3.4-00000bb4”, “dialout-one-predial-hook,”) in new stack
– Executing [s@macro-dialout-one-predial-hook:1] MacroExit(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
– Executing [s@macro-dial-one:52] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?Set(D_OPTIONS=trI)”) in new stack
– Executing [s@macro-dial-one:53] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(CWRING=r(callwaiting)):Set(CWRING=)”) in new stack
– Executing [s@macro-dial-one:54] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
– Executing [s@macro-dial-one:55] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(D_OPTIONS=trIg)”) in new stack
– Executing [s@macro-dial-one:56] Dial(“PJSIP/Trunk-1.2.3.4-00000bb4”, “SIP/7777,15,trIb(func-apply-sipheaders^s^1)”) in new stack
[2022-03-22 09:49:30] WARNING[30717][C-00000a6d]: app_dial.c:2584 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Subscriber absent)
– No devices or endpoints to dial (technology/resource)
– Executing [s@macro-dial-one:57] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?MacroExit()”) in new stack
– Executing [s@macro-dial-one:58] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(DIALSTATUS=)”) in new stack
– Executing [s@macro-dial-one:59] GosubIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?s-CHANUNAVAIL,1()”) in new stack
– Executing [s@macro-dial-one:60] MacroExit(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
– Executing [s@macro-exten-vm:19] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “SV_DIALSTATUS=CHANUNAVAIL”) in new stack
– Executing [s@macro-exten-vm:20] GosubIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?docfu,1()”) in new stack
– Executing [s@macro-exten-vm:21] GosubIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?docfb,1()”) in new stack
– Executing [s@macro-exten-vm:22] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “DIALSTATUS=CHANUNAVAIL”) in new stack
– Executing [s@macro-exten-vm:23] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?MacroExit()”) in new stack
– Executing [s@macro-exten-vm:24] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?s-CHANUNAVAIL,1”) in new stack
– Executing [s@macro-exten-vm:25] Macro(“PJSIP/Trunk-1.2.3.4-00000bb4”, “vm,7777,CHANUNAVAIL,”) in new stack
– Executing [s@macro-vm:1] Macro(“PJSIP/Trunk-1.2.3.4-00000bb4”, “user-callerid,SKIPTTL”) in new stack
– Executing [s@macro-user-callerid:1] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “TOUCH_MONITOR=1647960570.5330”) in new stack
– Executing [s@macro-user-callerid:2] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CHANCONTEXT=”) in new stack
– Executing [s@macro-user-callerid:3] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CHANCONTEXT=”) in new stack
– Executing [s@macro-user-callerid:4] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CHANEXTENCONTEXT=Trunk-1.2.3.4-00000bb4”) in new stack
– Executing [s@macro-user-callerid:5] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CHANEXTEN=Trunk-1.2.3.4-00000bb4”) in new stack
– Executing [s@macro-user-callerid:6] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CALLERID(number)=+19144444440”) in new stack
– Executing [s@macro-user-callerid:7] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “AMPUSER=+19144444440”) in new stack
– Executing [s@macro-user-callerid:8] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “HOTDESCKCHAN=Trunk-1.2.3.4-00000bb4”) in new stack
– Executing [s@macro-user-callerid:9] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “HOTDESKEXTEN=IB”) in new stack
– Executing [s@macro-user-callerid:10] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “HOTDESKCALL=0”) in new stack
– Executing [s@macro-user-callerid:11] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(HOTDESKCALL=1)”) in new stack
– Executing [s@macro-user-callerid:12] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(CALLERID(name)=)”) in new stack
– Executing [s@macro-user-callerid:13] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?report”) in new stack
– Executing [s@macro-user-callerid:14] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(REALCALLERIDNUM=+19144444440)”) in new stack
– Executing [s@macro-user-callerid:15] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “AMPUSER=”) in new stack
– Executing [s@macro-user-callerid:16] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:17] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “AMPUSERCIDNAME=”) in new stack
– Executing [s@macro-user-callerid:18] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [s@macro-user-callerid:19] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?report”) in new stack
– Goto (macro-user-callerid,s,28)
– Executing [s@macro-user-callerid:28] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, “Macro Depth is 3”) in new stack
– Executing [s@macro-user-callerid:29] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?report2:macroerror”) in new stack
– Goto (macro-user-callerid,s,30)
– Executing [s@macro-user-callerid:30] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,49)
– Executing [s@macro-user-callerid:49] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CALLERID(number)=+19144444440”) in new stack
– Executing [s@macro-user-callerid:50] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CALLERID(name)=+19144444440”) in new stack
– Executing [s@macro-user-callerid:51] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?cnum”) in new stack
– Executing [s@macro-user-callerid:52] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CDR(cnam)=+19144444440”) in new stack
– Executing [s@macro-user-callerid:53] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CDR(cnum)=+19144444440”) in new stack
– Executing [s@macro-user-callerid:54] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “CHANNEL(language)=en”) in new stack
– Executing [s@macro-vm:2] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “VMGAIN=”) in new stack
– Executing [s@macro-vm:3] Macro(“PJSIP/Trunk-1.2.3.4-00000bb4”, “blkvm-check,”) in new stack
– Executing [s@macro-blkvm-check:1] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “GOSUB_RETVAL=”) in new stack
– Executing [s@macro-blkvm-check:2] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(GOSUB_RETVAL=TRUE)”) in new stack
– Executing [s@macro-blkvm-check:3] MacroExit(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
– Executing [s@macro-vm:4] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?vmx,1”) in new stack
– Goto (macro-vm,vmx,1)
– Executing [vmx@macro-vm:1] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “__EXTTOCALL=7777”) in new stack
– Executing [vmx@macro-vm:2] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “__CRM_VOICEMAIL=7777”) in new stack
– Executing [vmx@macro-vm:3] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “MEXTEN=7777”) in new stack
– Executing [vmx@macro-vm:4] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “MMODE=CHANUNAVAIL”) in new stack
– Executing [vmx@macro-vm:5] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “RETVM=”) in new stack
– Executing [vmx@macro-vm:6] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “MODE=unavail”) in new stack
– Executing [vmx@macro-vm:7] Macro(“PJSIP/Trunk-1.2.3.4-00000bb4”, “get-vmcontext,7777”) in new stack
– Executing [s@macro-get-vmcontext:1] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “VMCONTEXT=default”) in new stack
– Executing [s@macro-get-vmcontext:2] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?200:300”) in new stack
– Goto (macro-get-vmcontext,s,300)
– Executing [s@macro-get-vmcontext:300] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
– Executing [vmx@macro-vm:8] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “MODE=unavail”) in new stack
– Executing [vmx@macro-vm:9] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, “MODE IS: unavail”) in new stack
– Executing [vmx@macro-vm:10] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?chknomsg”) in new stack
– Goto (macro-vm,vmx,12)
– Executing [vmx@macro-vm:12] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?s-CHANUNAVAIL,1”) in new stack
– Executing [vmx@macro-vm:13] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?notdirect”) in new stack
– Goto (macro-vm,vmx,15)
– Executing [vmx@macro-vm:15] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, "Checking if ext 7777 is enabled: ") in new stack
– Executing [vmx@macro-vm:16] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?s-CHANUNAVAIL,1”) in new stack
– Goto (macro-vm,s-CHANUNAVAIL,1)
– Executing [s-CHANUNAVAIL@macro-vm:1] Macro(“PJSIP/Trunk-1.2.3.4-00000bb4”, “get-vmcontext,7777”) in new stack
– Executing [s@macro-get-vmcontext:1] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “VMCONTEXT=default”) in new stack
– Executing [s@macro-get-vmcontext:2] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?200:300”) in new stack
– Goto (macro-get-vmcontext,s,300)
– Executing [s@macro-get-vmcontext:300] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
– Executing [s-CHANUNAVAIL@macro-vm:2] VoiceMail(“PJSIP/Trunk-1.2.3.4-00000bb4”, “7777@default,u”) in new stack
– <PJSIP/Trunk-1.2.3.4-00000bb4> Playing ‘vm-theperson.ulaw’ (language ‘en’)
Really destroying SIP dialog ‘[email protected]:5160’ Method: INVITE
– <PJSIP/Trunk-1.2.3.4-00000bb4> Playing ‘digits/0.ulaw’ (language ‘en’)
– <PJSIP/Trunk-1.2.3.4-00000bb4> Playing ‘digits/7.ulaw’ (language ‘en’)
– <PJSIP/Trunk-1.2.3.4-00000bb4> Playing ‘digits/0.ulaw’ (language ‘en’)
== Spawn extension (macro-vm, s-CHANUNAVAIL, 2) exited non-zero on ‘PJSIP/Trunk-1.2.3.4-00000bb4’ in macro ‘vm’
== Spawn extension (macro-exten-vm, s, 25) exited non-zero on ‘PJSIP/Trunk-1.2.3.4-00000bb4’ in macro ‘exten-vm’
== Spawn extension (ext-local, 7777, 3) exited non-zero on ‘PJSIP/Trunk-1.2.3.4-00000bb4’
– Executing [h@ext-local:1] Macro(“PJSIP/Trunk-1.2.3.4-00000bb4”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, " montior file= ") in new stack
– Executing [s@macro-hangupcall:5] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] Hangup(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/Trunk-1.2.3.4-00000bb4’ in macro ‘hangupcall’
== Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/Trunk-1.2.3.4-00000bb4’
– PJSIP/Trunk-1.2.3.4-00000bb4 Internal Gosub(crm-hangup,s,1) start
– Executing [s@crm-hangup:1] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, “Sending Hangup to CRM”) in new stack
– Executing [s@crm-hangup:2] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, “HANGUP CAUSE: 20”) in new stack
– Executing [s@crm-hangup:3] ExecIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “1?Set(__CRM_VOICEMAIL=FAILED)”) in new stack
– Executing [s@crm-hangup:4] NoOp(“PJSIP/Trunk-1.2.3.4-00000bb4”, “MASTER CHANNEL: 1647960570.5330 = 1647960570.5330”) in new stack
– Executing [s@crm-hangup:5] GotoIf(“PJSIP/Trunk-1.2.3.4-00000bb4”, “0?return”) in new stack
– Executing [s@crm-hangup:6] Set(“PJSIP/Trunk-1.2.3.4-00000bb4”, “__CRM_HANGUP=1”) in new stack
– Executing [s@crm-hangup:7] AGI(“PJSIP/Trunk-1.2.3.4-00000bb4”, “sangomacrm.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
– <PJSIP/Trunk-1.2.3.4-00000bb4>AGI Script sangomacrm.agi completed, returning 0
– Executing [s@crm-hangup:8] Return(“PJSIP/Trunk-1.2.3.4-00000bb4”, “”) in new stack
== Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/Trunk-1.2.3.4-00000bb4’
– PJSIP/Trunk-1.2.3.4-00000bb4 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
pbx*CLI>

Share logs via pastebin, as described in this link:
https://wiki.freepbx.org/display/SUP/Providing+Great+Debug#ProvidingGreatDebug-AsteriskLogs-PartII

1 Like

https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings

Not sure what your dialplan is supposed to do but I saw hangup cause 20 at the end.

AST_CAUSE_SUBSCRIBER_ABSENT

  1. Subscriber absent

OR2_CAUSE_UNALLOCATED_NUMBER

The cause 20 is typical of an unregistered extension, especially when combined with this message:

The log also says channel unavailable.

The 7777 defined in extensions_custom.conf doesn’t seem to be be being reached, which makes me wonder whether it has been defined normally, as well as a custom one.

1 Like

Thanks for all your feedback. I think I know what happened already. Some confusion on my end with regards to the call flow of the number. It’s already been rectified.

1 Like

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