Asterisk func BLACKLIST


Check if the callerid is on the blacklist



Uses astdb to check if the Caller*ID is in family 'blacklist'.


  • *CLI> core show function BLACKLIST

Return value

Returns 1 or 0.


exten => s,1,GotoIf(${BLACKLIST()}?blacklisted)
exten => s,n,Dial(SIP/123)
exten => s,n(blacklisted),Hangup()

You can add entries from the CLI as follows
  • *CLI> database put blacklist 1234 "Blacklisted for testing"
where blacklist is the family, 1234 is the callerid to blacklist and "Blacklisted for testing" can be any value you wish, though a description of why it's blacklisted may be useful.

You can remove entries from the CLI as follows
  • *CLI> database del blacklist 1234

See also

Created by: dant, Last modification: Thu 15 of Oct, 2009 (05:06)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+