Using Voxbone with SignalWire
BYOC, or Bring Your Own Carrier, is a way to integrate a carrier of your choice with your existing comms platforms and services, to get the best out of every supplier and benefit from Voxbone’s compliant, reliable voice infrastructure around the globe.
This guide shows you how to bring your Voxbone numbers to SignalWire. It’s easy to connect numbers from your Voxbone account to SignalWire using their RELAY API. This requires setting up a FreeSWITCH instance that’s connected to Voxbone. To learn how that can be done, refer to our guide on using Voxbone with FreeSWITCH.
A little disclaimer: This is a guide developed by Voxbone’s Product team to help you get the most out of our platform. It isn’t necessarily supported or endorsed by the other platform, but we’re confident in its technical accuracy.
What you’ll need to get started:
- A registered Voxbone account complete with phone numbers. (Create your account here)
- A running FreeSWITCH instance.
- A SignalWire account (Create your account here)
How it works
When a call is received by Voxbone, we deliver it to your SignalWire app through your FreeSWITCH instance through something called voice URIs – a kind of address for your voice services. Behind the scenes, we take care of complex things like least-cost routing, finding the best provider and optimizing for maximum call quality.
SignalWire provides a very simple way to connect your FreeSWITCH instance automagically to their platform via simple commands. This is achieved using the mod_signalwire module on FreeSWITCH. Unfortunately, as this module isn’t yet capable of triggering specific hosted apps on SignalWire, we will use a workaround with calling a dummy (and virtual) phone number.
This can be done in three steps:
- Connect your FreeSWITCH to SignalWire. (Follow the official guide here)
- Configure dialplans
- Reload configs to apply changes!
Connect FreeSWITCH to SignalWire
SignalWire provides an easy way to connect a VoIP server to their cloud platform. This is an easy way to automatically configure things like ACLs and gateways and ensure they remain up to date. FreeSWITCH is currently the only VoIP software supported, but it’s intended to extend support to other popular solutions. When you’ve successfully connected your FreeSWITCH to SignalWire, take note of the connection name as it will become the SIP domain we’ll be using for the rest of the integration. The domain will be in the following format:
Example : voxbone-fs.sip.signalwire.com
Configure a SIP Endpoint
In order to use the connection we just created, we need a SIP Endpoint on SignalWire to authenticate and route calls to SignalWire from FreeSWITCH.
- Log in to SignalWire
- Click “SIP” under your project and create a new endpoint.
- Take note of the SIP domain, username and password, which will be needed in the next steps. For this tutorial, we created an endpoint called “freeswitch-handler”
Configure Voxbone Integration with SignalWire on FreeSWITCH
To start using the integration, we need to create a gateway on FreeSWITCH for handling incoming calls from Voxbone with SignalWire, and finally update the dialplan with necessary routing to forward certain calls to SignalWire.
- Gateway configuration : Once the Connector is successfully activated, the SignalWire gateway and ACL configs will be automatically configured. We just need to add the username and password of the SIP Endpoint we created to the existing configuration. Modify the SignalWire gateway or create a new file named signalwire.xml under /sip_profiles/external/
- Now you can update your dialplan to route an incoming call from Voxbone to SignalWire. In this example, we’re routing the call to the dummy DID we have on SignalWire that’s configured the handle the call with a DialogFlow Agent. Append the following to your public dialplan (/dialplan/public.xml)
The dummy DID we used from SignalWire is configured to handle the call using Google DialogFlow, but you’re free to choose any call handler supported by SignalWire.
Testing your SignalWire integration with Voxbone
Any calls placed to the numbers routed to your FreeSWITCH are delivered by Voxbone to your FreeSWITCH instance. Now, you can forward that call via the dummy SignalWire DID to any app hosted/integrated to SignalWire!