One of the biggest jokes in the U.S. telecommunications industry has been the FCC’s Do Not Call List, a convenient source of working phone numbers for all the spammers on Planet Earth to use. Despite the threat of heavy fines, the FCC received 215,000 complaints in 2014 regarding unwanted robocalls and spam texts. In June, the FCC promulgated new rules clarifying that service providers could offer robocall-blocking technologies to consumers and implement market-based solutions that consumers could use to stop unwanted robocalls. Ten days ago, the FCC began publishing a weekly spreadsheet of 10-digit numbers associated with robocallers. And today we are pleased to do our part and provide a simple script which lets you deploy and periodically update the FCC’s RoboCall Blacklist on any Asterisk® 11 or 13 server platform.

Overview. Asterisk 11 and 13 already include a Blacklist feature to block unwanted callers. This functionality also has been integrated into the FreePBX® GUI for many years. Because of the size of the FCC RoboCall Blacklist, however, an indexed, robust database will be necessary to manage this on a busy PBX. With Asterisk 11 and 13, the integrated Asterisk Database now relies upon SQLite 3 with awesome performance. We need a simple way to distinguish FCC RoboCall Blacklist entries from other Blacklist entries that your PBX users have added either by phone using *30 and *32 or using the Blacklist feature in the GUI. In this way, the FCC entries can be replaced each week with a newer list while preserving any user-created Blacklist entries. There were several approaches to implementation discussed, and you can read all about them on the PIAF Forum. We’ve cherrypicked what we think are the best of all worlds employing a single script with some really elegant additions provided by Adam Goldberg and Dick Ollett. We have chosen a methodology that does not require Asterisk to be offline when the script is run so you can run it at any time. The script always makes a backup copy of the last FCC Blacklist just in case the FCC "improves things" and blows the current approach out of the water. You can recover by loading the previous week’s entries using the import-last-fcc-blacklist script. Only when you run the script the first time will you be asked to agree to the license agreement. After that you can incorporate the script into weekly cron jobs and forget about it.

Installation. Installing the software is easy. Log into your Asterisk server as root and issue the following commands:

cd /root
tar zxvf fcc-blacklist.tar.gz
rm -f fcc-blacklist.tar.gz

Update: There’s good news. This software now works with XiVO! Tutorial here.

Operation. After installation, you’ll end up with a copy of the GPL2 license (COPYING) and 2 scripts: import-fcc-blacklist and import-last-fcc-blacklist (described above). Each week, simply run import-fcc-blacklist. After running it once, if you want to add it to /etc/crontab, here’s the command that will do it for you and spread the load on the FCC download site:

echo "$(($RANDOM%60)) $(($RANDOM%24)) * * $(($RANDOM%2 +6 )) root /root/import-fcc-blacklist > /dev/null" >> /etc/crontab

NOTE: For each FCC Blacklist entry that’s added, you’ll get an "Updated database successfully" message. Be patient. It takes about a minute to gobble all of them up. This week Asterisk shows there are 11.597 unique entries: database show blacklist

Redirecting Blacklisted Callers. Some may prefer to redirect blacklisted callers to a destination other than the default "the number is not in service" announcement. You can do this easily by installing the Lenny Blacklist Mod for FreePBX. Download the module from the link provided to your desktop. In the GUI, choose Admin -> Module Admin -> Upload Module. Choose the file you downloaded and click Upload from Hard Disk. Then enable the module and select the Lenny Blacklist Mod button from the GUI’s main status menu. You do NOT have to redirect callers to Lenny although that’s an option worth considering. A working version of Lenny is available at this SIP URI: SIP/

Blocking Anonymous Callers. By default, both scripts block anonymous callers by adding them to your Asterisk Blacklist. If you want to disable this feature, comment out line 37 in both of the scripts before running them.

Another View. Fred Posner’s blog has proffered a different view on the FCC RoboCall BlackList, and it’s something you should consider. We have responded to his article with a few comments that seek to lay out the factors everyone should individually evaluate before implementing anyone else’s blacklist. We also are sympathetic with Fred’s observation that the FCC should take proactive steps to notify affected violators that their number has been placed on the blacklist and provide an opportunity to respond. That’s nothing Allison + Asterisk couldn’t handle with ease. We’d be happy to donate the IVR code.

