… of cabbages and kings.
I have several DIDs published for business purposes, and as time passes, they become incrementally more prone to robocalls. This is to the point now that robocalls may well outnumber legitimate calls, with some days being intolerable. The FreePBX blacklist is unable to deal with them effectively because there is no consistency to the Caller ID, nor have I wanted to force all callers to navigate an IVR as it will negatively affect customer experience. And so, not unlike the walrus and the carpenter who lament all the sand on the beach, I’ve complained about robocalls but never did anything about it.
Until a few weeks ago when someone saw fit to wake me up at 5am with an offer to renew my Google listing. This was 5am on a national holiday. A holiday whose only practical purpose is reserved for hangover recovery. And so, with my beauty sleep interrupted, I spent some time writing AGI scripts that will:
- check a number against the FreePBX Contact manager and indicate if that number is present or not, and
- automatically add a contact to the FreePBX Contact Manager if not already present
With the above in place, I check the inbound Caller ID number against the Contact Manager, and if the number isn’t there, the caller gets sent to an IVR that challenges them with a DTMF entry. Once they successfully pass the challenge, the number is auto added to the Contact Manager, and the caller will never again be sent to the IVR. It’s assumed that no robocalls will get through, but if they evolve I can add some complexity to the IVR such as forcing callers to enter a randomly generated code.
I’m using the third party modue, DynRoutes for the Contact Mgr check, and just a normal Custom Destination to add CallerID to the Contact Manager.