GENWiki

Premier IT Outsourcing and Support Services within the UK

User Tools

Site Tools


asterisk:how_to_dump_out_the_blacklist_using_command_line

The blacklist is stored in the asterisk database (AstDB) but can be easily accessed from the command line using something like

asterisk -x "database show blacklist"

This is a raw dump and isn't much use in this format, we want to strip off the /blacklist/ and the : 1 then trim out the whitespace and loose the number of records. To do this in the shell we'd use

asterisk -x "database show blacklist"|sed "s/\/blacklist\///g"|sed "s/: 1//g"|grep -v dest|grep -v results|sed -e "s/  *$//"

I hope this helps. You can add to the blacklist database by using database put but be careful as there seems to be little in the way of error checking.

/data/webs/external/dokuwiki/data/pages/asterisk/how_to_dump_out_the_blacklist_using_command_line.txt · Last modified: 2019/07/30 16:02 by genadmin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki