Thursday, October 27, 2022

[SOLVED] Twilio phone service retry outbound calling just once

Issue

Using the Twilio phone service, we make outbound calls:

curl -X POST 'https://api.twilio.com/2010-04-01/Accounts/ACc1....4658a/Calls.json' \
-d 'From=%2B44987654321' \
-d 'To=%2B123456789' \
-d 'Url=http%3A%2F%2Fourdomain.com%2Ftwiml.php%3Faction%3Dcall_is_taken' \
-u ACc1....4658a:{AuthToken}

Not that it matters, but when someone picks up the phone, our response twiml code (which will change) is just:

<Response><Say>Thank you for picking up.</Say></Response>

The problem is when someone is in a meeting: The phone rings, the user declines the call quickly. Stupidly, Twilio retries immediately, and if the user declines again, twilio will try up to 7 (!) times immediately.

Realistically, the user will run out of the meeting, pick up the call and hear that it is not a life-important message. Imagine the fury.

How do I tell Twilio to only try to call ONCE?


Solution

This problem happens when using Dial verb as well and it is very annoying that Twilio documentation doesn't mention this continuous retrying. There has to be a way to prevent retries as like you say it is a show stopper for a lot of situations.

Here is a link to pretty much same issue on Twilio forums: http://forum.twilio.com/twilio/topics/outbound_calls_keep_incessantly_retrying



Answered By - Nik
Answer Checked By - Senaida (WPSolving Volunteer)