﻿ Make and receive phone calls with Programmable Voice - Twilio


Rate this page:

Thanks for rating this page!


Make and receive phone calls with Programmable Voice


Any device connected by a Twilio SIM can make and receive Programmable Voice calls. This requires the device itself to support PSTN voice calling (PSTN is Public Switched Telephone Network, the traditional circuit-switched telephone networks).

Before you set up your device for voice, the Twilio SIM used in the device needs to have a SIM Rate Plan that has, at least, Voice selected as an Enabled Service. If not, you need to create one. See Understanding Rate Plans to learn how to create a Voice-enabled Rate Plan.

  1. Once you have your SIM voice-enabled, you first need to purchase a voice-enabled Twilio phone number.
  2. You then create a TwiML bin for making phone calls. Once made, you use this new TwiML to associate your Twilio SIM with your new phone number.
  3. Now, you create a TwiML bin for receiving incoming calls. As with making phone calls, you associate this TwiML with the Twilio SIM with your new phone number.

Your device connected by a Twilio SIM can then make and receive phone calls through Twilio.

Your device must be located within the United States on the T-Mobile network to use voice. Voice will not work when roaming on T-Mobile partner networks within the United States.

Purchase a voice-enabled Twilio phone number

You first to use the Console to purchase a voice-enabled Twilio phone number.


  1. From the Phone Numbers menu in the Console, click Buy a Number.
  2. In the page that appears, select a country.
  3. Optionally, enter an area code in the Number field to narrow the search.
  4. Select at least a Voice capability. Additional options (including the type of number, any address requirements, and beta numbers) are available by clicking Advanced Search.
  5. Click Search to generate a list of available Twilio numbers to purchase.
  6. Select a number and click Buy.

You can see an example below, which is the result of searching for a number in the United States.


You now have a Twilio phone number that you can associate with your programmable wireless SIM.

  1. From Programmable Wireless click SIMs.
  3. Click the Programmable Voice & SMS tab.
  4. In the Programmable Voice section, select TwiML from Voice URL.
  6. You should see a popup dialog appear with a TwiML template for routing voice calls as dialed. (See example below.)
  7. You can give the TwiML bin a Friendly Name.
  8. In the Response element, replace YOUR_NUMBER_HERE with the Programmable Number you bought in the previous section.
  9. Click Add TwiML Bin.
  10. Click Save.


That’s it! You can now make a phone call from your phone. The outbound Caller ID seen by the recipient will be the Twilio Phone Number you purchased earlier. Feeling creative? Use functions or set up your own TwiML server to dynamically set the Caller ID.

How to receive a call on a phone that has a Programmable Wireless SIM

You can now make phone calls from your cellphone with a Programmable Wireless SIM but you can't receive calls. This section will help you set up your SIM to receive calls.

Create TwiML for incoming calls


  1. From Runtime open TwiML Bins.
  3. Enter a name in the Friendly Name input field.
  4. For the TwiML Response, you can use the example TwiML shown below.
  5. In the Sim element, enter the SIM Sid in place of YOUR_SIM_SID_HERE. You can find your SIM Sid in the SIMs section under Programmable Wireless in the Console. It begins with the DE prefix. (See TwiMLTM Voice: <Sim>)
  6. Click Save.

You can see a completed example in the Console below.


Associate TwiML to a voice-enabled Twilio phone number

  1. Open the Phone Numbers section of the Console. (See Purchase an SMS-enabled Twilio phone number above if you don’t have a number.)
  2. Select the phone number you wish to associate with your SIM.
  3. From Configure With under Voice & Fax, select TwiML.
  4. Select TwiML from A Call Comes In.
  5. Select the TwiML you created in the previous section using its Friendly Name.
  6. Click Save.

Try it!

Call the phone number and you should receive the call on your SIM-connected device.

Logs and Billing






Known Limitations

Non-programmable calls and messages to the device


United States on T-Mobile network only

Programmable Voice is currently only offered when connected to the T-Mobile network in the USA. Voice will not work when roaming on T-Mobile partner networks within the United States.

Trial Accounts

Currently, Wireless Programmable Voice requires an upgraded Twilio account.

TwiML Only (No access from Calls REST API)

Wireless Programmable Voice calls can be processed using TwiML, as shown in these examples. However, it is not possible to directly address a SIM resource in the To field of the Calls REST API.

Jon Davis Evan Cummack Glenn Lea
Rate this page:

Need some help?
