Matt Mcdon
Matt Mcdon

Reputation: 305

Twilio - handling calls blocked by geo permissions

I would like to handle calls blocked by geo permissions settings in Twilio.

My application is using Twilio to connect two people on the phone. We are achieving this by calling one participant with a callback set to return TwiML. The TwiML contains a Dial verb with the second participant's phone number. Sometimes the 2nd phone number is from a country that I don't want to allow calls, so geo permission settings are blocking those.

In this case, I am wasting the 1st participant time. I am looking for a way to check if the phone number is correct (allowed by the geo permission settings I have configured), or for a way to handle a blocked call gracefully (in event callback? is there a flag on a blocked call indicating what happened?)

Upvotes: 0

Views: 222

Answers (1)

Alan
Alan

Reputation: 10791

You can use the action URL of the <Dial> verb to capture the failure using DialCallStatus and act accordingly.

You can set the Debugger Webhook URL, to a resource which will capture there geographic permission errors (and other errors) and POST to your endpoint.

Upvotes: 1

Related Questions