Other Helpful Hints. For other tips on getting the most out of this new software, we have a section on the PIAF Forum just for you. It addresses issues such as how to implement a BlackList with providers that deliver calls with 11 digits or that deliver NANPA calls with a +1 prefix. HINT: For providers such as CallCentric and Anveo that deliver calls in these formats, use context=from-pstn-e164-us. Come join the discussion. Enjoy!

11/11 Update. We’re now into the third iteration of the FCC RoboCall Blacklist, and there still appear to be a few problematic entries. For example, the main FedEx Customer Service number (800-Go-FedEx) remains in the blacklist.

To check whether a number is in the list, use this command:

asterisk -rx "database show blacklist/8004633339"

To manually delete an unwanted entry from the list after a database update:

asterisk -rx "database deltree blacklist 8004633339"

Originally published: Monday, November 2, 2015

Don’t forget to List Yourself in Directory Assistance so everyone can find you by dialing 411. And add your numbers to the Do Not Call Registry. Or just call 888-382-1222 from your new number.


Need help with Asterisk? Come join the PBX in a Flash Forum.


Special Thanks to Our Generous Sponsors

FULL DISCLOSURE: 3CX, RentPBX, Amazon, Vitelity, DigitalOcean, Vultr and others provide financial support to Nerd Vittles and our open source projects through advertising or referral revenue. We’ve chosen these providers not the other way around. Our decisions were based upon their corporate reputation and the quality of their offerings and their pricing. Our technology recommendations are reached independently of financial considerations except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

Awesome Vitelity Special. Vitelity has generously offered a terrific discount for Nerd Vittles readers. You now can get an almost half-price DID from our special Vitelity sign-up link. If you’re seeking the best flexibility in choosing an area code and phone number plus the lowest entry level pricing plus high quality calls, then Vitelity is the hands-down winner. Vitelity provides Tier A DID inbound service in over 3,000 rate centers throughout the US and Canada. When you use our special link to sign up, Nerd Vittles gets a few shekels down the road to support our open source development efforts while you get an incredible signup deal as well. The going rate for Vitelity’s DID service is $7.95 a month which includes up to 4,000 incoming minutes on two simultaneous channels with terminations priced at 1.45¢ per minute. Not any more! For our users, here’s a deal you can’t (and shouldn’t) refuse! Sign up now, and you can purchase a Tier A DID with unlimited incoming calls and four simultaneous channels for just $3.99 a month. To check availability of local numbers and tiers of service from Vitelity, click here. NOTE: You can only use the Nerd Vittles sign-up link to order your DIDs, or you won’t get the special pricing! Vitelity’s rate is just 1.44¢ per minute for outbound calls in the U.S. There is a $35 prepay when you sign up. This covers future usage. Any balance is refundable if you decide to discontinue service with Vitelity.

​​3CX is a software PBX that’s easy to install & manage. It includes integrated softphones, WebRTC conferencing and essential add-ons out of the box, at no additional cost. Try the free edition at Better yet, download the PIAF5 ISO powered by 3CX. Free version includes support for 8 simultaneous calls with a SIP trunk.

  • Run on Premise or in the Cloud, on Windows and now on Linux
  • Softphones for iOS, Android, Win & Mac
  • Easy install, backup & restore, version upgrades
  • Automatically configures IP Phones, SIP Trunks & Gateways

  • RentPBX, a long-time partner and supporter of PIAF project, is offering generous discounts for Nerd Vittles readers. For all of your Incredible PBX hosting needs, sign up at and use code NOGOTCHAS to get the special pricing. The code will lower the price to $14.99/month, originally $24.99/month. It’s less than 50¢/day.

    Some Recent Nerd Vittles Articles of Interest…

    Be Sociable, Share!

    This article has 2 comments

    1. Thanks for the link, Ward. Although I have a different opinion on it’s effectiveness, it’s still a great demonstration and as I said, a good start from the FCC.

    2. This is wonderful, thank you so much for putting this tool together. Do you know of any lists detailing junk faxers?