How to Forward Calls with SignalWire

Forwarding calls with SignalWire is exceedingly simple - you can be completely set up in under 5 minutes!

How to Write a Call Forwarding Bin

As call forwarding in a super easy use case with SignalWire, you can use our serverless code hosting bins to keep your life code free!

Within your SignalWire space, click the LaML tab on the left-hand side nav. Click on Bins and create a new Bin. You can paste your XML code in these serverless bins. To learn how to use these bins as a webhook for handling inbound calls, check out our article webhook for handling inbound messages and calls.

The following code is the most simple implementation of call forwarding where the caller ID shown is that of the original caller. You use the <Dial> verb to call the number you would like the call to be forwarded to and the callerId parameter to pass the original callers number through as caller ID. You can read more about mustache templating and how it works here to learn how {{From}} can insert the caller's phone number and what other templates you can use.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial callerId='{{From}}'>123-456-7891</Dial>
</Response>

How to Assign the Bin to a SignalWire Phone Number

Read here for more information about webhooks and how they work with SignalWire!

Click the Phone Numbers tab on your lefthand side nav within your SignalWire space, and click the specific number that you would like to set up call forwarding on. If you don't have a number yet, now is the time to buy one!

Make sure that Accept Calls As is set to Voice Calls, Handle Calls Using is set to LaML Webhooks, and paste your Bin URL in as the value for When a Call Comes In. Save, and you're done! Your calls to this SignalWire number will now be forwarded to the number that you designated in the bin.


Did this page help you?