[This module is now installed from the FreePBX mirror repo with FreePBX 15 and up - mod]
We’ve been getting lots of spam calls lately so I decided to try and see if I could create a module that would let me block all callers not in a allowed list.
I started with the Blacklist module and essentially reversed the logic so that callers on the list are allowed through and all others blocked or sent to the destination selected. I did change one aspect of the logic so that if a non-allowlisted destination is not defined, the call is allowed to proceed. This prevents shutting down all incoming calls when you first install the module.
I also took care to make sure that the Allowlist module would play well with the Blacklist module. The Blacklist rules come first in the dial plan so if a number is blacklisted it will be blocked regardless of its presence in the whitelist.
The one thing I really wasn’t sure of was how to locate unused feature codes to be sure it wasn’t stomping on some other modules codes – I used one unused on my system but that’s no guarantee for anyone else that tries it.
I put it out on github if anyone is interested. Its self signed so you’ll have to resign the module locally if you decide to try it.
https://github.com/mitchmitchell/allowlist
I don’t have the language skills to update the message translations so they will all be incorrect, and may not even work if the system language is something other than English.
, extract the 10 least significants put in astdb /whitelist/number/date and /whitelist/number/destination where destination is ‘mum’, ‘voicemail’, ‘cell’, ‘desk’, ‘sales’ , ‘hangup’ , ‘lenny’, ‘SIT’ etc
but it is tested all the time, no complaints yet except for one girl who’s announcement was “You have reached the Whitehead family, who do you want to call?” better that with “You have reached the number you dialed, who do you want to speak to?” for Companies a more conventional “Hi there you have reached Biggies Wholesale, do you want sales or customer service?”