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.
- Log in to the Twilio Console.
- In the left navigation menu, navigate to Builder Tools → TwiML host and config → TwiML Bins.
- Click Create new TwiML Bin (or the + button).
- In the Friendly Name field, enter a descriptive label (e.g.,
Forward to Mobile). - 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]).
- 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.
- In the Twilio Console navigation menu, navigate to Communications → Numbers and Senders → Overview.
- Click on the active Twilio phone number you wish to configure.
- Select the Voice and emergency address tab.
- Click Edit Configuration details and set the region/edge to US1.
- 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.
- Click Save to commit the configuration.
Verification
- Using a third-party phone (neither the Twilio number nor the forwarding destination number), dial your Twilio phone number.
- Confirm that the incoming call connects to Twilio and forwards immediately to your destination phone. 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 thecallerIdattribute:
<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.