When we add a number to the blacklist, where are these numbers saved in the file system? Are there any tools to batch update this list?



They’re stored in the Asterisk database - from the CLI you can do this to add an individual number (where 1234567890 is the number in this example):

database put blacklist 1234567890 1

Note the 1 at the end, it’s important!

There’s probably a way to enter a bunch of them in a batch. Trying to copy and paste a bunch on entries in the above format from a text file to the CLI sort of works, but can miss values every so often if you try to put in too many at once. It probably wouldn’t be hard to make a shell script to do it, but I can’t remember offhand the syntax of a command to send an individual command to Asterisk, it’s similar to asterisk -## ‘database put blacklist 1234567890 1’ but not sure what the options in the ## position are (rx maybe? I hate the Linux command line because I can never remember the syntax for things like this). If you could find out the syntax you could just make a shell script with all your numbers inserted into the proper place in the string.