0
votes

We are working on a requirement where we are initiating a call from Twilio client SDK [Javascript]. We have an ASP.Net MVC Core application handling incoming Webhook request from Twilio Twiml app. To initiate a call from a client side, we are using Twiml dial verb and providing from and to number. Further our requirement is to send a voice message as soon as an answering machine is detected.

As we have used Dial verb of Twiml, we can't pass detect answering machine and hence can't send voice message. This is by design of Dial verb as it is an attended calling mechanism. After going through a documentation, I have found that, REST API allows to detect and answering machine and also allows sending a voice message. Twilio REST API shall be used for an unattended call initiation and rule based workflow. Twiml Dial verb uses VoiceResponse class to initiate a call whereas Twilio REST API uses CallResource to initiate a call. I wanted to confirm my understanding before I start working on possible alternatives.

We are thinking of implementing above use case with below steps

Make a Twilio REST API call to initiate an unattnded phone call with answering machine detection option enabled. If API responds with answered_by value as human or unknown then we will invoke a webhook that shall patch the call using Twiml Dial verb. If API responds with answered_by value as machine then it shall use a Twiml which contains a voice message that can be sent to callee.

2

2 Answers

0
votes

The above is correct. Is there a specific question, however?

Twilio’s Answering Machine Detection Now Generally Available

https://www.twilio.com/blog/answering-machine-detection-generally-available

0
votes

We have developed an outbound call mechanism using TwiML app and Dial verb using Javascript SDK & ASP.Net Core MVC with Twilio SDK. We came across an issue where we found that answering machine detection and voice message drop is not supported by Dial verb. We are taking a different approach where we will use Twilio REST API to initiate a call. It has a provision to detect an answering machine and respond to an outcome of answering machine detection such as patching an agent or sending a voice message. Further, There are 2 possible configurations and workflows.

  1. MachineDetection:Enable Possible values for answered_by are machine_start, human, fax or unknown. 1.1 If value is machine_start then we can't send a voice message as it is not waiting for "beep" after which a voice message can be send. 1.2 If value is human then we can invoke a webhook for patching a user into current call. 1.3 If value is fax then we shall not take any action [Out of scope] 1.4 If value is unknown then we may patch a user to take action. This can be a deciding factor for making user productive. More number of requests ending in Unknown shall degrade the desired outcome.

  2. MachineDetection:DetectMessageEnd Possible values for answered_by are machine_end_beep, machine_end_silence, machine_end_other, human, fax or unknown. 2.1 If value is machine_end_beep then we can use a TwiML url to send a voice message to a callee. 2.2 If value is machine_end_silence then we can use TwiML url to send a voice message to a callee. Such scenarios needs to be handled with this default action and improved over period of time. 2.3 If value is machine_end_other then we can use TwiML url to send a voice message to a callee. Such scenarios needs to be handled with this default action and improved over period of time. 2.4 If value is human then we can invoke a webhook for patching a user into current call. 2.5 If value is fax then we shall not take any action [Out of scope] 2.6 If value is unknown then we may patch a user to take action. This can be a deciding factor for making user productive. More number of requests ending in Unknown shall degrade the desired outcome.

Rerference: https://www.twilio.com/docs/voice/answering-machine-detection https://www.twilio.com/docs/voice/answering-machine-detection#webhook-parameters

Based on above workflows we are deciding to use MachineDetection:DetectMessageEnd configuration option. We do have a query regarding point number 2.4. Below is a scenario, We have made an API request to initiate a call with MachineDetection:DetectMessageEnd configuration. A callee has picked a phone and introduced himself/herself. Twilio has detected a human and set answered_by to human. This has triggered a webhood which as patched a user to current call. It is very much possible that a user who has joined the conference is not aware of who is at other end and can end up asking who is this? This may anoy a callee and affecting overall customer engagement.

This is the scenario shared by our client based on his experience. I would like to know how fast Twilio can detect "answerd_by"? Is there a mechanism that can allow a recording of a callee to be played after patching a call so that a user is aware of who is at another end. Is it something Twilio can provide or we need to use the recording feature to do so? I understand that Twilio has various options to tweak AMD parameters through a Web API however, we may not have enough data to tweak them before the start of the project. We might get there after rolling this feature in production.

Also our client mentioned that sometimes, a voice message is not delivered completely? Is this something observed by Twilio customers too? If so what are the best practices to ensure this shouldn't happen?