The same values can be passed as arguments to AMD() in the dialplan, in this order, which overrides amd.conf for that call:
AMD(initialSilence,greeting,afterGreetingSilence,totalAnalysisTime,minimumWordLength,betweenWordsSilence,maximumNumberOfWords,silenceThreshold,maximumWordLength)
Times are in milliseconds. Defaults below are Asterisk's shipped values; check your own /etc/asterisk/amd.conf, as distributions and VICIdial installs often change them.
| Setting | Default | What it does |
|---|---|---|
initial_silence | 2500 | Silence after answer before the first word. Longer than this: MACHINE (cause INITIALSILENCE). |
greeting | 1500 | Longest a person's greeting can be. Speech longer than this: MACHINE (LONGGREETING). |
after_greeting_silence | 800 | Silence after a short greeting that means a person is waiting for you: HUMAN. |
total_analysis_time | 5000 | Maximum listening time. Reached without a decision: NOTSURE (TOOLONG). |
min_word_length | 100 | Shortest sound counted as a word. |
between_words_silence | 50 | Silence that separates two words. |
maximum_number_of_words | 2 or 3 (version-dependent) | More words than this: MACHINE (MAXWORDS). |
maximum_word_length | 5000 | A single "word" longer than this: MACHINE (MAXWORDLENGTH). |
silence_threshold | 256 | Energy level below which audio counts as silence. |
What to change, and what it costs
Live people dropped as machines
- Raise
initial_silence(people who answer and wait). Cost: more dead air, more voicemail with a pause at the start passed as human. - Raise
maximum_number_of_words(people who say "Hello, this is Sam speaking"). Cost: short greetings pass as human. - Raise
greeting. Cost: the same.
Voicemail sent to agents
- Lower
greetingandmaximum_number_of_words. Cost: talkative people dropped. - Raise
after_greeting_silenceso a short pause inside a greeting doesn't end it. Cost: slower decision for real people.
Too much dead air
- Lower
total_analysis_time. Cost: more NOTSURE.
Every fix moves errors from one side to the other, because all of these rules look at timing only. That's the core limit of AMD(): it can't hear the difference between a live "Hello?" and a recorded one.
A common VICIdial example
Many VICIdial setups call AMD with explicit values, for example:
AMD(2000,2000,1000,5000,120,50,4,256)
That allows 2 s of initial silence, a 2 s greeting, needs 1 s of silence after it, listens at most 5 s, counts sounds over 120 ms as words and allows 4 words. Fine on clean lines; on real traffic, expect both kinds of errors.
Beyond tuning
If you'd rather stop tuning, nomoVM replaces AMD() with an acoustic model and keeps AMD() as an automatic fallback, using the same AMDSTATUS variable.