
Combating Robocalls with Robo-Bouncer
Case Study: Introducing the RoboBouncer – AI-Powered Call Screening
In this case study, we demonstrate how we bring our internet and programming skills to traditional telecommunications through a project we’ve dubbed the RoboBouncer.
The RoboBouncer is an intelligent bot designed to screen your incoming voice phone calls. When a call comes in, the system asks the caller to state their name and records it. It then places the caller on hold while simultaneously making an outbound call to your personal phone number. You are played the recorded name, and the system provides you with a clear option to either accept or reject the call.
With full programmatic control over call handling logic, the possibilities that the internet brings to traditional telephony are virtually endless. Beyond the RoboBouncer, we have experience setting up sophisticated phone systems, including:
- Interactive Voice Response (IVR) systems (e.g., company directories).
- Advanced lead transfer systems.
- High-volume outbound calling solutions.
To personally test out the RoboBouncer service, you are welcome to call our dedicated phone number: (949) 446-1716.
Following popular demand, we have also developed a commercial version that automates the deployment and setup of your own RoboBouncer instance. Click here to create your own RoboBouncer easily.
For those who are technically inclined, we have made the code and detailed information available in our BitBucket repository.
Creating a telephone call screening service using Twilio
This project demonstrates the creation of a call screening service utilizing the Twilio platform.
The Call Flow:
- Caller calls your Twilio Number: The system (the “agent”) answers and prompts the caller to speak their name, which is then recorded. The caller is subsequently placed in a queue (representing the “Inbound Call”).
- Outbound Call to You: Using the Twilio REST API, the system initiates an outbound call from your Twilio Number to your designated personal phone number.
- Playback and Options: When you answer, the recorded name of the caller is played back to you. You are then presented with the following options:
- Press 1 (DTMF) or Say “Accept” (SpeechResult): This action uses Twilio’s Dial verb to connect your phone to the caller who is waiting in the queue.
- Press 2 (DTMF) or Say “Reject” (SpeechResult): Using the REST API, the system notifies the waiting caller (e.g., with a message like “The person you are trying to reach is unavailable”) and then ends the call for both parties (hangs up on the caller in the queue and hangs up on your outbound call).
Technical Details:
- Uses the TWIML API and the Twilio Voice API PHP SDK.
- Utilizes the Queue resource and the Enqueue TwiML verb to place the caller on hold while the outbound call to you is made. Note: You could also use the Conference verb instead of Enqueue for potentially more options, simply by replacing Enqueue with Conference in the TwiML.
- To get started, follow this guide to set up your free Twilio account, get a phone number, and obtain your API SID and Token: https://www.twilio.com/docs/voice/quickstart/php
- Remember to configure the webhook for your Twilio phone number to point to your
step1.xml
file (or select the appropriate TwiMLBin URL if using that).
Deployment Suggestion:
Setting up a dedicated web server isn’t strictly necessary. You can leverage Twilio’s own hosting features:
- Use Twilio TwiMLBins to host your XML files (like
step1.xml
). Let Twilio handle the file hosting for you. - Use Twilio Functions for your server-side logic (converting the PHP logic to Javascript). The IVR Menu example in the Twilio documentation is a good starting blueprint for this.
I would strongly suggest using TwiMLBins for hosting XML files and, if you are capable, utilizing Twilio Functions for the server-side code to simplify your deployment.