Blacklist not working for direct to extension DIDs

I have added my number to the blacklist for testing. When I call the main number, which routes to an IVR (actually it’s grabbing the catch-all routing) the call gets blocked. However when I dial a specific DID that routes to an extension it never checks the blacklist.

How can I get it to check the blacklist for direct to extension calls?

Here is the log from a blocked call:

– Accepting call from ‘2813622398’ to ‘6400’ on channel 0/1, span 1
– Executing [6[email protected]:1] NoOp(“DAHDI/i1/2813622398-6e2”, “Catch-All DID Match - Found 6400 - You probably want a DID for this.”) in new stack
[2018-06-01 17:55:48] WARNING[20541][C-00000c50]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:2] Log(“DAHDI/i1/2813622398-6e2”, "WARNING,Friendly Scanner from ") in new stack
[2018-06-01 17:55:48] WARNING[20541][C-00000c50]: Ext. 6400:2 @ from-digital: Friendly Scanner from
– Executing [[email protected]:3] Set(“DAHDI/i1/2813622398-6e2”, “__FROM_DID=6400”) in new stack
– Executing [[email protected]:4] Goto(“DAHDI/i1/2813622398-6e2”, “ext-did,s,1”) in new stack
– Goto (ext-did,s,1)
– Executing [[email protected]:1] Set(“DAHDI/i1/2813622398-6e2”, “__DIRECTION=INBOUND”) in new stack
– Executing [[email protected]:2] Gosub(“DAHDI/i1/2813622398-6e2”, “sub-record-check,s,1(in,s,dontcare)”) in new stack
– Executing [[email protected]:1] GotoIf(“DAHDI/i1/2813622398-6e2”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“DAHDI/i1/2813622398-6e2”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“DAHDI/i1/2813622398-6e2”, “NOW=1527890148”) in new stack
– Executing [[email protected]:4] Set(“DAHDI/i1/2813622398-6e2”, “__DAY=01”) in new stack
– Executing [[email protected]:5] Set(“DAHDI/i1/2813622398-6e2”, “__MONTH=06”) in new stack
– Executing [[email protected]:6] Set(“DAHDI/i1/2813622398-6e2”, “__YEAR=2018”) in new stack
– Executing [[email protected]:7] Set(“DAHDI/i1/2813622398-6e2”, “__TIMESTR=20180601-175548”) in new stack
– Executing [[email protected]:8] Set(“DAHDI/i1/2813622398-6e2”, “__FROMEXTEN=unknown”) in new stack
– Executing [[email protected]:9] Set(“DAHDI/i1/2813622398-6e2”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“DAHDI/i1/2813622398-6e2”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“DAHDI/i1/2813622398-6e2”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“DAHDI/i1/2813622398-6e2”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“DAHDI/i1/2813622398-6e2”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“DAHDI/i1/2813622398-6e2”, “2?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“DAHDI/i1/2813622398-6e2”, “1?sub-record-check,in,1”) in new stack
– Goto (sub-record-check,in,1)
– Executing [[email protected]:1] NoOp(“DAHDI/i1/2813622398-6e2”, “Inbound Recording Check to s”) in new stack
– Executing [[email protected]:2] Set(“DAHDI/i1/2813622398-6e2”, “FROMEXTEN=unknown”) in new stack
– Executing [[email protected]:3] ExecIf(“DAHDI/i1/2813622398-6e2”, “10?Set(FROMEXTEN=2813622398)”) in new stack
– Executing [[email protected]:4] Gosub(“DAHDI/i1/2813622398-6e2”, “recordcheck,1(dontcare,in,s)”) in new stack
– Executing [[email protected]:1] NoOp(“DAHDI/i1/2813622398-6e2”, “Starting recording check against dontcare”) in new stack
– Executing [[email protected]:2] Goto(“DAHDI/i1/2813622398-6e2”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [[email protected]:3] Return(“DAHDI/i1/2813622398-6e2”, “”) in new stack
– Executing [[email protected]:5] Return(“DAHDI/i1/2813622398-6e2”, “”) in new stack
– Executing [[email protected]:3] Set(“DAHDI/i1/2813622398-6e2”, “CHANNEL(tonezone)=us”) in new stack
– Executing [[email protected]:4] ExecIf(“DAHDI/i1/2813622398-6e2”, “0?Set(__FROM_DID=s)”) in new stack
– Executing [[email protected]:5] Set(“DAHDI/i1/2813622398-6e2”, “returnhere=1”) in new stack
– Executing [[email protected]:6] Gosub(“DAHDI/i1/2813622398-6e2”, “app-blacklist-check,s,1()”) in new stack
– Executing [[email protected]:1] GotoIf(“DAHDI/i1/2813622398-6e2”, “1?blacklisted”) in new stack
– Goto (app-blacklist-check,s,4)
– Executing [[email protected]:4] Answer(“DAHDI/i1/2813622398-6e2”, “”) in new stack
– Executing [[email protected]:5] Set(“DAHDI/i1/2813622398-6e2”, “BLDEST=app-blackhole,ring,1”) in new stack
– Executing [[email protected]:6] GotoIf(“DAHDI/i1/2813622398-6e2”, “1?returnto”) in new stack
– Goto (app-blacklist-check,s,8)
– Executing [[email protected]:8] Return(“DAHDI/i1/2813622398-6e2”, “”) in new stack
– Executing [[email protected]:7] Set(“DAHDI/i1/2813622398-6e2”, “CDR(did)=6400”) in new stack
– Executing [[email protected]:8] GotoIf(“DAHDI/i1/2813622398-6e2”, “20?app-blackhole,ring,1”) in new stack
– Goto (app-blackhole,ring,1)
– Executing [[email protected]:1] NoOp(“DAHDI/i1/2813622398-6e2”, “Blackhole Dest: Ring”) in new stack
– Executing [[email protected]:2] Answer(“DAHDI/i1/2813622398-6e2”, “”) in new stack
– Executing [[email protected]:3] PlayTones(“DAHDI/i1/2813622398-6e2”, “ring”) in new stack
– Executing [[email protected]:4] Wait(“DAHDI/i1/2813622398-6e2”, “300”) in new stack

And here is the log from the unblocked call:

– Accepting call from ‘2813622398’ to ‘6464’ on channel 0/1, span 1
– Executing [[email protected]:1] GotoIf(“DAHDI/i1/2813622398-6e3”, “1?ext-local,6464,1:followme-check,6464,1”) in new stack
– Goto (ext-local,6464,1)
– Executing [[email protected]:1] Set(“DAHDI/i1/2813622398-6e3”, “__RINGTIMER=15”) in new stack
– Executing [[email protected]:2] Macro(“DAHDI/i1/2813622398-6e3”, “exten-vm,6464,6464,0,0,0”) in new stack
– Executing [[email protected]:1] Macro(“DAHDI/i1/2813622398-6e3”, “user-callerid,”) in new stack
– Executing [[email protected]:1] Set(“DAHDI/i1/2813622398-6e3”, “TOUCH_MONITOR=1527890189.6809”) in new stack
– Executing [[email protected]:2] Set(“DAHDI/i1/2813622398-6e3”, “AMPUSER=2813622398”) in new stack
– Executing [[email protected]:3] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“DAHDI/i1/2813622398-6e3”, “1?Set(REALCALLERIDNUM=2813622398)”) in new stack
– Executing [[email protected]:5] Set(“DAHDI/i1/2813622398-6e3”, “AMPUSER=”) in new stack
– Executing [[email protected]:6] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“DAHDI/i1/2813622398-6e3”, “AMPUSERCIDNAME=”) in new stack
– Executing [[email protected]:8] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [[email protected]:9] GotoIf(“DAHDI/i1/2813622398-6e3”, “1?report”) in new stack
– Goto (macro-user-callerid,s,16)
– Executing [[email protected]:16] NoOp(“DAHDI/i1/2813622398-6e3”, “Macro Depth is 2”) in new stack
– Executing [[email protected]:17] GotoIf(“DAHDI/i1/2813622398-6e3”, “1?report2:macroerror”) in new stack
– Goto (macro-user-callerid,s,18)
– Executing [[email protected]:18] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?continue”) in new stack
– Executing [[email protected]:19] ExecIf(“DAHDI/i1/2813622398-6e3”, “1?Set(__CALLEE_ACCOUNCODE=)”) in new stack
– Executing [[email protected]:20] Set(“DAHDI/i1/2813622398-6e3”, “__TTL=64”) in new stack
– Executing [[email protected]:21] GotoIf(“DAHDI/i1/2813622398-6e3”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,37)
– Executing [[email protected]:37] Set(“DAHDI/i1/2813622398-6e3”, “CALLERID(number)=2813622398”) in new stack
– Executing [[email protected]:38] Set(“DAHDI/i1/2813622398-6e3”, “CALLERID(name)=”) in new stack
– Executing [[email protected]:39] GotoIf(“DAHDI/i1/2813622398-6e3”, “1?cnum”) in new stack
– Goto (macro-user-callerid,s,41)
– Executing [[email protected]:41] Set(“DAHDI/i1/2813622398-6e3”, “CDR(cnum)=2813622398”) in new stack
– Executing [[email protected]:42] Set(“DAHDI/i1/2813622398-6e3”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:2] Set(“DAHDI/i1/2813622398-6e3”, “RingGroupMethod=none”) in new stack
– Executing [[email protected]:3] Set(“DAHDI/i1/2813622398-6e3”, “__EXTTOCALL=6464”) in new stack
– Executing [[email protected]:4] Set(“DAHDI/i1/2813622398-6e3”, “__PICKUPMARK=6464”) in new stack
– Executing [[email protected]:5] Set(“DAHDI/i1/2813622398-6e3”, “RT=15”) in new stack
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:6] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Macro(vm,6464,DIRECTDIAL,)”) in new stack
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:7] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?MacroExit()”) in new stack
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:8] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Gosub(ext-intercom,*806464,1())”) in new stack
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:9] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?MacroExit()”) in new stack
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:10] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?ChanSpy(PJSIP/6464,q)”) in new stack
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
– Executing [[email protected]:11] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?MacroExit()”) in new stack
[2018-06-01 17:56:29] WARNING[20655][C-00000c51]: chan_sip.c:22959 func_header_read: This function can only be used on SIP channels.
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
– Executing [[email protected]:12] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Macro(vm,6464,DIRECTDIAL,)”) in new stack
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
– Executing [[email protected]:13] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?MacroExit()”) in new stack
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
– Executing [[email protected]:14] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Gosub(ext-intercom,*806464,1())”) in new stack
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
– Executing [[email protected]:15] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?MacroExit()”) in new stack
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
– Executing [[email protected]:16] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?ChanSpy(PJSIP/6464,q)”) in new stack
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
– Executing [[email protected]:17] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?MacroExit()”) in new stack
[2018-06-01 17:56:29] ERROR[20655][C-00000c51]: res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel.
– Executing [[email protected]:18] Gosub(“DAHDI/i1/2813622398-6e3”, “sub-record-check,s,1(exten,6464,dontcare)”) in new stack
– Executing [[email protected]:1] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“DAHDI/i1/2813622398-6e3”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“DAHDI/i1/2813622398-6e3”, “NOW=1527890189”) in new stack
– Executing [[email protected]:4] Set(“DAHDI/i1/2813622398-6e3”, “__DAY=01”) in new stack
– Executing [[email protected]:5] Set(“DAHDI/i1/2813622398-6e3”, “__MONTH=06”) in new stack
– Executing [[email protected]:6] Set(“DAHDI/i1/2813622398-6e3”, “__YEAR=2018”) in new stack
– Executing [[email protected]:7] Set(“DAHDI/i1/2813622398-6e3”, “__TIMESTR=20180601-175629”) in new stack
– Executing [[email protected]:8] Set(“DAHDI/i1/2813622398-6e3”, “__FROMEXTEN=2813622398”) in new stack
– Executing [[email protected]:9] Set(“DAHDI/i1/2813622398-6e3”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“DAHDI/i1/2813622398-6e3”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“DAHDI/i1/2813622398-6e3”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“DAHDI/i1/2813622398-6e3”, “5?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“DAHDI/i1/2813622398-6e3”, “1?sub-record-check,exten,1”) in new stack
– Goto (sub-record-check,exten,1)
– Executing [[email protected]:1] NoOp(“DAHDI/i1/2813622398-6e3”, “Exten Recording Check between 2813622398 and 6464”) in new stack
– Executing [[email protected]:2] Set(“DAHDI/i1/2813622398-6e3”, “CALLTYPE=internal”) in new stack
– Executing [[email protected]:3] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(CALLTYPE=)”) in new stack
– Executing [[email protected]:4] Set(“DAHDI/i1/2813622398-6e3”, “CALLEE=never”) in new stack
– Executing [[email protected]:5] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(CALLEE=dontcare)”) in new stack
– Executing [[email protected]:6] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?callee”) in new stack
– Executing [[email protected]:7] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?caller”) in new stack
– Executing [[email protected]:8] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(CALLER_PRI=):Set(CALLER_PRI=0)”) in new stack
– Executing [[email protected]:9] ExecIf(“DAHDI/i1/2813622398-6e3”, “2?Set(CALLEE_PRI=10):Set(CALLEE_PRI=0)”) in new stack
– Executing [[email protected]:10] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?caller:callee”) in new stack
– Goto (sub-record-check,exten,11)
– Executing [[email protected]:11] Gosub(“DAHDI/i1/2813622398-6e3”, “recordcheck,1(never,internal,6464)”) in new stack
– Executing [[email protected]:1] NoOp(“DAHDI/i1/2813622398-6e3”, “Starting recording check against never”) in new stack
– Executing [[email protected]:2] Goto(“DAHDI/i1/2813622398-6e3”, “never”) in new stack
– Goto (sub-record-check,recordcheck,14)
– Executing [[email protected]:14] Set(“DAHDI/i1/2813622398-6e3”, “__REC_POLICY_MODE=NEVER”) in new stack
– Executing [[email protected]:15] Goto(“DAHDI/i1/2813622398-6e3”, “stoprec”) in new stack
– Goto (sub-record-check,recordcheck,25)
– Executing [[email protected]:25] NoOp(“DAHDI/i1/2813622398-6e3”, “Stopping recording: internal, 6464”) in new stack
– Executing [[email protected]:26] Set(“DAHDI/i1/2813622398-6e3”, “__REC_STATUS=STOPPED”) in new stack
– Executing [[email protected]:27] System(“DAHDI/i1/2813622398-6e3”, "/var/lib/asterisk/bin/stoprecording.php “DAHDI/i1/2813622398-6e3"”) in new stack
– Executing [[email protected]:28] Return(“DAHDI/i1/2813622398-6e3”, “”) in new stack
– Executing [[email protected]:12] Return(“DAHDI/i1/2813622398-6e3”, “”) in new stack
– Executing [[email protected]:19] GotoIf(“DAHDI/i1/2813622398-6e3”, “1?macrodial”) in new stack
– Goto (macro-exten-vm,s,25)
– Executing [[email protected]:25] GosubIf(“DAHDI/i1/2813622398-6e3”, “0?clrheader,1()”) in new stack
– Executing [[email protected]:26] Macro(“DAHDI/i1/2813622398-6e3”, “dial-one,15,HhTtr,6464”) in new stack
– Executing [[email protected]:1] Set(“DAHDI/i1/2813622398-6e3”, “DEXTEN=6464”) in new stack
– Executing [[email protected]:2] Set(“DAHDI/i1/2813622398-6e3”, “__CRM_SOURCE=2813622398”) in new stack
– Executing [[email protected]:3] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(__EXTTOCALL=6464)”) in new stack
– Executing [[email protected]:4] Set(“DAHDI/i1/2813622398-6e3”, “DIALSTATUS_CW=”) in new stack
– Executing [[email protected]:5] GosubIf(“DAHDI/i1/2813622398-6e3”, “0?screen,1()”) in new stack
– Executing [[email protected]:6] GosubIf(“DAHDI/i1/2813622398-6e3”, “0?cf,1()”) in new stack
– Executing [[email protected]:7] GotoIf(“DAHDI/i1/2813622398-6e3”, “1?skip1”) in new stack
– Goto (macro-dial-one,s,10)
– Executing [[email protected]:10] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?nodial”) in new stack
– Executing [[email protected]:11] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?continue”) in new stack
– Executing [[email protected]:12] Set(“DAHDI/i1/2813622398-6e3”, “EXTHASCW=ENABLED”) in new stack
– Executing [[email protected]:13] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?next1:cwinusebusy”) in new stack
– Goto (macro-dial-one,s,25)
– Executing [[email protected]:25] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?next3:continue”) in new stack
– Goto (macro-dial-one,s,27)
– Executing [[email protected]:27] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?nodial”) in new stack
– Executing [[email protected]:28] GosubIf(“DAHDI/i1/2813622398-6e3”, “1?dstring,1():dlocal,1()”) in new stack
– Executing [[email protected]:1] Set(“DAHDI/i1/2813622398-6e3”, “DSTRING=”) in new stack
– Executing [[email protected]:2] Set(“DAHDI/i1/2813622398-6e3”, “DEVICES=6464”) in new stack
– Executing [[email protected]:3] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Return()”) in new stack
– Executing [[email protected]:4] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(DEVICES=464)”) in new stack
– Executing [[email protected]:5] Set(“DAHDI/i1/2813622398-6e3”, “LOOPCNT=1”) in new stack
– Executing [[email protected]:6] Set(“DAHDI/i1/2813622398-6e3”, “ITER=1”) in new stack
– Executing [[email protected]:7] Set(“DAHDI/i1/2813622398-6e3”, “THISDIAL=PJSIP/6464”) in new stack
– Executing [[email protected]:8] GosubIf(“DAHDI/i1/2813622398-6e3”, “1?zap2dahdi,1()”) in new stack
– Executing [[email protected]:1] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Return()”) in new stack
– Executing [[email protected]:2] Set(“DAHDI/i1/2813622398-6e3”, “NEWDIAL=”) in new stack
– Executing [[email protected]:3] Set(“DAHDI/i1/2813622398-6e3”, “LOOPCNT2=1”) in new stack
– Executing [[email protected]:4] Set(“DAHDI/i1/2813622398-6e3”, “ITER2=1”) in new stack
– Executing [[email protected]:5] Set(“DAHDI/i1/2813622398-6e3”, “THISPART2=PJSIP/6464”) in new stack
– Executing [[email protected]:6] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(THISPART2=DAHDIIP/6464)”) in new stack
– Executing [[email protected]:7] Set(“DAHDI/i1/2813622398-6e3”, “NEWDIAL=PJSIP/6464&”) in new stack
– Executing [[email protected]:8] Set(“DAHDI/i1/2813622398-6e3”, “ITER2=2”) in new stack
– Executing [[email protected]:9] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?begin2”) in new stack
– Executing [[email protected]:10] Set(“DAHDI/i1/2813622398-6e3”, “THISDIAL=PJSIP/6464”) in new stack
– Executing [[email protected]:11] Return(“DAHDI/i1/2813622398-6e3”, “”) in new stack
– Executing [[email protected]:9] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?docheck”) in new stack
– Executing [[email protected]:10] NoOp(“DAHDI/i1/2813622398-6e3”, “Debug: Found PJSIP Destination PJSIP/6464”) in new stack
– Executing [[email protected]:11] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?doset”) in new stack
– Executing [[email protected]:12] NoOp(“DAHDI/i1/2813622398-6e3”, “Debug: Updating PJSIP Destination with PJSIP_DIAL_CONTACTS”) in new stack
– Executing [[email protected]:13] Set(“DAHDI/i1/2813622398-6e3”, “THISDIAL=PJSIP/6464/sip:[email protected]:47291”) in new stack
– Executing [[email protected]:14] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?skipset”) in new stack
– Executing [[email protected]:15] Set(“DAHDI/i1/2813622398-6e3”, “DSTRING=PJSIP/6464/sip:[email protected]:47291&”) in new stack
– Executing [[email protected]:16] Set(“DAHDI/i1/2813622398-6e3”, “ITER=2”) in new stack
– Executing [[email protected]:17] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?begin”) in new stack
– Executing [[email protected]:18] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Return()”) in new stack
– Executing [[email protected]:19] Set(“DAHDI/i1/2813622398-6e3”, “DSTRING=PJSIP/6464/sip:[email protected]:47291”) in new stack
– Executing [[email protected]:20] Return(“DAHDI/i1/2813622398-6e3”, “”) in new stack
– Executing [[email protected]:29] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?nodial”) in new stack
– Executing [[email protected]:30] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?skiptrace”) in new stack
– Executing [[email protected]:31] GosubIf(“DAHDI/i1/2813622398-6e3”, “1?ctset,1():ctclear,1()”) in new stack
– Executing [[email protected]:1] Set(“DAHDI/i1/2813622398-6e3”, “DB(CALLTRACE/6464)=2813622398”) in new stack
– Executing [[email protected]:2] Return(“DAHDI/i1/2813622398-6e3”, “”) in new stack
– Executing [[email protected]:32] Set(“DAHDI/i1/2813622398-6e3”, “D_OPTIONS=HhTtr”) in new stack
– Executing [[email protected]:33] GosubIf(“DAHDI/i1/2813622398-6e3”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
– Executing [[email protected]:34] NoOp(“DAHDI/i1/2813622398-6e3”, "Blind Transfer: , Attended Transfer: , User: , Alert Info: ") in new stack
– Executing [[email protected]:35] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:36] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:37] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:38] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack
– Executing [[email protected]:39] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(ALERT_INFO=Normal;volume=)”) in new stack
– Executing [[email protected]:40] GosubIf(“DAHDI/i1/2813622398-6e3”, “0?func-set-sipheader,s,1(Alert-Info,)”) in new stack
– Executing [[email protected]:41] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(CHANNEL(musicclass)=)”) in new stack
– Executing [[email protected]:42] GosubIf(“DAHDI/i1/2813622398-6e3”, “0?qwait,1()”) in new stack
– Executing [[email protected]:43] Set(“DAHDI/i1/2813622398-6e3”, “__CWIGNORE=”) in new stack
– Executing [[email protected]:44] Set(“DAHDI/i1/2813622398-6e3”, “__KEEPCID=TRUE”) in new stack
– Executing [[email protected]:45] GotoIf(“DAHDI/i1/2813622398-6e3”, “0?usegoto,1”) in new stack
– Executing [[email protected]:46] GotoIf(“DAHDI/i1/2813622398-6e3”, “1?godial”) in new stack
– Goto (macro-dial-one,s,51)
– Executing [[email protected]:51] Macro(“DAHDI/i1/2813622398-6e3”, “dialout-one-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“DAHDI/i1/2813622398-6e3”, “”) in new stack
– Executing [[email protected]:52] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(D_OPTIONS=HhtrI)”) in new stack
– Executing [[email protected]:53] NoOp(“DAHDI/i1/2813622398-6e3”, “”) in new stack
– Executing [[email protected]:54] ExecIf(“DAHDI/i1/2813622398-6e3”, “0?Set(D_OPTIONS=HhTtrg)”) in new stack
– Executing [[email protected]:55] Dial(“DAHDI/i1/2813622398-6e3”, “PJSIP/6464/sip:[email protected]:47291,15,HhTtrb(func-apply-sipheaders^s^1)”) in new stack
– PJSIP/6464-00000e77 Internal Gosub(func-apply-sipheaders,s,1) start
– Executing [[email protected]:1] ExecIf(“PJSIP/6464-00000e77”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
– Executing [[email protected]:2] NoOp(“PJSIP/6464-00000e77”, “Applying SIP Headers to channel”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/6464-00000e77”, “SIPHEADERKEYS=”) in new stack
– Executing [[email protected]:4] ExecIf(“PJSIP/6464-00000e77”, “0?Set(Rheader=1)”) in new stack
– Executing [[email protected]:5] While(“PJSIP/6464-00000e77”, “0”) in new stack
– Jumping to priority 9
– Executing [[email protected]:10] ExecIf(“PJSIP/6464-00000e77”, “0?SIPRemoveHeader(Alert-Info:)”) in new stack
– Executing [[email protected]:11] ExecIf(“PJSIP/6464-00000e77”, “0?Set(PJSIP_HEADER(remove,Alert-Info)=)”) in new stack
– Executing [[email protected]:12] Return(“PJSIP/6464-00000e77”, “”) in new stack
== Spawn extension (from-internal, 6464, 1) exited non-zero on ‘PJSIP/6464-00000e77’
– PJSIP/6464-00000e77 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
– Called PJSIP/6464/sip:[email protected]:47291
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
– PJSIP/6464-00000e77 is ringing

Any help or suggestions would be greatly appreciated.

You need an inbound route for blacklist to work:
https://issues.freepbx.org/browse/FREEPBX-11607

Did you miss

– Executing [[email protected]:1] NoOp(“DAHDI/i1/2813622398-6e2”, “Catch-All DID Match - Found 6400 - You probably want a DID for this.”) in new stack

Allowing anonymous will bypass the blacklist.

I don’t allow anonymous calls. I have a default inbound route configured which all non-defined inbound routes hit. Calls to that inbound route get blacklisted properly.

The 6464 extension, which has an inbound route for the DID defined, receives calls that are on the blacklist.

However maybe I have the inbound route misconfigured, or the DID is also configured on the extension and it is routing based on that and not the inbound route.

I’ll check on that in the morning.

But apparently not 6400

The call to 6400 gets blacklisted, it’s the call to 6464 that skips the blacklist check.

To be clear. I just double-checked everything.

I have an Inbound route setup for 2482326464 that routes to extensions 6464.

I have another inbound route that is a catch-all so it will route any calls that don’t match an explicitly defined DID.

I’ve double checked all the settings for both routes, and the only difference is the Any Any inbound route’s destination is an IVR whereas the 6464 inbound route’s destination is an extension.

The calls to 2482326400 correctly check the blacklist. The calls to 2482326464 skip the blacklist check.

If that if working as intended, then how do I route a call to an extension, but have it check the blacklist first?

Or is it a bug?

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

I figured this out. I just wasn’t paying enough attention to the logs. It was very clear in the first line of the log:

Accepting call from ‘2813622398’ to ‘6464’ on channel 0/1, span 1

Which was routing directly to the extension, 6464. the Inbound route was setup as 2482326464, but the PRI is only sending 6464. Once I created an inbound route for 6464 the call started getting blacklisted.

1 Like

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