Integration

An Asterisk AMD alternative that listens to the words, not the silence

Replace Asterisk's app_amd with VM Hunter: an EAGI client that streams the first seconds of the call to a speech-based detector and sets AMDSTATUS and AMDCAUSE the way your dialplan already expects.

Asterisk's app_amd decides from timing. It measures the initial silence, the length of the greeting, the silence after it and the number of words, against the thresholds in amd.conf. Those thresholds are a guess about how people and machines sound, and real calls break them in both directions: a person who pauses after "Hello" reads as a machine, and a voicemail greeting that opens with a name reads as a person. Operators who measure it typically find 15 to 20% of live answers misclassified.

VM Hunter decides from what is said. It transcribes the first two seconds, recognises voicemail wording, carrier prompts and call screening, and still runs tone and silence analysis for beeps, SIT tones and dead air. The Asterisk integration is one script and one dialplan line.

app_amd vs VM Hunter

app_amdVM Hunter
InputSilence and word timing from amd.conf thresholdsTranscript of the first two seconds, plus tone and energy analysis
AMDSTATUS valuesHUMAN, MACHINE, NOTSURE, HANGUPHUMAN, MACHINE (plus CALLGUARD and FAILED in AMDSTATUS_RAW)
AMDCAUSE valuesINITIALSILENCE, LONGGREETING, MAXWORDS, TOOLONG, HUMANHUMAN, MACHINE, MACHINE_BEEP, MACHINE_STATIC, DISCONNECT, INITIALSILENCE, MAXWORD, CALLGUARD_PHRASE:<phrase>
Short answers ("Hello?")Depends on silence thresholds; often MACHINEHUMAN when the speaker stops and waits
Greetings that start like a personHUMANMACHINE once the voicemail wording follows
Call screeningNot detectedDetected and labelled
Disconnected numbersNot detectedSIT tones labelled DISCONNECT
Per-call evidenceNoneTranscript, reason and audio in the portal

What the dialplan change looks like

Where you call AMD() today, call the client with EAGI instead and branch on the same variables:

exten => s,n,EAGI(/var/lib/asterisk/agi-bin/vmhunter.agi.py,${CALLERID(num)})
exten => s,n,GotoIf($["${AMDSTATUS}"="HUMAN"]?agent:hangup)
exten => s,n(agent),Queue(sales)
exten => s,n(hangup),Hangup()

Play silence, not ringback or a prompt, while the script runs. The API key comes from an environment variable Asterisk can see. Full steps are in the Asterisk and VICIdial guide; the script is open source on GitHub.

When app_amd is enough

  • Low volume where an agent listening to the occasional voicemail costs less than any service.
  • Lists that are almost all machines, where the cost of a false MACHINE is near zero.
  • Environments that cannot send audio off the box. VM Hunter streams the first seconds of each call to its servers; if that is not allowed, app_amd stays.

For everything else, the way to decide is to measure: run both on the same list for a day and compare the dispositions against the recordings.

FAQ

Questions

Do I have to remove app_amd to use VM Hunter?

No. VM Hunter is called with EAGI from the same dialplan position where you would call AMD(). You can keep app_amd in another context, or run both on different campaigns while you compare.

Which Asterisk versions are supported?

Any Asterisk with EAGI, which has been standard for many years, on Python 3. The client has one dependency, the websocket-client package.

Does it set the same variables as app_amd?

It sets AMDSTATUS and AMDCAUSE, so existing GotoIf branches keep working, plus AMDSTATUS_RAW with the server's untouched verdict. The AMDCAUSE values are richer: they include DISCONNECT for SIT tones and CALLGUARD_PHRASE for call screening.

What does it cost in audio?

The client streams at most 3.5 seconds of 8 kHz audio per call, and stops as soon as the verdict arrives, normally at about 2.3 seconds. Audio is sent only after the call is answered.

Can I run it on-premises?

The client runs on your Asterisk box; the detection runs on VM Hunter's servers. Contact us about private deployments.

Try it on one campaign

The free plan includes 5,000 calls a month, enough to run VM Hunter next to your current AMD for a day and compare the dispositions. No card needed.