Telemarketers are the Devil!
We all know the pain that comes from picking up the phone to hear a telemarketer reading off of a script trying to sell you something. FreePBX allows you to block telemarketers by including a Blacklist module that can redirect blacklisted caller ID’s to a pre-set destination such as Lenny. The problem with the Blacklist module however is that it isn’t live – you can either manually add a caller ID to the blacklist, or you can use feature code *32 to blacklist the last caller. This is great functionality, but I wanted a better way.
This originally came up during a contest that I was running on my channel. I wanted to do a call-in contest where users could call into an IVR, answer a series of questions, and ultimately make it to a call queue that rang a phone next to me while I was doing a live stream. However, I wanted to restrict the people entering the contest to one try only so that they couldn’t guess their way through. So, I knew that if they timed out, or if they got a question wrong, then their caller ID should be blacklisted. Then, the next time they call in, they get redirected to the Blacklist destination, which I had set to Lenny. Of course, to twist the dagger a bit, if they did get a question wrong, my recorded voice told them to call back and try again. Muahahaha. The contest went incredibly well, and you can see the live stream on YouTube here.
The problem that I ran into though was that there was no way built into FreePBX to blacklist a live caller. But, this challenge is an excellent example of how you can extend the functionality of FreePBX with custom programming to accomplish whatever you can think of. I reached out to my contacts at FreePBX and told them about the contest, and my need to blacklist live callers. Andrew, Rob, and James on the FreePBX dev team came through big time and custom wrote a module that does exactly that. Not just a little snippet of dialplan code mind you – a completely custom signed module. Awesome – huge props to those guys for coming through for me.
So, I asked those guys if they mind if I make the module public, and they said no problem. So now I am happy to introduce the Blacklist Loser module! When this module is implemented, it becomes a destination on your FreePBX or PBXact server. They not only made the full package available, but they also put it on Github here. This is a really great example of a simple, bare minimum custom module. ***Note that this module is provided under the GPLv3 license, is unsupported, and has no warranty.
Step 1 – Install Blacklist Loser module
To install the Blacklist Loser module in FreePBX, first download the file here. Once downloaded, navigate to Admin –> Module Admin. Click on ‘Upload Modules’ and select Type: Upload (from Hard Disk). Browse for your downloaded file and click the Upload (From Hard Disk) button to upload and install the module.
Next, go back to your Module Admin and scroll down to the ‘Applications’ section. You should see a new Blacklist Loser module that is available, but not installed. Change the Action to Install, and click ‘Process’ at the bottom (or top) of the Module Admin screen. On the next screen, click ‘Confirm,’ and your module will be installed.
Step 2 – Create a Block Telemarketers Ring Group
Now – how do you use it? Well, in my case, I had a contest IVR where the invalid digit and timeout applications forwarded to the blacklist. I played a message saying they lost, and then Blacklist Loser put their caller ID on the blacklist and hung up on them. That worked great for the contest, but what I want to do is create a blacklist extension (x666) to block telemarketers for good.
First, create a new ring group (Applications –> Ring Groups) and set it as extension number 666. If the FreePBX gripes about the Dial System Fax feature code (666 by default) you have to go to Admin –> Feature Codes to disable it first. (And of course you know better than to use faxing in FreePBX right??). Add any extension number to the Extension List (best if it’s not a real extension number) and then set the destination if no answer to Blacklist Loser. Save and apply, and you’re done!
Step 3 – Sit Back and Laugh
Now, when a telemarketer calls you, simply transfer to x666 and they will be sent to Lenny (or whatever your Blacklist destination is set to) when they call back! Enjoy!