Make and Receive Phone Calls with only a Phone and Twilio Studio
Time to read: 5 minutes
Using a Twilio number to forward calls to your personal phone is a common and well documented use-case, but many Twilio customers have started asking if they can use only their cell phone to place outgoing calls with their Twilio number.
This guide shows how to build a Studio Flow that will allow you to use your Twilio number as a full capable proxy, so you can place outgoing calls and receive incoming calls using only your personal phone.
Things you'll need
In order to follow this tutorial, you will need:
- A Twilio account and a Twilio phone number that can receive calls.
- Your personal phone.
The Build - Outgoing Calls
Typically, outgoing calls are created from an application with an outbound-api call request. But what if you only have your cell phone and don’t have or want to deal with an application? Well, then you would have to use your cell phone to both trigger the outgoing call with Twilio AND send the number you want to call.
To do this, we will build a Studio Flow that checks what number is calling the Twilio number, and if the calling number is your personal phone, then it will ask you to input the number you want to call, and then connect you with this number. When a number besides your personal number is calling the Twilio number, we will set up normal call forwarding, so that these calls will be forwarded to your personal phone.
When you configure your Twilio number with this Flow, you will be able to use your Twilio number to both forward incoming calls and place outgoing calls from your Twilio number with only your personal phone.
Let’s get started.
Create Your Flow
- Go to the Manage Flows Studio page, then click either the red Create new Flow button (if this is your first Flow) or the red plus (‘+’) sign (if it’s not your first Flow).
- Give your Flow a name and click Next. I used
Inbound & Outbound Call Forwarding
. - Select “Start from scratch” in the menu, and click Next again.
Configure Outbound Call Forwarding
1. Drag a Split Based On widget onto your canvas and connect this to the Incoming Call port of your Trigger.
- Click on the widget, give it a name (I called mine ‘CheckNumber’), and set the VARIABLE TO TEST to
trigger.call.From
. - Click the Transitions tab, then click the + sign next to NEW CONDITION.
- Leave the first field in your condition as the default Equal To and put your personal phone number in the field below, which says Enter Value....
Be sure to put your number in the full E.164 format, which includes the + sign, country code, and area code or your Flow may not work. - Click Save.
2. Drag a Gather Input On Call widget onto the canvas and connect this to the transition port you just configured.
- Click on your Gather Input On Call widget and call it ‘GetNumberToCall’.
- In the TEXT TO SAY field, paste the message “Please enter the number you would like to call, then press the pound key”.
- Click Save.
3. Drag a Connect Call To widget onto your canvas and connect this to the User Pressed Keys port of your Gather Input On Call widget.
- Click on the Connect Call To widget and give it a name. I called mine ‘MakeOutboundCall’.
- In the empty field in the CONNECT CALL TO section under Single Number, paste the following variable:
{{widgets.GetNumberToCall.Digits}}
. This variable will be set to the digits pressed during your call.
If you named your Gather Input On Call widget something else, you will need to update the variable above with this name. - Change the field under CALLER ID to
{{flow.channel.address}}
. This will set the caller ID to your Twilio number instead of the number you are calling from, which in this case would be your personal number. - Click Save.
4. Click the red Publish button at the top
Configure Your Twilio Number
Now let’s configure the Incoming Call webhook of your Twilio Number to use the Studio Flow you just created.
- Click the Twilio number you want to use for your calls in your Active Numbers here.
- Scroll down to the A CALL COMES IN dropdown in the Voice section and select Studio Flow.
- Select your new Flow in the Select a Flow dropdown to the right.
- Hit Save at the bottom, and you’ll be all set to test your app!
Test your Flow for outgoing calls
Now that you’ve built your flow for outgoing calls and configured your Twilio number to use it, try calling your Twilio number from your personal phone (i.e. the number you are checking for in your Flow).
If you followed the steps correctly, your number should be recognized, you will hear the request to enter the number you wish to call, and your call should be forwarded with your Twilio number as the caller ID.
The Build - Incoming Calls
You can now use your Twilio number to make outgoing calls using only your personal number, so let’s finish up the build and setup call forwarding for incoming calls.
Configure Inbound Call Forwarding
1. Go back to your Flow and drag another Connect Call To widget onto your canvas.
- Connect this to the No Condition Matches port of your Split Based On widget.
- Click on this Connect Call To widget and give it a name. I called mine ‘ForwardIncomingCalls’.
- In the empty field in the CONNECT CALL TO section under Single Number, put your personal number in E.164 format.
- Click Save.
In this case, we do not change the ‘CALLER ID’. If you changed this to the flow variable like in the other Connect Call To widget, all your forwarded calls would show your Twilio number as the caller ID, and you wouldn’t know who is actually calling you.
2. Click the red Publish button at the top.
3. Your completed Flow should look something like this:
Test your Flow for incoming calls
Let’s now finish up by testing incoming call forwarding. To do this, you’ll need to call your Twilio number configured with this Flow from a number not being checked for.
If everything went smoothly, your Flow should use the ‘No Condition Matches’ port of your Split Based On widget, and the call should be forwarded to your personal phone with the caller ID of the calling number, not your Twilio number.
Making and receiving phone calls from and to a Twilio Number with only a phone and Twilio Studio
And that’s all folks! You can now use your Twilio number as a fully-capable proxy number with only your personal phone. For many, this means you can use Twilio as a small business line without coding anything or managing a server, and all while protecting your personal number from the public.
Samuel Eddy is a Senior Technical Support Engineer at Twilio. When he’s not helping customers build at work, he’s often building for himself, friends, or family at home. He can be reached at seddy@twilio.com.
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.