1
votes

How to forward the call to an US local Twilio number from any mobile to any US number?

Its seems to me that I will have to use TwiML to achieve that. Moreover, the supporting doc in https://support.twilio.com/hc/en-us/articles/223179908-Setting-up-call-forwarding#devs is not seeming to show the TwiML correctly. And also with that way I will have to use verb.

Can I not directly call from the number pad of my mobile to the Twilio number so that the call can be received from the forwarding number?

Can I not set a forwarding number to the purchased number programmatically?

2
No simpler than @Devin's answer below. - php-dev

2 Answers

2
votes

Twilio evangelist here.

To forward a call made from your mobile device to a Twilio number to another US phone number you can use the <Dial> verb:

<Response>
    <Dial callerId="[your_twilio_phone_number]">[target_phone_number]</Dial>
</Response>

This part of the Voice Quickstart for PHP shows this and might be useful for you:

https://www.twilio.com/docs/quickstart/php/twiml/connect-call-to-second-person

Hope that helps.

0
votes

This was what I went with before getting the answer from Twilio support but after the answer from @Devin Rader and from my client.

here is a great tutorial doing call forwarding programmatically, https://www.twilio.com/docs/tutorials/walkthrough/call-tracking/php/laravel. Yes, you can definitely set the TwiML programmatically on the numbers, take a look at the documentation on provisioning phone numbers, https://www.twilio.com/docs/api/rest/incoming-phone-numbers. You can also set the number so that Twilio makes a call to your application and your application delivers TwiML dynamically.