[asterisk-users] Blacklist callers from file

Steve Edwards asterisk.org at sedwards.com
Sat Aug 27 14:48:07 CDT 2016


On Sat, 27 Aug 2016, tux john wrote:

> Hi. I would like to blacklist a few callers and I have been using the 
> *CLI> database put blacklist 1234 "annoying callers". Instead of putting 
> the same command for every user is there any way to have a file? Ideally 
> a file in /opt that I would update the blacklisted numbers (add,remove). 
> Is there anything like that, please?

If you are happy with the way blacklisting with the Asterisk database 
works, how about a shell script that loads all of the entries in your 
blacklist file?

Other alternatives involve modifying your dial plan. If you are 
comfortable with that then you can consider alternatives like an AGI that 
reads your text file and sets a channel variable.

If you need more 'immediacy' maybe storing the blacklist in a 'real' 
database is more appropriate -- especially if you want the users to 
maintain their own black list via a web page.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
             https://www.linkedin.com/in/steve-edwards-4244281



More information about the asterisk-users mailing list