How can I set up call forwarding?

There are several ways to set up call forwarding so that calls which come in to your Twilio phone number are forwarded to another device.

Call Forwarding with Twimlets

No programming experience necessary!

The fastest way to setup basic call forwarding is by using a “Twimlet“. Twimlets are pre-built apps hosted by Twilio.

To set up a call forwarding Twimlet:

  1. Vist the Forward Twimlet page.
  2. Use the Twimlet Generator to construct your Twimlet.
  3. The Twimlet Generator will generate a red URL for you that looks something like http://twimlets.com/forward?PhoneNumber=XXX-XXX-XXXX. XXX-XXX-XXXX should be the number you want to forward the call to. Copy this URL.
  4. Go to the setup page for the number you want to forward from. You can find you number by going to the phone numbers page for your account. Clicking on the red phone numbers will take you to the setup page for that number.
  5. Once you’ve made it to the phone number’s setup page, paste the Twimlet URL you copied into the Voice Request URL field and press save.

Call Forwarding with TwiML

Some coding and a hosting environment required.

If you want to build call forwarding functionality from scratch and host it on your own server, you can, by using the <Dial> verb. In this case, you’ll want your Voice Request URL to return XML that includes the <Dial> tag, with your device number specified. For example, if you want all calls to forward to 205-444-5555, you can return the following TwiML:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial>
        <Number>
            205-444-5555
        </Number>
    </Dial>
</Response>

If the device you’re forwarding to has an extension, you can make use of <Number>‘s optional “sendDigits” parameter. For example, if 205-444-5555 has an extension #1212, you can submit those dialpad tones like this:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial>
        <Number sendDigits="1212">
            205-444-5555
        </Number>
    </Dial>
</Response>

For documentation and more examples, see our page on the <Dial> verb and <Number> noun.

Best of both worlds

Lets say you want the customizability that TwiML gives you, but you like the fact that Twimlets are hosted by Twilio. Well, you may want to check out the Echo Twimlet.

How much will this cost?

Please read this article on the costs of forwarding a call through a Twilio number.