SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

How to Set Up Call Forwarding Using a TwiML Bin in the New Twilio Console

Objective

Configure a Twilio phone number to automatically redirect incoming voice calls to an external personal or business phone number using a TwiML Bin.

 

Product

Programmable Voice

 

Procedure

Part 1: Create the TwiML Bin

The TwiML Bin hosts the XML instruction telling Twilio to route incoming calls to your forwarding destination.

  1. Log in to the Twilio Console.
  2. In the left navigation menu, navigate to Builder Tools → TwiML host and config → TwiML Bins.
  3. Click Create new TwiML Bin (or the + button).
  4. In the Friendly Name field, enter a descriptive label (e.g., Forward to Mobile).
  5. In the TwiML Content area, paste the following code:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial>+13105555555</Dial>
</Response>

Note: Replace +13105555555 with your verified destination phone number in complete E.164 format (+[country code][area code][phone number]).

  1. Click Save (or Create) at the bottom of the page.

 

Part 2: Connect the TwiML Bin to Your Twilio Phone Number

Attach the routing instruction directly to your active phone number.

  1. In the Twilio Console navigation menu, navigate to Communications → Numbers and Senders → Overview.
  2. Click on the active Twilio phone number you wish to configure.
  3. Select the Voice and emergency address tab.
  4. Click Edit Configuration details and set the region/edge to US1.
  5. Under the voice routing options:
    • Set the Primary Method to TwiML Bin.
    • In the adjacent dropdown, select the TwiML Bin created in Part 1 (e.g., Forward to Mobile).
    • (Optional) Set the Secondary Method to the same TwiML Bin to act as a fallback in case of routing interruption.
  6. Click Save to commit the configuration.

 

Verification

  1. Using a third-party phone (neither the Twilio number nor the forwarding destination number), dial your Twilio phone number.
  2. Confirm that the incoming call connects to Twilio and forwards immediately to your destination phone.
  3. Check the Twilio Console under Explore Products → Voice → Calls log to verify that the call shows a status of Completed with both call legs recorded.

Important Considerations

  • By default, standard <Dial> forwarding displays the original caller's phone number on the destination phone. To display your Twilio number instead, add the callerId attribute:
     
<Response>
    <Dial callerId="+1TwilioNumber">+13105555555</Dial>
</Response>
  • Trial Accounts: If your account is in trial status, you can only forward calls to phone numbers that have been pre-verified under Phone Numbers → Manage → Verified Caller IDs.
  • Billing: Forwarded calls generate two billable legs: one incoming call to your Twilio number, and one outgoing call from Twilio to your forwarding destination.

 

Additional Information

Have more questions? Submit a request
Powered by Zendesk