Twilio’s Answering Machine Detection Now Generally Available

July 17, 2019
Written by

7yPsXLKWp71fgrs277lmyLcIfUh9jAo1IUU3yPzDhBiX0DcXR_ljezceHb1CAb44fh3SpXEL3VJjdRg37Oem0ILbCcXujIhcedk2BF1Uc15TsaACpDgWvvOZv1rREbSzaQyIpB6G

We are excited to announce the general availability of Twilio’s Answering Machine Detection solution—which improves customer call experience by tailoring outbound call flows according to how it is answered.

A critical requirement for a customized call experience is to know who is answering the call. Twilio’s Answering Machine Detection (AMD) solution will inform your application whether a human, machine, or fax answered the call so you can tailor your workflow accordingly.

For businesses that do any type of outbound calling, whether to provide notifications, collect information via IVR, or reach out to prospective customers, understanding whether a person or machine answers can help inform how they should interact on the call. Taking the same action regardless of who picks up the call creates sub-optimal experiences, like a partial notification message left as a voicemail or an agent being connected with an answering machine greeting.  

Our generally available AMD solution has been in public beta since May 2019 and is built on a new underlying AMD engine that has a higher level of predictability than our previous solution launched in 2017. Twilio AMD uses a preset configuration that balances speed versus accuracy of detection across a variety of call greetings, powered by an engine trained on real-world call samples. During the beta period, we received valuable feedback from customers that they wanted fine tuning capabilities. To that end, we’ve added four optional API tuning parameters to adjust the preset configurations of our engine. This allows you to tune the solution to your specifications and determine the performance tradeoffs right for your use case.

Below, we will review Twilio’s AMD configuration details, engine tuning parameters, and associated pricing.

Configuring Twilio’s AMD on your Programmable Voice calls

Outbound API Parameter

Twilio’s AMD is configurable on any Programmable Voice outbound calls initiated via the Rest API.

There is only one required parameter to configure Twilio’s AMD on an outbound call.  

Parameter: MachineDetection 

Values: Enable or DetectMessageEnd

  • Use Enable if you would like to take a specific action (such as connect to an agent, play a message) for a human but hang up on a machine. With this value specified, Twilio will return the AMD detection result as soon as it identifies the called party, whether it’s a human, machine, or a fax.
  • Use DetectMessageEnd if you would like to leave a voicemail on an answering machine. With this value specified, Twilio will return an AMD result immediately when a human is detected but for an answering machine the response is returned only once the end of the greeting is reached.

An example request to create a call with Answering Machine Detection would look like this:


curl 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXX123456789/Calls.json' -X POST \
--data-urlencode 'To=+1562300000' \
--data-urlencode 'From=+18180000000' \
--data-urlencode 'MachineDetection=DetectMessageEnd’ \
--data-urlencode 'Url=https://handler.twilio.com/twiml/EH8ccdbd7f0b8fe34357da8ce87ebe5a16' \
-u ACXXXXXXXXXXXXXXXX123456789:[AuthToken]]

Twilio’s AMD Response

Twilio AMD Results are returned in the ‘AnsweredBy’ parameter of the webhook issued to the ‘URL’ parameter of your outbound call request.

Parameter: AnsweredBy 

  • If Enable was specified, results can be: human, machine_start, fax, unknown.  
  • If DetectMessageEnd was specified, results can be: human, machine_end_beep, machine_end_silence, machine_end_other, fax, unknown.

An example of a Twilio Voice webhook with Answering Machine Detection enabled is below (subset of parameters shown). In this case the call was created with MachineDetection set to DetectMessageEnd and an answering machine picked up.

 

Called

+15623000000

CallStatus

in-progress

Direction

outbound-api

AnsweredBy

machine_end_beep

….

….

After receiving this webhook, your application can leave a voicemail.  

Twilio’s AMD Engine Tuning Options

Twilio’s AMD solution is based on an algorithm that isolates human speech audio and measures periods of speech and silence in the greeting. Using this data, the engine determines the answering party and if a machine is detected, it listens for the end of the greeting. Not all humans and not all voicemail greetings follow similar patterns in answering calls. As a result, the engine may, for example, interpret a very short two second voicemail greeting as a human picking up.  With this in mind, we have provided four optional API tuning parameters that allow customers to tune the performance of the Twilio AMD engine. Any or all of these parameters can optionally be provided in addition to the required MachineDetection parameter that triggers AMD.  

Optional Twilio AMD API Parameters:

MachineDetectionTimeout: Defines the number of seconds that Twilio should attempt to perform answering machine detection before timing out.

MachineDetectionSpeechThreshold: The number of milliseconds used as the measuring stick for the length of the speech activity; durations lower than this value will be interpreted as a human and longer than this value as a machine.

MachineDetectionSpeechEndThreshold: The number of milliseconds of silence after speech activity at which point the speech activity is considered complete.

MachineDetectionSilenceTimeout: The number of milliseconds of initial silence after which an unknown response is returned.

For more details on these parameters and Twilio AMD in general, see Twilio’s AMD feature docs.  

Pricing

Twilio’s Answering Machine Detection will be charged at $0.0075 per call where it is enabled and if the called party successfully answers. Busy or Failed calls will not be charged.

Enhance your outbound calling with Twilio AMD

We know how valuable a high performance AMD solution is for your customer workflows and encourage you to test out our generally available solution today!