; ============================================================================= ; VICIdial AMD (Answering Machine Detection) — Optimized Configuration ; ============================================================================= ; Generated by ViciStack — https://vicistack.com — Free VICIdial optimization ; ; WHAT THIS FILE DOES: ; Configures Asterisk's built-in AMD application for three campaign types: ; B2B (corporate PBXs), B2C (residential/cell mix), and cell-heavy campaigns. ; Stock AMD settings throw away 15-30% of live answers as false positives. ; These settings cut that to under 5%. ; ; HOW TO USE: ; 1. Copy this file to /etc/asterisk/amd.conf (back up the original first) ; 2. Pick the profile that matches your campaign type ; 3. Reload Asterisk: asterisk -rx "module reload app_amd.so" ; 4. Set your campaign's AMD type in the VICIdial admin GUI ; ; FULL GUIDE: ; https://vicistack.com/blog/vicidial-amd-guide/ ; https://vicistack.com/blog/vicidial-amd-false-positive-reduction/ ; https://vicistack.com/blog/vicidial-amd-vs-ai-amd/ ; ; NEED HELP TUNING? hello@vicistack.com — we'll audit your AMD for free. ; ============================================================================= ; ----------------------------------------------------------------------------- ; [general] — Default AMD settings ; ----------------------------------------------------------------------------- ; These apply when no campaign-specific profile overrides them. ; The defaults below are tuned for a mixed B2C campaign (residential + cell). ; If you only run one campaign type, just edit [general] and skip the profiles. ; ----------------------------------------------------------------------------- [general] ; --- Initial silence --- ; How long (ms) to wait for the callee to start talking after answer. ; Stock value: 2500. Problem: voicemail greetings often start with 1-2s of ; silence, so a long initial_silence makes AMD wait too long before deciding. ; 2000ms catches most real humans who say "hello?" within 1-2 seconds. initial_silence = 2000 ; --- Greeting length --- ; If the first utterance is longer than this (ms), AMD flags it as a machine. ; Humans say "hello" in 500-1500ms. Voicemail greetings run 3000-8000ms. ; Stock value: 1500. That's too aggressive — some people say "Hello, this is ; John speaking" which can hit 1800ms. We use 1700 to avoid clipping them. greeting = 1700 ; --- After-greeting silence --- ; Silence after the first utterance. Machines pause briefly then keep going. ; Humans pause and wait for you to talk. If silence exceeds this, it's human. ; Stock: 800. We drop to 700 because humans pause faster than you'd think — ; waiting 800ms loses the natural flow and the caller hangs up. after_greeting_silence = 700 ; --- Total analysis time --- ; Maximum time (ms) AMD will analyze before giving up and saying "NOTSURE". ; Stock: 5000. Too short — some voicemail greetings run 6-8 seconds. ; 5500ms catches 95% of greetings without making live callers wait too long. total_analysis_time = 5500 ; --- Minimum word length --- ; Minimum duration (ms) of a "word" (sound burst). Anything shorter is noise. ; Stock: 100. Works fine. Don't touch this unless you have line noise issues. min_word_length = 100 ; --- Between-words silence --- ; Silence (ms) between words that indicates end of an utterance. ; Stock: 50. This is fine for English. For Spanish campaigns, bump to 75 ; because Spanish speakers tend to have shorter inter-word gaps. between_words_silence = 50 ; --- Maximum number of words --- ; If the callee says more than this many words, flag as machine. ; Stock: 3. Problem: some humans answer "Yeah hello who is this?" = 5 words. ; 5 words gives humans room while still catching long greetings. maximum_number_of_words = 5 ; --- Silence threshold --- ; Audio energy below this level counts as silence (0-32767). ; Stock: 256. This works for clean SIP trunks. If you're on a noisy carrier ; or have echo issues, bump to 384. If your trunk is pristine, drop to 200. silence_threshold = 256 ; --- Maximum word length --- ; If a single utterance exceeds this (ms), it's a machine. Humans don't talk ; for 5 seconds straight without pausing. maximum_word_length = 5000 ; ============================================================================= ; CAMPAIGN-SPECIFIC PROFILES ; ============================================================================= ; Set these in your VICIdial campaign settings under "AMD Type" using the ; custom AMD application field. Or use them in your dial plan directly: ; AMD(initial_silence,greeting,after_greeting_silence,total_analysis, ; min_word_length,between_words_silence,max_number_of_words, ; silence_threshold,max_word_length) ; ============================================================================= ; ----------------------------------------------------------------------------- ; B2B Profile — Corporate PBX environments ; ----------------------------------------------------------------------------- ; Problem: Corporate phone systems often have auto-attendants, hold music, ; and IVR menus that AMD misidentifies as voicemail. Also, receptionists ; tend to give longer greetings: "Good morning, Acme Corporation, this is ; Susan in sales, how may I direct your call?" ; ; Strategy: Longer greeting tolerance, longer total analysis time. ; Trade-off: Slightly longer agent wait on machine-answered calls. ; ----------------------------------------------------------------------------- [b2b] initial_silence = 2500 ; B2B phones ring longer (PBX routing takes time). Give more initial room. greeting = 2200 ; Receptionists say the company name + their name + department. ; "Thank you for calling Acme Industries, this is Jennifer" = ~2100ms. after_greeting_silence = 800 ; Corporate PBXs sometimes inject a brief tone after the greeting. ; 800ms avoids false-triggering on that tone. total_analysis_time = 6000 ; Corporate voicemail greetings are long. "You've reached the office of ; John Smith, VP of Sales at Acme Corp. I'm either on the phone or away ; from my desk..." can run 7s. 6000ms catches most of them. min_word_length = 100 between_words_silence = 50 maximum_number_of_words = 6 ; "Good morning Acme Corporation this is Jennifer" = 6 words. Allow it. silence_threshold = 256 maximum_word_length = 5000 ; ----------------------------------------------------------------------------- ; B2C Profile — Residential and mixed cell campaigns ; ----------------------------------------------------------------------------- ; Most common scenario. Residential landlines and cell phones. ; Voicemail greetings are short ("Hey, leave a message"). ; Humans answer fast ("Hello?" or "Yeah?"). ; ; Strategy: Tight timings, aggressive detection. Prioritize speed. ; Trade-off: Might clip the occasional long-winded human greeting. ; ----------------------------------------------------------------------------- [b2c] initial_silence = 1800 ; Cell phones connect fast. If nobody talks within 1.8s, it's going to VM. greeting = 1500 ; Residential VM greetings are shorter. "Hi, you've reached the Smiths" = ~1400ms. ; Humans rarely exceed 1200ms on their answer. after_greeting_silence = 600 ; Humans on cells answer and wait very briefly. 600ms is the sweet spot ; where you don't lose the conversational beat. total_analysis_time = 5000 ; Residential VMs are short. 5 seconds is plenty. min_word_length = 100 between_words_silence = 50 maximum_number_of_words = 4 ; "Hello who is this" = 4 words. Enough for humans, catches VM scripts. silence_threshold = 256 maximum_word_length = 5000 ; ----------------------------------------------------------------------------- ; Cell-Heavy Profile — 80%+ cell phone lists ; ----------------------------------------------------------------------------- ; Cell phones have unique AMD challenges: ; 1. Carrier voicemail kicks in faster (shorter ring time) ; 2. Cell VM greetings are often just "Hey it's Mike, leave one" ; 3. Google/Samsung visual voicemail sends NO audio greeting at all ; 4. VoLTE connections have less background noise ; ; Strategy: Very tight initial_silence, short greeting window. ; This profile is the most aggressive — it will occasionally clip humans ; who take a long time to say hello, but on cell-heavy lists the math ; works out: you save more calls from VM false-positives than you lose. ; ; IMPORTANT: If you see agent complaints about "dead air" calls, your ; after_greeting_silence is too low. Bump it to 650 and test for a day. ; ----------------------------------------------------------------------------- [cell] initial_silence = 1500 ; Cell phones either answer fast or go to VM. 1.5s is the decision point. greeting = 1300 ; Cell VM greetings are extremely short. Most are under 1200ms. ; "Hey leave a message" = ~900ms. after_greeting_silence = 550 ; Cell users answer and expect immediate conversation. Waiting longer ; than 550ms and they say "hello?" again (which AMD counts as a second ; word and might flag as machine). total_analysis_time = 4500 ; Shorter window. Cell VMs resolve fast. min_word_length = 100 between_words_silence = 50 maximum_number_of_words = 4 silence_threshold = 200 ; VoLTE trunks are cleaner. Lower threshold avoids counting faint ; background noise as speech. maximum_word_length = 4500 ; ============================================================================= ; TESTING YOUR AMD SETTINGS ; ============================================================================= ; 1. Set campaign to AMD with "AMD Log" enabled in Campaign Settings ; 2. Run 200-300 test calls across your actual list ; 3. Check /var/log/asterisk/amd.log for the breakdown: ; grep -c "HUMAN" /var/log/asterisk/amd.log ; grep -c "MACHINE" /var/log/asterisk/amd.log ; grep -c "NOTSURE" /var/log/asterisk/amd.log ; 4. Target: <5% false positive rate (humans flagged as machines) ; 5. Listen to recordings of MACHINE-flagged calls to verify accuracy ; ; TUNING CHECKLIST: ; - Too many false positives (humans dropped)? → Increase greeting + max_words ; - Too many false negatives (VMs sent to agents)? → Decrease greeting ; - Too many NOTSURE? → Increase total_analysis_time ; - Agents complaining about silence? → Decrease after_greeting_silence ; ; CARRIER MATTERS: ; Different SIP trunks have different audio characteristics. A config ; that works on Telnyx might need tweaking on VoIP.ms. Always test ; after switching carriers. ; ; For professional AMD tuning (we analyze your actual call recordings): ; https://vicistack.com — hello@vicistack.com ; =============================================================================