System does not check if the number is in BLACKLIST

Good morning everyone.

I’m trying to block a certain number.
I add it to the “Blacklist” list. But, by looking at the log (tail -f /var/log/asterisk/ full), I notice that the function is not called.

My Log:


[Aug 3 11:25:01] VERBOSE[3851] asterisk.c: – Remote UNIX connection
[Aug 3 11:25:01] VERBOSE[9134] asterisk.c: – Remote UNIX connection disconnected
[Aug 3 11:29:02] VERBOSE[4118] chan_dgv.c: – Ringing on port 23 - callstate=0
[Aug 3 11:29:02] VERBOSE[4118] chan_dgv.c: – Answering port 23
[Aug 3 11:29:02] VERBOSE[4118] chan_dgv.c: – (Dgv/23): Category Received - ‘2’, use DGV_CATEGORY_RECEIVED variable to read it!
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:1] Macro(“DGV/23”, “exten-vm,novm,9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:1] Macro(“DGV/23”, “user-callerid,”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:1] Set(“DGV/23”, “AMPUSER=86981514750”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:2] GotoIf(“DGV/23”, “0?report”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:3] ExecIf(“DGV/23”, “1?Set(REALCALLERIDNUM=86981514750)”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:4] Set(“DGV/23”, “AMPUSER=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:5] Set(“DGV/23”, “AMPUSERCIDNAME=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:6] GotoIf(“DGV/23”, “1?report”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Goto (macro-user-callerid,s,10)
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:10] GotoIf(“DGV/23”, “0?continue”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:11] Set(“DGV/23”, “__TTL=64”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:12] GotoIf(“DGV/23”, “1?continue”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Goto (macro-user-callerid,s,19)
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:19] Set(“DGV/23”, “CALLERID(number)=86981514750”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:20] Set(“DGV/23”, “CALLERID(name)=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:21] NoOp(“DGV/23”, “Using CallerID “” <86981514750>”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:2] Set(“DGV/23”, “RingGroupMethod=none”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:3] Set(“DGV/23”, “VMBOX=novm”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:4] Set(“DGV/23”, “__EXTTOCALL=9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:5] Set(“DGV/23”, “CFUEXT=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:6] Set(“DGV/23”, “CFBEXT=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:7] Set(“DGV/23”, “RT=”"") in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:8] Macro(“DGV/23”, “record-enable,9927,IN”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:1] GotoIf(“DGV/23”, “1?check”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Goto (macro-record-enable,s,4)
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:4] ExecIf(“DGV/23”, “0?MacroExit()”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:5] GotoIf(“DGV/23”, “0?Group:OUT”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Goto (macro-record-enable,s,15)
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:15] GotoIf(“DGV/23”, “1?IN”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Goto (macro-record-enable,s,20)
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:20] ExecIf(“DGV/23”, “1?MacroExit()”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:9] Macro(“DGV/23”, “dial-one,”",tr,9927") in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:1] Set(“DGV/23”, “DEXTEN=9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:2] Set(“DGV/23”, “DIALSTATUS_CW=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:3] GosubIf(“DGV/23”, “0?screen,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:4] GosubIf(“DGV/23”, “0?cf,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:5] GotoIf(“DGV/23”, “1?skip1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Goto (macro-dial-one,s,8)
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:8] GotoIf(“DGV/23”, “0?nodial”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:9] GotoIf(“DGV/23”, “0?continue”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:10] Set(“DGV/23”, “EXTHASCW=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:11] GotoIf(“DGV/23”, “1?next1:cwinusebusy”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Goto (macro-dial-one,s,12)
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:12] GotoIf(“DGV/23”, “0?docfu:skip3”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Goto (macro-dial-one,s,16)
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:16] GotoIf(“DGV/23”, “1?next2:continue”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Goto (macro-dial-one,s,17)
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:17] GotoIf(“DGV/23”, “1?continue”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Goto (macro-dial-one,s,25)
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:25] GotoIf(“DGV/23”, “0?nodial”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:26] GosubIf(“DGV/23”, “1?dstring,1:dlocal,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:1] Set(“DGV/23”, “DSTRING=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:2] Set(“DGV/23”, “DEVICES=9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:3] ExecIf(“DGV/23”, “0?Return()”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:4] ExecIf(“DGV/23”, “0?Set(DEVICES=927)”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:5] Set(“DGV/23”, “LOOPCNT=1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:6] Set(“DGV/23”, “ITER=1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:7] Set(“DGV/23”, “THISDIAL=SIP/9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:8] GosubIf(“DGV/23”, “1?zap2dahdi,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:1] ExecIf(“DGV/23”, “0?Return()”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:2] Set(“DGV/23”, “NEWDIAL=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:3] Set(“DGV/23”, “LOOPCNT2=1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:4] Set(“DGV/23”, “ITER2=1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:5] Set(“DGV/23”, “THISPART2=SIP/9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:6] ExecIf(“DGV/23”, “0?Set(THISPART2=DAHDI/9927)”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:7] Set(“DGV/23”, “NEWDIAL=SIP/9927&”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:8] Set(“DGV/23”, “ITER2=2”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:9] GotoIf(“DGV/23”, “0?begin2”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:10] Set(“DGV/23”, “THISDIAL=SIP/9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:11] Return(“DGV/23”, “”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:9] Set(“DGV/23”, “DSTRING=SIP/9927&”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:10] Set(“DGV/23”, “ITER=2”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:11] GotoIf(“DGV/23”, “0?begin”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:12] Set(“DGV/23”, “DSTRING=SIP/9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:13] Return(“DGV/23”, “”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:27] GotoIf(“DGV/23”, “0?nodial”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:28] GotoIf(“DGV/23”, “0?skiptrace”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:29] GosubIf(“DGV/23”, “1?ctset,1:ctclear,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:1] Set(“DGV/23”, “DB(CALLTRACE/9927)=86981514750”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:2] Return(“DGV/23”, “”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:30] Set(“DGV/23”, “D_OPTIONS=tr”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:31] ExecIf(“DGV/23”, “0?SIPAddHeader(Alert-Info: )”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:32] ExecIf(“DGV/23”, “0?SIPAddHeader()”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:33] ExecIf(“DGV/23”, “0?Set(CHANNEL(musicclass)=)”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:34] GosubIf(“DGV/23”, “0?qwait,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:35] Set(“DGV/23”, “__CWIGNORE=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:36] Set(“DGV/23”, “__KEEPCID=TRUE”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [[email protected]:37] Dial(“DGV/23”, “SIP/9927,”",tr") in new stack
[Aug 3 11:29:02] VERBOSE[9139] netsock2.c: == Using SIP VIDEO TOS bits 136
[Aug 3 11:29:02] VERBOSE[9139] netsock2.c: == Using SIP VIDEO CoS mark 6
[Aug 3 11:29:02] VERBOSE[9139] netsock2.c: == Using SIP RTP TOS bits 184
[Aug 3 11:29:02] VERBOSE[9139] netsock2.c: == Using SIP RTP CoS mark 5
[Aug 3 11:29:02] VERBOSE[9139] app_dial.c: – Called SIP/9927
[Aug 3 11:29:02] VERBOSE[9139] app_dial.c: – SIP/9927-000000b9 is ringing
[Aug 3 11:29:03] VERBOSE[9139] app_macro.c: == Spawn extension (macro-dial-one, s, 37) exited non-zero on ‘DGV/23’ in macro ‘dial-one’
[Aug 3 11:29:03] VERBOSE[9139] app_macro.c: == Spawn extension (macro-exten-vm, s, 9) exited non-zero on ‘DGV/23’ in macro ‘exten-vm’
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: == Spawn extension (from-pstn, 9927, 1) exited non-zero on ‘DGV/23’
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:1] Macro(“DGV/23”, “hangupcall,”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:1] GotoIf(“DGV/23”, “1?endmixmoncheck”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Goto (macro-hangupcall,s,9)
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:9] NoOp(“DGV/23”, “End of MIXMON check”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:10] GotoIf(“DGV/23”, “1?nomeetmemon”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Goto (macro-hangupcall,s,28)
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:28] NoOp(“DGV/23”, “End of MEETME check”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:29] GotoIf(“DGV/23”, “1?noautomon”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Goto (macro-hangupcall,s,34)
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:34] NoOp(“DGV/23”, “TOUCH_MONITOR_OUTPUT=”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:35] GotoIf(“DGV/23”, “1?noautomon2”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Goto (macro-hangupcall,s,41)
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:41] NoOp(“DGV/23”, “MONITOR_FILENAME=”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:42] GotoIf(“DGV/23”, “1?skiprg”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Goto (macro-hangupcall,s,45)
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:45] GotoIf(“DGV/23”, “1?skipblkvm”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Goto (macro-hangupcall,s,48)
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:48] GotoIf(“DGV/23”, “1?theend”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Goto (macro-hangupcall,s,50)
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:50] AGI(“DGV/23”, “hangup.agi”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] res_agi.c: – Launched AGI Script /var/lib/asterisk/agi-bin/hangup.agi
[Aug 3 11:29:03] VERBOSE[9139] res_agi.c: – <DGV/23>AGI Script hangup.agi completed, returning 0
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [[email protected]:51] Hangup(“DGV/23”, “”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] app_macro.c: == Spawn extension (macro-hangupcall, s, 51) exited non-zero on ‘DGV/23’ in macro ‘hangupcall’
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: == Spawn extension (from-pstn, h, 1) exited non-zero on ‘DGV/23’
[Aug 3 11:29:03] NOTICE[9139] chan_dgv.c: Calling dg_HangUp on port 23
[Aug 3 11:29:04] WARNING[4023] chan_sip.c: SUBSCRIBE failure: unrecognized format:‘application/watcherinfo+xml’ pvt: subscribed: 0, stateid: -1, laststate: 0,dialogver: 0, subscribecont: ‘’, subscribeuri: ‘’


