Unwanted robocalls are a persistent nuisance, but combining the Robokiller spam-filtering service with a SignalWire phone number lets you automatically block spam calls before they reach your device. By deploying a simple application on a platform like Dokku, integrating a Robokiller API key, and routing incoming calls through Robokiller before forwarding legitimate calls, you can screen and decline bogus spam callers with minimal setup. This article explains how the integration works and walks through configuring Robokiller and SignalWire to block robocalls at scale.
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.
@robokiller.route('/')
def go_robokiller():
_api_key = os.environ.get('RK_API_KEY', None)
_to = request.args.get('To')
_from = request.args.get('From')
_dest = request.args.get('Dest')
_to = quote(request.args.get('To'))
_from = quote(request.args.get('From'))
_dest = quote(request.args.get('Dest'))
if all(v is not None for v in [_api_key, _to, _from, _dest]):
_data = json.loads(requests.get('https://enterprise-api.robokiller.com/v1/reputation?from=' + _from + '&to=' + _to + '&api_key=' + _api_key).content)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 Discord!
Frequently asked questions
What is Robokiller and how does it block spam calls?
Robokiller is a spam-blocking tool that uses a database of known spam numbers and AI-driven screening to decline bogus or illegal robocalls before they reach your SignalWire routed destination.
What do I need to integrate Robokiller with SignalWire?
You need a Robokiller API key, a PaaS such as Dokku, Heroku, or similar, and a SignalWire phone number to route incoming calls through the filtering setup.
How do I set up Robokiller with Dokku?
Clone the example project repository, deploy to your Dokku host, set your Robokiller API key as an environment variable, and ensure the resulting app URL is used as the webhook endpoint for your SignalWire phone number.
How does the SignalWire phone number handle spam vs legit calls?
The Dokku-hosted Robokiller integration examines incoming calls; if the call is flagged as spam, it is declined. Otherwise, the call is forwarded to your configured destination phone number through SignalWire routing.