Skip to content
← Blog

Asterisk AMD() vs streaming voicemail detection

What Asterisk's AMD() application does, how it is tuned and where it struggles, and how to test it against a streaming detector on your own recordings.

Voicemail Detector4 min read

If you run Asterisk, answering machine detection is already installed: the AMD() dialplan application. It is free, it runs on your own switch and it is well documented. This post explains what it does, where it tends to struggle, and how to compare it fairly with a streaming detector on your own calls.

Options and defaults change between Asterisk versions; check the documentation for yours. Last checked 2026-11-28.

What AMD() does

AMD() listens to the start of an answered call and decides from the shape of the audio: how long the first silence lasts, how long the greeting is, how many words it contains and how long they are (Asterisk documentation).

It sets AMDSTATUS to one of:

  • MACHINE
  • HUMAN
  • NOTSURE
  • HANGUP

AMDCAUSE records which rule decided. The main parameters, with defaults read from amd.conf, are:

Parameter What it limits
initialSilence Longest silence allowed before the greeting starts. Exceeding it means machine.
greeting Longest greeting allowed. Exceeding it means machine.
afterGreetingSilence Silence after the greeting. Reaching it means human.
totalAnalysisTime Longest time the analysis may run.
minimumWordLength, betweenWordsSilence What counts as a word, and as a pause between words.
maximumNumberOfWords, maximumWordLength Too many words, or one word too long, means machine.
silenceThreshold The level below which audio counts as silence.

The idea is simple and often works: a person says a short "hello?" and waits, while a recording talks longer without pausing for an answer.

Where rule-based detection struggles

The same rules that make AMD() predictable make some answers hard for it:

  • Short recorded greetings. A carrier mailbox that only says "leave a message" is as short as a person's hello.
  • Long or chatty people. Someone who answers "Hello, this is Maria from accounts, who's calling?" talks like a greeting.
  • Recorded welcomes with pauses. IVRs and announcements that pause between sentences can look like a person waiting.
  • Phone assistants and call screeners. They speak, pause for the caller and speak again, much like a person.
  • Line conditions. Background noise, comfort noise and level differences between carriers move the silence threshold.

Tuning helps, but every change trades one error for another. Raising the greeting limit stops cutting people who talk longer, and lets longer recordings through as human. Users on the Asterisk forums regularly discuss exactly this trade-off (community thread).

What to measure

Compare any two detectors on the same four numbers:

  1. People treated as machines. The expensive error: a real conversation hung up on.
  2. Machines treated as people. Agent or voice AI time spent on a greeting.
  3. Time to verdict. Seconds from the answer until the decision, at the median and the 95th percentile.
  4. Unknowns. How often it gives up, and what your dialer does then.

A single accuracy percentage hides the difference between the first two, which cost very different amounts.

A fair test on your own recordings

You do not need live traffic to compare. Use recordings of answered calls where you know the outcome.

  1. Build the set. Pick a few hundred recent answered calls, as 8 kHz mono WAV or raw µ-law, and label each one: person, voicemail, carrier announcement, IVR, call screener. Keep the mix close to your real traffic.
  2. Run Asterisk. Play each file into a test extension that runs AMD() and log AMDSTATUS, AMDCAUSE and the time of the decision.
  3. Run the streaming detector on the same files. With Voicemail Detector, send each file to the REST endpoint and keep the verdict and the time it was reached:
curl -s https://api.voicemaildetector.com/v1/detect \
  -H "Authorization: Bearer $VD_API_KEY" \
  --data-binary @call-0001.wav

The response says human, machine or unknown, with at_ms, the point in the call where the verdict was reached (API docs). Live streams over WebSocket or gRPC give the same verdict as the audio arrives.

  1. Score both. Count the four numbers above, per category, and look at the calls where they disagree. Those are where your money is.

Our free tier covers 500 calls a month, enough to try it on a test set of your own recordings (pricing). Coverage is strongest today on Spanish-speaking Latin America (Peru, Colombia, Panama, the Dominican Republic and the Caribbean); English works, with less coverage of English-speaking carriers so far.

Which to keep

  • Keep AMD() when your calls are mostly to people and mailboxes it already handles, you have someone to tune it, and a few seconds of extra listening are acceptable.
  • Add a streaming detector when its errors cost you more than a per-call fee: agents talking to greetings, voice AI minutes spent on recordings, or people hung up on in the countries you dial.
  • Run both for a while. Stream calls to the detector, keep acting on AMD(), and compare results call by call before you switch.

Sources