Anyone have any idea what it might be?

Blacklist only works if you have an Inbound Route:
https://issues.freepbx.org/browse/FREEPBX-11607

Thanks for the answer.

But I still do not understand.

In the tutorials I saw on the internet, the logic that follows:

  1. Add the external number to the blacklist, and select the option “Block Unknown / Blocked Caller ID”

In this, I believe that any connection I receive should be analyzed by the BlackList function.

If the external number is in the list, the lock is carried out. Otherwise, the extension should ring.

I will continue to try to solve the problem.

Thanks in advance.

In older versions of FreePBX everything related to the Blacklist was on a single page. In the new versions there are tabs at the top of the page, and you have to go to the last one and select a destination for blacklisted calls, such as “Terminate Call - Zapateller” - it you don’t select a destination it just puts the calls through to wherever they would have gone if the number was not on the blacklist.

1 Like

My FreePBX version is 2.8.1

So. Context exists. It still does not work. It only works if I put the number to be blocked in the “Caller ID Number” field.

But this is very limited. What I wanted was for all external source connections to any of my extensions to be submitted to BLACKLIST.

@jfbransou FreePBX 2.8 is EOL and unsupported. Any issues that you have in FreePBX 2.8 are not going to be addressed by Sangoma. So if there is a bug in the Blacklist module then it’s a permanent bug you have to live with.

If you want more functionality or improvements for the Blacklist module you’re going to have to update to something more current and supported.