Introducing New Answering Machine Detection

March 23, 2017
Written by

Twilio Bug Logo

Voice alerts and notifications work best when they’re tailored to their audience. That’s why we’re excited to announce a brand new, enhanced Answering Machine Detection (AMD) feature for Twilio Programmable Voice. AMD determines if a person, answering machine, or fax picked up your call so you can deliver the right message, the right way.

This new AMD enables you to create the best possible customer experience, while gathering valuable data about how often your calls are picked up by humans or machines. For outbound sales and marketing contact centers, it nearly eliminates the time-wasting experience of an agent picking up a call only to hear an answering machine message.

Powered by a machine learning algorithm trained on thousands of call samples, the new AMD is tuned for speed and accuracy and offers a 94% accuracy rate across a large sample set of calls from the US and Canada. This new system has significant performance improvements over our old Answering Machine Detection system, which is now deprecated.

This system works in two modes:

  1. Recognizes who picked up the call and immediately calls back to your application with the result. This mode is useful if you’re trying to reach only humans with an urgent message.
  2. Detects the end of an answering machine greeting and calls back to your application once the greeting has ended. This allows you to leave a complete message on an answering machine – no more cut off or delayed messages.

Let’s dive into the details of the API.

How Does It Work?

Answering Machine Detection introduces two new optional parameters on the create call API request.

Optional Parameters

MachineDetection

Can be Enable or DetectMessageEnd. Enable returns results as soon as recognition is complete. DetectMessageEnd will wait until after a greeting to return results if an answering machine is detected.

 

MachineDetectionTimeout

The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning an unknown result. Defaults to 30 seconds.

 

A 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=Enable' \
--data-urlencode 'Url=https://handler.twilio.com/twiml/EH8ccdbd7f0b8fe34357da8ce87ebe5a16' \
-u ACXXXXXXXXXXXXXXXX123456789:[AuthToken]

 

How about the response?

Answering Machine Detection overrides the AnsweredBy parameter on the voice request and provides a different set of values depending on the mode specified by MachineDetection.

AnsweredBy

The result of answering machine detection. If Enable was specified, results can be: machine_start, human, fax, unknown. If DetectMessageEnd was specified, results can be: machine_end_beep, machine_end_silence, machine_end_other, human, fax, unknown.

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

Called+14154659083
ToStateCA
CallerCountryUS
Directionoutbound-api
CallerStateAL
ToZip94904
CallSidCA733c5faadcfbff735a5ce352097c928e
To+14154659000
CallerZip36203
ToCountryUS
ApiVersion2010-04-01
CalledZip94904
CalledCitySAN FRANCISCO
CallStatusin-progress
From+12564195234
AccountSidAC25e16e9a716a4a1786a7c83f58e30462
CalledCountryUS
CallerCityANNISTON
Caller+12564195234
FromCountryUS
ToCitySAN FRANCISCO
FromCityANNISTON
CalledStateCA
FromZip36203
AnsweredBymachine_end_beep
FromStateAL

Pricing

Enhanced Answering Machine Detection will be charged at $.0075 per call where enabled and the called party picks up (either a human, fax, or an answering machine). Busy or Failed calls may engage our AMD system but will not be charged.

How To Enable It

Enhanced Answering Machine Detection is in public beta and you can start experimenting with it today. It currently supports calling to the United States and Canada.

Support for the UK is under development and other countries will be added based on demand. If you’d like to use AMD in a country we do not support, please send a ticket to help@twilio.com and we will prioritize accordingly.

Have a look at the documentation here. If you have any questions don’t hesitate to reach out to our Sales team.

We can’t wait to see what you build.