November 26, 2026 · 11 min read · AMDY Team
In short: Voice agents answer whatever speaks first, including voicemail; an audio verdict before the agent’s first line lets you route people, machines and screening assistants differently.
If you have shipped an outbound AI agent, you have probably heard this recording: the agent opens with a friendly line, the other end says “Hi, you’ve reached Dana, I can’t get to the phone right now”, and the agent replies to it. Then it keeps going, politely pitching a greeting until the beep cuts it off mid-sentence. AI voice agent voicemail detection is the step that prevents this: a decision, made in the first seconds after the call is answered, about whether a person or a machine is on the line, so the agent knows whether to speak at all.
This guide is for teams building outbound agents on Twilio, Telnyx, LiveKit, Pipecat, Vapi, Retell or their own SIP stack. It covers why agents end up talking to machines, what that really costs, the three common ways to detect voicemail, and a call flow that keeps the agent quiet until it knows who answered.
Why your agent keeps talking to machines
A voice agent is built to take turns. Voice activity detection hears speech, speech-to-text turns it into words, the language model writes a reply and text-to-speech says it. That loop is exactly what you want with a person. The trouble is that a voicemail greeting is also speech, and the loop has no idea it is listening to a recording.
Many pipelines also start the agent’s first line either the moment the call is answered or the moment the first speech is detected. Neither event tells you anything about who answered. On a typical outbound list, a large share of answered calls are not people at all:
- Voicemail greetings — personal greetings recorded in the person’s own voice, and carrier default greetings read by a synthetic voice.
- Call screening assistants — handset features such as Google’s Call Screen on Pixel phones and the screening built into recent iPhone software, which answer unknown numbers and ask who is calling.
- Network announcements and tones — “the number you have dialed is not in service”, busy and fax tones, special information tones.
- Silence — open lines, pocket answers and routes that report an answer before anything is really connected.
Personal greetings are the hardest case for a language-driven agent. The first words of “Hi, it’s Sam…” are the same words Sam would say live, in the same voice. The clue — “…leave a message after the tone” — arrives several seconds later, long after the agent has started talking.
Screening assistants are worse in a different way. They ask a short question and then wait in silence for an answer, which is the perfect turn for an LLM. The agent answers the question with its full opener, and the person reads a transcript of a sales pitch on their lock screen.
What talking to machines costs you
It is tempting to treat voicemail as harmless: the call ends, nobody was hurt. In practice it costs money, data quality and goodwill.
- Model and voice minutes. Speech-to-text, the LLM and text-to-speech all run while the agent talks to a greeting. You pay for every second of a conversation with nobody.
- Polluted transcripts and metrics. Call logs fill with one-sided “conversations” with greetings. Your conversation rate, average handle time and any evaluation built on transcripts all drift, and it gets harder to see whether a prompt change actually helped.
- Half a pitch on voicemail. Voicemail systems usually record from the beep. Whatever the agent said before it is lost, so the person hears a message that starts mid-sentence, from a voice that sounds automated. That is how you get annoyed callbacks and spam reports.
- Tied-up capacity. Every agent session spent on a greeting is a session that isn’t free for the next real answer, which matters if you run a fixed number of concurrent calls.
- Compliance exposure. In the US, the FCC confirmed in February 2024 that AI-generated voices count as “artificial” voices under the TCPA, so a message your agent leaves follows the rules for artificial or prerecorded voice calls, including consent. This is not legal advice; check the rules that apply to your calls.
A rough sense of scale helps. The figures below are an illustration with assumed inputs, not measurements — put in your own volumes and per-minute costs.
| Assumption (example only) | Value |
|---|---|
| Answered calls per day | 10,000 |
| Share that are machines or screening assistants | 50% |
| Average time the agent talks before the call ends | 30 seconds |
| Full stack cost per agent minute (STT + LLM + TTS + platform) | $0.10 |
| Spent talking to machines per day | 5,000 × 0.5 min × $0.10 = $250 |
That number leaves out the transcripts you have to filter, the callbacks your team handles and the numbers that pick up spam labels. We cover the reputation side in dead air, silent calls and “Spam Likely”.
Three ways to detect voicemail
1. The carrier’s or CPaaS platform’s AMD
If your calls are placed through a CPaaS API, the platform probably offers answering machine detection as a call option. Here is how two of them describe it in their own documentation, as of November 2026 — check their current docs before you build on these details.
Twilio. Outbound calls take a MachineDetection parameter. With Enable, Twilio reports who answered as soon as it decides, with AnsweredBy values such as human, machine_start, fax or unknown. With DetectMessageEnd, a machine result waits for the end of the greeting (usually the beep), which is meant for leaving a message. MachineDetectionTimeout defaults to 30 seconds. Asynchronous AMD lets the call carry on while detection runs; Twilio notes it uses one of the forked audio streams allowed per call, a limit shared with Media Streams, which matters if your agent already streams audio out. Twilio’s US price list shows answering machine detection at $0.0075 per call.
Telnyx. Calls placed through its Voice API take an answering_machine_detection setting with modes including detect, detect_beep, greeting_end and premium, which Telnyx describes as using speech recognition and machine learning, plus a premium mode with iPhone call screening support. Premium results include human_residence, human_business, machine, silence, fax_detected and not_sure, with a default analysis time limit of 30 seconds. Telnyx’s December 2022 price notice set standard AMD at $0.0020 and premium at $0.0065 per invocation, and its Voice API pricing page still lists both rates (per call) in November 2026.
The appeal is obvious: one parameter, no extra service. The limits are just as clear. Detection only exists on calls that platform carries, so an agent on LiveKit or Pipecat with its own SIP trunk can’t use it, and switching carriers means rebuilding the logic. The result usually arrives as a webhook, separate from your agent pipeline, so you have to wire the two together yourself. Neither vendor publishes a typical decision time; measure it on your own calls (Twilio reports a MachineDetectionDuration you can log).
2. Asking the LLM to work it out from the transcript
The quickest fix most teams try is a line in the system prompt: “If you reach voicemail, call the end_call tool.” It catches some greetings, and it costs nothing to add. As the main detector, though, it has structural problems:
- The model can only judge words it has already received, so the agent must listen first and the transcript must be finalised. By then the agent has often already spoken.
- The deciding words in a greeting come late. Until “leave a message”, a personal greeting reads exactly like a person.
- A screening assistant’s question looks like a human question, so the model tends to answer it.
- It is non-deterministic and prompt-sensitive: a small prompt change can shift how often it hangs up on real people, and you won’t notice until someone measures.
Keep it anyway, as a second line of defence. If a greeting ever slips past your main detector, an end-of-call instruction lets the agent stop politely instead of finishing its script.
3. A dedicated audio verdict before the agent speaks
The third option listens to how the answer sounds, not what it says. A live pickup has breath, room noise and the uneven start of someone who just lifted a phone; a recording has the even level and clean edges of audio played back. Fixed tones and silence can be recognised directly. Because it works on the audio itself, it doesn’t depend on which carrier delivered the call or which framework runs the agent.
That is what AMDY does. You stream the first seconds of the answered call over a WebSocket and get one verdict back, usually about 2 seconds after answer and up to 3.2 seconds for unclear calls. On 400 hand-labelled calls, AMDY sent 94.9% of live people through, and 88% of the calls it passed on were people. Call screening assistants come back as their own SCREENING verdict instead of being folded into human or machine.
| Carrier / CPaaS AMD | LLM guesses from transcript | Audio verdict before speaking | |
|---|---|---|---|
| Works with any carrier or framework | No — calls on that platform only | Yes | Yes, wherever you can fork the audio |
| When the agent learns the answer | Webhook, timing not published | After the agent has listened, often after it spoke | About 2 s, up to 3.2 s for unclear calls |
| Screening assistants | Depends on vendor and mode | Usually answered as a person | Reported as SCREENING |
| Cost basis | Per call or per invocation | Tokens and minutes on every call | Per detection, on your plan |
| Best role | Calls already on that platform | Backup guard | Main gate for the first line |
The design: hold the agent’s first line until the verdict
The idea is simple. Start everything at answer, but let nothing play until you know who answered.
- Fork the inbound audio at answer. Send the caller’s side of the call to the detector as 8 kHz, 16-bit, mono PCM. Twilio Media Streams deliver base64-encoded μ-law at 8 kHz, so decode it to 16-bit PCM first; frameworks running at 16 or 48 kHz need to resample.
- Start the agent muted. Let speech-to-text connect, load the lead’s context into the LLM and pre-render the opener with text-to-speech, so the first word can play the instant you get a go-ahead.
- Wait for one verdict. About 2 seconds for most calls, up to 3.2 seconds for unclear ones. Set your own deadline a little above that.
- Route on the verdict. People get the agent; machines, tones and silence don’t; screening assistants get one short, honest sentence.
In pseudo-code, using the request and reply shape from our API docs — the key in an X-API-Key header, one JSON config frame, then binary audio until a JSON verdict arrives:
# Pseudo-code: gate the agent's first line on the AMD verdict
on_call_answered(call):
agent = start_agent(call, muted=True) # STT, LLM context and TTS opener warm, nothing plays
ws = websocket_connect(AMDY_ENDPOINT, headers={"X-API-Key": API_KEY})
ws.send_text(json({"call_id": call.id, "sample_rate": 8000}))
status = None
deadline = now() + 4.0 # a little above the 3.2 s maximum
for frame in call.inbound_pcm_8k(): # 8 kHz, 16-bit, mono PCM frames
ws.send_bytes(frame)
reply = ws.receive() # empty while the server is still listening
if reply:
status = parse_json(reply)["status"]
break
if now() > deadline:
break
ws.close()
route(call, agent, status)route(call, agent, status):
if status == "HUMAN":
agent.unmute()
agent.play_opener() # pre-rendered, so no extra delay
elif status == "SCREENING":
agent.say("Hi, this is Alex from Northwind Dental about your appointment.")
agent.listen() # the person may pick up
elif status == "MACHINE":
voicemail_policy(call) # hang up, or a short message after the beep
elif status in ("TONE", "SILENCE"):
call.hangup()
log_and_schedule_retry(call)
else: # FALLBACK, or no verdict before the deadline
fallback_policy(call, agent) # your platform's AMD, or a short opener + LLM guardWhat each verdict should trigger
| Verdict | What answered | What the agent does |
|---|---|---|
| HUMAN | A live person | Plays the opener at once and starts the conversation |
| MACHINE | Voicemail or a recorded greeting | Hangs up, or waits for the beep and leaves one short message |
| SCREENING | A handset screening assistant | Says its name and the reason for the call in one sentence, then waits |
| TONE | Busy, fax, special information tone and similar | Hangs up and logs the cause for list and route checks |
| SILENCE | Nothing heard | Hangs up; retry under your retry rules |
| FALLBACK | The call was not judged | Uses your backup policy; fallback calls are never billed |
Making the wait feel natural
Two seconds of quiet after someone says “hello” is noticeable, so design around it. A person who hears nothing will usually say “hello?” again, which is fine — the agent can start straight over it if the opener is already rendered. What you must avoid is adding more delay on top: no LLM round trip before the first word, no TTS request after the verdict, no long opener.
Keep the first line short and specific, ideally one that confirms who you reached: “Hi, is this Dana? It’s Alex from Northwind Dental.” If your calls are telemarketing, check how the wait fits abandoned-call rules such as the two-second window in the US Telemarketing Sales Rule; we summarise them in abandoned-call rules and AMD.
If you do leave a voicemail
When your policy is to leave a message, wait for the beep instead of talking over the greeting. The verdict tells you a machine answered, not when the greeting ends, so use beep detection from your platform where it exists or a tone check of your own. Then keep it to two sentences: who is calling, why, and how to call back. Skip the pitch.
Remember that a message in an AI voice is an artificial-voice message in the eyes of US regulators, so the consent and identification rules for prerecorded messages apply. Other countries have their own rules. Check them with your counsel before you switch voicemail drops on.
Measuring whether it works
- Verdict mix by list and time of day — the share of HUMAN, MACHINE, SCREENING, TONE and SILENCE answers.
- Agent seconds on non-human calls — this should fall sharply once the gate is on.
- LLM guard catches — greetings the backup instruction had to end. A rising number means something upstream changed.
- People who hang up during the wait — compare with your call recordings to see whether your opener starts fast enough.
- A labelled sample — listen to a random few hundred calls and check both errors yourself, as described in how to test AMD on your own calls.
FAQ
Can’t the LLM just detect voicemail on its own?
Sometimes, but late. It can only judge words it has already heard, and personal greetings sound like people until their last few words. Use it as a backup, not as the gate.
How long does the agent wait before it speaks?
With AMDY, about 2 seconds after answer for most calls and up to 3.2 seconds for unclear ones. Pre-render the opener so it plays the moment the verdict arrives.
Does this work if my calls don’t go through Twilio or Telnyx?
Yes. An audio verdict only needs the caller’s side of the call as 8 kHz PCM, so it works with LiveKit, Pipecat, a hosted agent platform that lets you fork audio, or your own SIP stack.
What should the agent say to a call screening assistant?
One sentence with its name, company and the reason for the call, then silence. The person reads it as a transcript and decides whether to pick up. Read more in call screening assistants and AMD.
What happens if the detector can’t be reached?
You get a FALLBACK verdict before any audio is used, and the call isn’t billed. Decide in advance what the agent does then: use your platform’s own AMD, or play a short opener and let the LLM guard end the call if it hears a greeting.
Next steps
Every AMDY account includes 30,000 free trial detections — enough to gate one agent campaign and compare it with your current setup. Start with the API docs, or see how AMDY compares with Twilio AMD and Telnyx AMD.
Back to all articles