Answering Machine Detection

Overview

These docs can all technically be explained by Twilio’s version here: https://www.twilio.com/docs/voice/answering-machine-detection

However, even with this info it was kind of confusing what behavior I was observing while doing testing during our IVR shape, so this is a less verbose version.

 

Answering Machine Detection (AMD) is Twilio’s ability to determine who answers the phone on the receiving end when W2H is sending an outbound call. Mostly we are looking to find out if an actual human answered, or if it was an answering machine. W2H currently depends on AMD to tell us the ‘answered by' so we can make our IVR either say voicemail content, or start voice conversations.

Modes and Notable Parameters

There are two different AMD modes - Enable and DetectMessageEnd. W2H has DetectMessageEnd set, which is better for letting Twilio identify the receiving party so it can figure out if it should leave the voicemail content for an answering machine. Enable is apparently better for when we’d want the call to just hang up if it identifies an answering machine.

 

Twilio offers the ability to tweak AMD slightly from the default timeouts/thresholds, the most relevant ones being MachineDetectionTimeout and MachineDetectionSilenceTimeout. These two work pretty closely to each other but are completely different timeouts.

 

Starting with the MachineDetectionSilenceTimeout, this kicks in as soon as the outgoing call gets picked up (either answered by a human or answering machine). Twilio will wait for a default of 5 seconds of silence before just returning ‘unknown' as the answering party to W2H, at which point we just handle that by starting the conversation. This only matters if there is actually complete silence when the call is picked up, if there is noise/chatter in the background or if a human/answering machine starts talking, this silence timeout will stop and actual AMD will kick in.

 

When AMD finally does kick in when it hears something, then the MachineDetectionTimeout becomes relevant. This is the max amount of time Twilio will spend trying to determine if it’s a human or answering machine. The default is 30 seconds, which is good in case someone has a very long answering machine message before the BEEP (the beep is very useful in helping AMD determine it’s non-human). If it still hasn’t made a distinct determination at the end of the 30, it will just return unknown as the answered by, at which point W2H handles that again by just starting the conversation.