@vicistack/amd-config
v1.0.0
Published
VICIdial AMD configuration reference and tuning parameters for Asterisk-based contact centers
Downloads
68
Maintainers
Readme
VICIdial AMD Configuration Guide
Practical AMD (Answering Machine Detection) configuration examples and tuning reference for VICIdial/Asterisk deployments. Based on production data from 100+ contact centers processing 600K+ monthly dials.
If your AMD works great on Tuesday and like garbage on Thursday, you're not alone. This repo documents what actually happens when AMD runs, why it breaks, and how to fix it.
How AMD Works
The AMD application in Asterisk (app_amd.c) is a two-state finite state machine processing 20ms audio frames at 8kHz. No ML, no neural nets. It's a silence detector with a word counter bolted on.
State machine: starts in SILENCE. Audio energy above silenceThreshold (default 256) transitions to WORD. Audio drops below threshold, back to SILENCE. It counts transitions and measures durations, then makes a terminal decision.
Five terminal states:
| State | Trigger | Result |
|---|---|---|
| INITIALSILENCE | No speech within initialSilence ms | MACHINE |
| MAXWORDS | Word count > maximumNumberOfWords | MACHINE |
| LONGGREETING | Voice duration > greeting ms | MACHINE |
| MAXWORDLENGTH | Single voice segment too long | MACHINE |
| HUMAN | Short utterance + silence (waiting for response) | HUMAN |
If nothing triggers within totalAnalysisTime (5000ms), result is NOTSURE with cause TOOLONG.
Default Parameters
# Asterisk defaults vs VICIdial production values
initialSilence = 2500 # VICIdial uses 2000
greeting = 1500 # VICIdial uses 2000
afterGreetingSilence = 800 # VICIdial uses 1000
totalAnalysisTime = 5000 # same
minimumWordLength = 100 # VICIdial uses 120
betweenWordsSilence = 50 # same
maximumNumberOfWords = 2 # VICIdial uses 4
silenceThreshold = 256 # sameVICIdial bumps greeting to 2000ms (catches longer voicemail greetings) and maximumNumberOfWords to 4 (reduces false positives on humans who say "Hello, this is Jason").
Dialplan Configuration
When VICIdial dials with AMD enabled, calls route to extension 8369. Here's the Asterisk 13+ dialplan:
exten => 8369,1,AGI(agi://127.0.0.1:4577/call_log)
exten => 8369,n,Playback(sip-silence)
exten => 8369,n,AMD(2000,2000,1000,5000,120,50,4,256)
exten => 8369,n,AGI(VD_amd.agi,${EXTEN})
exten => 8369,n,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB-----${CONNECTEDLINE(name)})
exten => 8369,n,Hangup()Priority order matters on Asterisk 13+. If you upgraded from Asterisk 11 and didn't swap call_log before sip-silence, your call logging is silently broken. Most common mistake during upgrades.
The Playback(sip-silence) line primes the audio channel. Without it, 40%+ of calls return NOAUDIODATA. If you're seeing high NOAUDIODATA rates, try running this line twice.
AMD Agent Route Options
Default behavior routes both HUMAN and NOTSURE to agents. NOTSURE/TOOLONG means the customer already sat through 5+ seconds of dead air. NOTSURE/NOAUDIODATA means the agent gets a silent channel.
SVN 3200+ added AMD Agent Route Options via Settings Container:
# Conservative (only definitive humans reach agents):
HUMAN,HUMAN
# Moderate (humans + ambiguous, block dead channels):
HUMAN,HUMAN
NOTSURE,TOOLONG
# Recommended minimum — block NOAUDIODATA at bare minimum:
HUMAN,HUMAN
NOTSURE,TOOLONG
NOTSURE,INITIALSILENCE
NOTSURE,MAXWORDSIf you haven't configured this, you're routing dead channels to agents.
AMDMINLEN: Protecting Your DIDs (SVN 3873)
When AMD hangs up on a voicemail after 2-4 seconds, carriers track this as Short Duration Percent (SDP). Too many short calls = degraded routing, higher rates, or termination.
Add this before the Dial line in your carrier dialplan entry:
exten => _8567.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _8567.,n,Set(__AMDMINLEN=7)
exten => _8567.,n,Dial(SIP/carrier/${EXTEN:4},,tToR)
exten => _8567.,n,HangupAMDMINLEN=7 keeps the call alive for 7 seconds minimum even after AMD decides it's a machine. No agent time wasted — the call just stays connected silently. Non-negotiable in 2026.
Asterisk Version Compatibility
| Version | AMD Status | Notes | |---|---|---| | Asterisk 11 | 70-80% accuracy | EOL, security issues, random crashes under load | | Asterisk 13.0-13.17 | Broken | AMD returns TOOLONG on majority of calls | | Asterisk 13.20+ | Works, worse than 11 | ~10 answering machines reach agents per 100 calls vs 1-2 on Ast 11 | | Asterisk 18 | Current target | Same app_amd.c, better SIP handling, AudioSocket for external AMD |
If you're running Asterisk 13.0-13.17 (includes GOautodial 4 default), your AMD is non-functional. Minimum viable: 13.38.3-vici.
Configuration Checklist
- [ ] Asterisk 13.38.3-vici minimum (ideally 18.26.0)
- [ ] Dialplan order:
call_log->sip-silence->AMD()->VD_amd.agi->agi-VDAD_ALL_outbound.agi - [ ]
Set(__AMDMINLEN=7)before Dial in carrier entry - [ ] AMD Agent Route Options blocking NOTSURE-NOAUDIODATA minimum
- [ ] WaitForSilence
2000,2,30for voicemail drops - [ ] G.711 ulaw on carrier trunks (G.729 transcoding degrades AMD accuracy)
- [ ]
$AMD_LOGenabled inVD_amd.agi - [ ] CPU utilization below 70-80% on telephony servers
- [ ] Target: <5% NOTSURE-TOOLONG, <2% NOTSURE-NOAUDIODATA
When to Use AMD vs Alternatives
Use AMD when: Voicemail rate >40%, 20+ agents, can tolerate 20-30% false positives, AMDMINLEN configured, AMD Agent Route Options set.
Skip AMD when: Cell-heavy lists (iOS 26 call screening), <10 agents, carrier generating high FAS, regulated vertical with 3% abandonment enforcement.
Dial timeout alternative: Set campaign dial timeout to 22-24 seconds. Most voicemail picks up at 24-25s. Avoids AMD entirely.
Press-1 alternative: Survey campaigns (ext 8366/8373) play audio first. Humans press 1, voicemails don't. Regulatory complexity but elegant.
The Economics
50 agents at $14/hr, 50% voicemail rate = $3,889/day wasted on voicemail time.
AMD at 80% accuracy saves ~$3,111/day but adds 2-3s dead air to every human call. At ~3% hangup rate from dead air, you lose ~$450/day in revenue.
Net daily benefit: ~$2,661 ($66,500/month). But you're also hanging up on 90-135 actual humans per day.
AI AMD at 95%+ accuracy changes the math significantly. Sub-second classification, dramatically lower false positives.
iOS 26: The AMD Extinction Event
iOS 26 system-level call screening answers calls from unknown numbers automatically and plays "Please state your name and reason for calling." To AMD's silence detector, this looks like a voicemail greeting.
CNAM, STIR/SHAKEN attestation, and call branding do not bypass screening. With 59% US iPhone market share and 70%+ iOS adoption within 6 months, stock AMD cannot handle this.
Full Guide
For the complete technical deep-dive including forum consensus, carrier-specific tuning, and iOS 26 mitigation strategies:
VICIdial AMD Configuration: The Complete Guide
More Resources
- VICIdial Predictive Dialer Settings
- VICIdial DID Management
- VICIdial Cluster Configuration
- STIR/SHAKEN for VICIdial
Built by ViciStack — enterprise VICIdial hosting and optimization.
License
MIT
