npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vicistack/amd-config

v1.0.0

Published

VICIdial AMD configuration reference and tuning parameters for Asterisk-based contact centers

Downloads

68

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   # same

VICIdial 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,MAXWORDS

If 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,Hangup

AMDMINLEN=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,30 for voicemail drops
  • [ ] G.711 ulaw on carrier trunks (G.729 transcoding degrades AMD accuracy)
  • [ ] $AMD_LOG enabled in VD_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

Built by ViciStack — enterprise VICIdial hosting and optimization.

License

MIT