Search code examples
twiliotwilio-phptwilio-studio

Twilio Studio call flow with new AMD API


I have a flow configured in Twilio Studio that starts with a Make Outgoing Call widget (it is triggered from REST API). The timeout is set to 18seconds, and if the user does not pick up, I transfer it again to another Make Outgoing Call widget for timeout to 18 seconds.

After the Make Outgoing Call I have a Gather widget that asks the user to type 1 or 3 in order to continue.

My problem occurs when the user rejects the phone call, or the phone is turned off and he gets automatically sent to voicemail, in many occasions the AMD default settings are not configured properly in order to detect that it is a voicemail (I talked to support and apparantely Twilio Studio is running an older version of the AMD API). For example my voicemail offered by my provider is a spoken message and thus sounds like a real person, and AMD detects this as a human answering based on the initial couple of seconds.

Is it possible to in some way make use of the newer AMD API so if I hear a "beep" at the end of a message, I know it is a voicemail and it should not transition in the "answered" event to the Gather widget.

I've been looking at the Run Function widget in order to call the user via a Function, but i'm not sure whether I am able to return the person being called to my flow after this? Is there a possible solution to this issue? The flow is already quite big and complex and I don't have the time & budget to transform this into TwiML.

Thanks in advance!


Solution

  • Twilio has plans to support the new AMD in Studio, but there is no ETA. You will not be able to initiate the call outside of Studio and redirect to your Studio flow because Studio will not accept an in-progress call (you will get a HTTP status code 400).

    You could adapt your Gather Widget so if there is no response with a 1 or 3 digit within a specific timeout, assume the call was answered by automation and loop the contents of a Say/Play widget, so you have the highest chance the full message is capture on the answering machine.