IVR Spam Block


I’m looking for a setup in FreePBX that has calls come into a IVR asking for callers to dial 1 to be connected. If 1 is pressed, the call proceeds forward. If not or a different digit is pressed then the call drops. I have this part working well. What I would like to add in is if the caller presses 1 they are added to the phonebook and all future calls from anyone in the phonebook skips the IVR. Does anyone know if this is possible? Thank you for any assistance or guidance given.


Take a look at


my wrinkle is I ask the caller to say something not dial something, STT can provide ‘authority’

The first one looks exactly like what I was looking for. Thank you so much for pointing me in that direction!

I’m kinda new to FreePBX. Do you have any details on how you loaded the scripts and 3rd party module into FreePBX?

Update: I’ve actually got the module and scripts loaded in. Now to figure out how to tie them all together.

No third party module , scripting as follows, I use a couple of methods

First, I ask the caller their name and store the recording, (every human will know their name, not so much BOTS) add that as an entry in the asteriskdb database structure, that way you can make a ‘supervised transfer’ announcing both CallerID(number) and their recorded name before answering the call every time they call. At which point you could conditionally add them to the whitelist if you want. Of course, in the absence of an audible response, just send them to voicemail or whatever.

As a ‘checkpoint’ I might conditionally further ask them what their zipcode is and send the recorded response to your STT which easily consume just numbers, if they pass muster, i.e. a verifiable legitimate 5 digit string (every 'mercan knows their ZIPCODE, not so much BOTS ) , add them and their associated zipcode to the ‘whitelist’ family in asteriskdb, you also get to selectively send any later calls from that CallerID(number) to the right department based on the zipcode if you want. (The possibilities are endless here . . . )

All of this can be accomplished without anyone having to press any buttons , they just have to be human.

I was able to get this working with the check and add scripts along with the custom destinations. This works like a charm!! Thank you Stewart1 and dicko for the excellent guideance!


Your welcome, but that kudos belongs to @lgaetz .


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.