Twilio’s Answering Machine Detection Now Generally Available
Time to read: 3 minutes
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.
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.
Enableif 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.
DetectMessageEndif 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' \
Twilio AMD Results are returned in the ‘AnsweredBy’ parameter of the webhook issued to the ‘URL’ parameter of your outbound call request.
Enablewas specified, results can be:
- If DetectMessageEnd was specified, results can be:
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.
After receiving this webhook, your application can leave a voicemail.
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.
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.
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!
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.