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 [9927@from-pstn:1] Macro(“DGV/23”, “exten-vm,novm,9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-exten-vm:1] Macro(“DGV/23”, “user-callerid,”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-user-callerid:1] Set(“DGV/23”, “AMPUSER=86981514750”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-user-callerid:2] GotoIf(“DGV/23”, “0?report”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-user-callerid:3] ExecIf(“DGV/23”, “1?Set(REALCALLERIDNUM=86981514750)”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-user-callerid:4] Set(“DGV/23”, “AMPUSER=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-user-callerid:5] Set(“DGV/23”, “AMPUSERCIDNAME=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-user-callerid: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 [s@macro-user-callerid:10] GotoIf(“DGV/23”, “0?continue”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-user-callerid:11] Set(“DGV/23”, “__TTL=64”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-user-callerid: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 [s@macro-user-callerid:19] Set(“DGV/23”, “CALLERID(number)=86981514750”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-user-callerid:20] Set(“DGV/23”, “CALLERID(name)=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-user-callerid:21] NoOp(“DGV/23”, “Using CallerID “” <86981514750>”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-exten-vm:2] Set(“DGV/23”, “RingGroupMethod=none”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-exten-vm:3] Set(“DGV/23”, “VMBOX=novm”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-exten-vm:4] Set(“DGV/23”, “__EXTTOCALL=9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-exten-vm:5] Set(“DGV/23”, “CFUEXT=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-exten-vm:6] Set(“DGV/23”, “CFBEXT=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-exten-vm:7] Set(“DGV/23”, “RT=”"") in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-exten-vm:8] Macro(“DGV/23”, “record-enable,9927,IN”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-record-enable: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 [s@macro-record-enable:4] ExecIf(“DGV/23”, “0?MacroExit()”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-record-enable: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 [s@macro-record-enable: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 [s@macro-record-enable:20] ExecIf(“DGV/23”, “1?MacroExit()”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-exten-vm:9] Macro(“DGV/23”, “dial-one,”",tr,9927") in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:1] Set(“DGV/23”, “DEXTEN=9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:2] Set(“DGV/23”, “DIALSTATUS_CW=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:3] GosubIf(“DGV/23”, “0?screen,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:4] GosubIf(“DGV/23”, “0?cf,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one: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 [s@macro-dial-one:8] GotoIf(“DGV/23”, “0?nodial”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:9] GotoIf(“DGV/23”, “0?continue”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:10] Set(“DGV/23”, “EXTHASCW=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one: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 [s@macro-dial-one: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 [s@macro-dial-one: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 [s@macro-dial-one: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 [s@macro-dial-one:25] GotoIf(“DGV/23”, “0?nodial”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:26] GosubIf(“DGV/23”, “1?dstring,1:dlocal,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:1] Set(“DGV/23”, “DSTRING=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:2] Set(“DGV/23”, “DEVICES=9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:3] ExecIf(“DGV/23”, “0?Return()”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:4] ExecIf(“DGV/23”, “0?Set(DEVICES=927)”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:5] Set(“DGV/23”, “LOOPCNT=1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:6] Set(“DGV/23”, “ITER=1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:7] Set(“DGV/23”, “THISDIAL=SIP/9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:8] GosubIf(“DGV/23”, “1?zap2dahdi,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [zap2dahdi@macro-dial-one:1] ExecIf(“DGV/23”, “0?Return()”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [zap2dahdi@macro-dial-one:2] Set(“DGV/23”, “NEWDIAL=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [zap2dahdi@macro-dial-one:3] Set(“DGV/23”, “LOOPCNT2=1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [zap2dahdi@macro-dial-one:4] Set(“DGV/23”, “ITER2=1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [zap2dahdi@macro-dial-one:5] Set(“DGV/23”, “THISPART2=SIP/9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [zap2dahdi@macro-dial-one:6] ExecIf(“DGV/23”, “0?Set(THISPART2=DAHDI/9927)”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [zap2dahdi@macro-dial-one:7] Set(“DGV/23”, “NEWDIAL=SIP/9927&”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [zap2dahdi@macro-dial-one:8] Set(“DGV/23”, “ITER2=2”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [zap2dahdi@macro-dial-one:9] GotoIf(“DGV/23”, “0?begin2”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [zap2dahdi@macro-dial-one:10] Set(“DGV/23”, “THISDIAL=SIP/9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [zap2dahdi@macro-dial-one:11] Return(“DGV/23”, “”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:9] Set(“DGV/23”, “DSTRING=SIP/9927&”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:10] Set(“DGV/23”, “ITER=2”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:11] GotoIf(“DGV/23”, “0?begin”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:12] Set(“DGV/23”, “DSTRING=SIP/9927”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [dstring@macro-dial-one:13] Return(“DGV/23”, “”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:27] GotoIf(“DGV/23”, “0?nodial”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:28] GotoIf(“DGV/23”, “0?skiptrace”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:29] GosubIf(“DGV/23”, “1?ctset,1:ctclear,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [ctset@macro-dial-one:1] Set(“DGV/23”, “DB(CALLTRACE/9927)=86981514750”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [ctset@macro-dial-one:2] Return(“DGV/23”, “”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:30] Set(“DGV/23”, “D_OPTIONS=tr”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:31] ExecIf(“DGV/23”, “0?SIPAddHeader(Alert-Info: )”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:32] ExecIf(“DGV/23”, “0?SIPAddHeader()”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:33] ExecIf(“DGV/23”, “0?Set(CHANNEL(musicclass)=)”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:34] GosubIf(“DGV/23”, “0?qwait,1”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:35] Set(“DGV/23”, “__CWIGNORE=”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one:36] Set(“DGV/23”, “__KEEPCID=TRUE”) in new stack
[Aug 3 11:29:02] VERBOSE[9139] pbx.c: – Executing [s@macro-dial-one: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 [h@from-pstn:1] Macro(“DGV/23”, “hangupcall,”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [s@macro-hangupcall: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 [s@macro-hangupcall:9] NoOp(“DGV/23”, “End of MIXMON check”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [s@macro-hangupcall: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 [s@macro-hangupcall:28] NoOp(“DGV/23”, “End of MEETME check”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [s@macro-hangupcall: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 [s@macro-hangupcall:34] NoOp(“DGV/23”, “TOUCH_MONITOR_OUTPUT=”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [s@macro-hangupcall: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 [s@macro-hangupcall:41] NoOp(“DGV/23”, “MONITOR_FILENAME=”) in new stack
[Aug 3 11:29:03] VERBOSE[9139] pbx.c: – Executing [s@macro-hangupcall: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 [s@macro-hangupcall: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 [s@macro-hangupcall: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 [s@macro-hangupcall: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 [s@macro-hangupcall: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.

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.