0
votes

I would like to use the right Twilio phone number I own to make outgoing calls, once I know the destination phone number I need to choose programmatically the local number which can make the call the cheapest possible.

Is there a way to achieve using Twiml and without storing the Twilio Phone numbers in a DB and do checking from my side.

Thanks in advance.

1

1 Answers

1
votes

Twilio evangelist here.

You can use the REST API to ask Twilio to give you a list of all of the phone numbers you own, select the right phone number from that list, then generate the TwiML dynanmically.

Hope that helps.