Why mod_avmd gets mistaken for AMD
Search for answering machine detection on FreeSWITCH and mod_avmd comes up quickly. The name sounds right: "advanced voicemail detection". It ships with FreeSWITCH. It is free. So teams load it, point their outbound calls at it and expect it to separate people from voicemail.
Then they find that live people still reach the voicemail path, voicemail greetings still reach agents, and decisions arrive far too late. The module is doing exactly what it was built to do. It was just built for a different job.
To use it well, you need to separate two questions that happen at different moments in a call:
- Who answered? A person or a recording. This has to be decided in the first couple of seconds, while the person is waiting.
- When does the recording start? That is, when has the greeting finished and the voicemail system begun recording. This happens at the beep, many seconds later.
AI AMD answers the first question. mod_avmd answers the second.
What mod_avmd does
mod_avmd listens to a call's audio for a beep: a short, steady tone of the kind voicemail systems play to say "start talking now". When it hears one, it tells FreeSWITCH. Depending on your version, that shows up as an event on the event socket and as a channel variable your script can check.
That makes it useful for a narrow but real task. If you already know a call reached voicemail and you want to leave a message, playing it immediately is a mistake: your message plays over the greeting and the recording catches only the last few words, or nothing. Waiting for the beep fixes that.
- It is part of FreeSWITCH, so there is nothing extra to license or install beyond loading it.
- It runs locally on your server, on the call's audio.
- It is good at its specific job: noticing a tone after a greeting.
What mod_avmd does not do
It does not tell you who answered
A live person does not beep. A voicemail greeting does not beep either, until it ends. So in the first seconds of a call, when your dialer must decide whether to connect an agent, mod_avmd has nothing to report. It cannot hear the difference between "Hello?" and "Hi, you've reached Sam, leave a message".
It decides too late for routing
Even when a greeting does end in a beep, that beep arrives after the whole greeting has played. If your dialer waited for it before deciding, every live person would sit in silence for the length of a typical greeting. That is dead air, and it puts you on the wrong side of abandoned call rules that expect a live person to be connected within 2 seconds of their greeting. Our post on the abandoned call rate explains how that clock works.
Not every machine beeps cleanly
Voicemail systems differ. Some play a clear tone, some play something softer, and some carrier messages and call screening assistants never beep at all. A beep detector has nothing to find on those calls. Treat "no beep" as "unknown", never as "human".
mod_avmd and AI AMD side by side
| mod_avmd | nomoVM AI AMD | |
|---|---|---|
| Question it answers | Has the voicemail beep played? | Did a person or a machine answer? |
| When it answers | After the greeting ends | About 2 seconds after answer (up to 3.2 s for unclear calls) |
| Result | Beep detected, or nothing | AMDSTATUS HUMAN, MACHINE or FALLBACK, plus AMDCAUSE |
| Hears call screening | No | Yes, reported as SCREENING |
| Hears busy, SIT, fax, ringback | Only as tones, without meaning | Yes, as BUSY or TONE |
| Where it runs | On your FreeSWITCH | Hosted; audio streamed via mod_audio_stream |
| Best use | Timing a voicemail drop | Deciding whether to connect an agent |
They are not competitors. They sit at different points on the same call.
Using mod_avmd and AI AMD together
The combined flow looks like this:
Answer: AI AMD decides
The dialer originates the call into an extension that runs
nomovm_amd.lua. About 2 seconds after answer,AMDSTATUSis set. Our FreeSWITCH answering machine detection guide covers this setup step by step.HUMAN: connect an agent
The call transfers to your agent queue straight away.
mod_avmdis never started, so it adds no delay for people.MACHINE: wait for the beep
The call transfers to a voicemail drop extension that starts
mod_avmdand waits, up to a limit you choose, for the beep.Beep heard: play the message
Your recorded message plays from the start of the voicemail recording, then the call hangs up.
The dialplan
Point the amd_MACHINE extension at a drop script instead of hanging up:
<extension name="amd_machine">
<condition field="destination_number" expression="^amd_MACHINE$">
<action application="lua" data="vm_drop.lua"/>
</condition>
</extension>
Make sure mod_avmd is loaded first: fs_cli -x "load mod_avmd", and add it to modules.conf.xml so it loads at every start.
A simple drop script
This sketch starts beep detection, polls for a result with a time limit, then plays a message. Application and variable names have changed between mod_avmd versions, so check them against the version you run before using it.
-- vm_drop.lua: wait for the voicemail beep, then play a message
local max_wait_ms = 20000 -- example limit; tune for your traffic
local step_ms = 200
local waited = 0
local heard = false
session:execute("avmd_start")
while session:ready() and waited < max_wait_ms do
if session:getVariable("avmd_detect") == "TRUE" then
heard = true
break
end
session:sleep(step_ms)
waited = waited + step_ms
end
session:execute("avmd_stop")
if session:ready() then
freeswitch.consoleLog("INFO", "vm_drop: beep heard = " .. tostring(heard) .. "\n")
session:execute("playback", "/usr/share/freeswitch/sounds/custom/vm_message.wav")
end
session:hangup()
Two choices to make for your campaign:
- The maximum wait. Long enough for normal greetings, short enough that you are not paying for minutes on calls that will never beep. Look at a sample of your own voicemail calls in the nomoVM dashboard to see how long greetings run.
- What to do with no beep. Play the message anyway (some of it may be recorded) or hang up. Test both.
Use AMDCAUSE before you start
Not every MACHINE verdict is a voicemail greeting. AMDCAUSE tells you which kind it was. There is no point waiting for a beep on BUSY, TONE (fax, SIT, ringback) or SILENCE. Send only MACHINE causes to the drop script and hang up the rest. For SCREENING, where Google Call Screen or iPhone screening answered, decide per campaign whether to leave a short message or end the call.
Testing the combination
Test the two parts separately before you trust them together:
- Call your own mobile, let it go to voicemail and check the FreeSWITCH log: nomoVM should report
MACHINE, then the drop script should log whether it heard the beep. - Play back the voicemail on your phone. Your message should start cleanly, not halfway through a sentence. If the start is cut, the beep was missed or heard late.
- Answer the next test call yourself. You should reach the agent route, and the drop script should never run.
- Repeat with a few different phones and carriers if you can, because voicemail systems differ in how they signal the start of recording.
Once it works on test calls, run it on one campaign and spot-check a sample of voicemail calls from the dashboard and your own logs before rolling it out more widely.
When to use mod_avmd alone, AI AMD alone, or both
- mod_avmd alone makes sense when a human already decided the call reached voicemail, for example an agent clicks a "leave message" button and hands the call to a script.
- AI AMD alone is enough if you simply hang up on machines and never leave messages.
- Both is the right setup when you want machines handled without agents and a message left on each one, timed to the beep.
What does not work well is mod_avmd as your only answering machine detection on a predictive dialer. It cannot decide who answered, and it would hold every live person in silence while it waits for a beep that never comes. If you want to understand how AI detection decides, read how AI answering machine detection works.
Getting started
Adding nomoVM in front of mod_avmd does not need new servers or a new carrier. You load mod_audio_stream, copy one Lua script and add a few dialplan entries, which takes about 10 minutes. If nomoVM cannot judge a call (wrong key, plan limit, service unreachable), the script returns FALLBACK before any audio is used, and that call is never billed.
The free plan covers 30,000 calls a month, and paid plans start at $99 a month for 1,000,000 calls, with no per-server or per-agent fees. See the pricing page for the rest.
Start free and follow the FreeSWITCH integration page to put AI AMD in front of your voicemail drops.
Frequently asked questions
What is mod_avmd?
mod_avmd is a FreeSWITCH module that listens to a call for the beep a voicemail system plays after its greeting. When it hears the beep it signals FreeSWITCH, so your dialplan or script knows the recording has started.
Does mod_avmd detect answering machines?
Not in the sense dialers need. It detects the beep after a greeting, not who answered. A live person never beeps, and the beep only comes after the whole greeting has played, which is far too late to decide whether to connect an agent.
Can I use mod_avmd and nomoVM together?
Yes, and it is a good combination. nomoVM decides HUMAN or MACHINE about 2 seconds after answer. When it says MACHINE, start mod_avmd, wait for the beep, then play your voicemail message so it is recorded from the start.
What if the voicemail system never beeps?
Set a maximum wait in your script. If no beep is heard in that time, either play the message anyway or hang up. Test both on your own traffic and keep the one that suits your campaign.
Is mod_avmd included with FreeSWITCH?
Yes, it is part of the FreeSWITCH source tree and is loaded like any other module. Application and variable names have changed between versions, so check the documentation for the version you run.