If you’re getting bombarded with robocalls, just a few lines of code, a couple of simple tools, and a SignalWire phone number can automatically block them.
This is a solution we built to address a customer concern that we’re now making available for everyone. You don’t have to be an expert developer in order to deploy it, and it will work for everything from your office phone number to your personal cell - whatever you have that just keeps getting spam calls.
By setting up a SignalWire phone number with Robokiller, you’re putting up a buffer that will decline bogus spam calls, and route legit calls to your chosen phone number.
All you need is a Robokiller API Key, a PaaS (such as Heroku, Piku, or Dokku, which is what we’ll use in this example), and a SignalWire phone number to get started.
What is Robokiller?
Everybody gets unwanted spam calls and texts. Robokiller is a tool to block those bogus or illegal spam calls. Robokiller uses AI to screen calls and block spam by managing a database of phone numbers and running them against a block list. It will be your first line of defense against spam.
You can use Robokiller with SignalWire by integrating it with a SignalWire phone number. If you’ve never used Robokiller before, you can test it out with a free two week trial to get it up and running and see how you like it.
How to set up Robokiller in Dokku
For this example, we’re using Dokku, but you can use your PaaS of choice. If you don’t have Dokku set up yet, check out their Getting Started with Dokku guide.
You will be using this code block which we’ve already written for you and you can view or copy from below. If you’re using Dokku to run this code, you’ll input your Robokiller API key there.
The project can be cloned from the following repo on your local machine:
source git clone git@github.com:briankwest/robokiller.git
Next, create the Dokku app on the remote Dokku instance and deploy to it.
On the Dokku host:
dokku apps:create robokiller-getting-started
On your local machine, set up the Dokku instance as a remote repository and push to it. This will deploy the code and start the app. Note: It may be required to add permissions to the app for any users needing to push to it. It may also require adding an SSL certificate for HTTPs.
# Add a git remote to the newly created instance cd robokiller git remote add dokku dokku@dokku.your-domain.com:robokiller-getting-started git push dokku main
Then, grab your API key from Robokiller. In your Robokiller dashboard, navigate to API keys, and create one if you haven’t already. All you need to do is give it a name and copy it to your clipboard.
Add the Robokiller API key as an Environment Variable in the Dokku app. This can be done one of two ways:
Via the Dokku UI, paste your API Key into RK_API_KEY.
Or, via the CLI of the main Dokku Instance, you could similarly paste your API key there.
dokku config:set RK_API_KEY=YOUR-ROBOKILLER-API-KEY
Routing Calls in Your SignalWire Dashboard
Once you have Robokiller and Dokku set up, all you need is a SignalWire phone number to act as a buffer between spam calls and your personal phone number.
Dokku will give you the web address that you’ll plug into your SignalWire dashboard. To get this URL, copy it from your Dokku apps page.
In your SignalWire Dashboard, navigate to Phone Numbers in the left-hand sidebar. From there, choose a phone number to edit. If you haven’t purchased any phone numbers yet, select + New in the top right-hand corner to purchase a local 10DLC number.
Take your URL from Dokku, and paste it into the *WHEN A CALL COMES IN field. Then add /?Dest= followed by your full destination number including the country code to the string. Switch the method field next to this string from POST to GET.
Save this change to your phone number, and this number will now function as a buffer for spam calls before routing legit calls to your personal number. If it’s spam, the SignalWire number will block it using Robokiller. If it’s a real call, it will be forwarded on to your real phone number.
If you have any questions or requests, reach out to us on Slack or our new Community Forum!