> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nixflex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Voicemail detection

> Stop wasting outbound calls on answering machines

When you make an outbound call, you don't want your agent delivering its opener to an answering machine. Nixflex detects voicemail automatically and ends the call cleanly, marking it as `voicemail_detected`.

There are two layers of detection. They work independently and complement each other.

## Layer 1 — AI detection (always on)

The first thing the other party says is checked by the AI: voicemail greeting, or real person?

<Steps>
  <Step title="AI evaluates the opening">
    If it sounds like a voicemail (mentions leaving a message, a beep or tone, "you have reached", "not available", and similar — in any language), the AI ends the call silently.
  </Step>

  <Step title="Real person">
    If a real person answered, the agent delivers its normal outbound opener.
  </Step>
</Steps>

* **Always on** — no setup, runs on every outbound call.
* **Free** — no extra charge.
* **Any language.**
* **Speed:** around 8–9 seconds — it waits for the full greeting before deciding.
* A transcript of the greeting is saved to the call record.

## Layer 2 — Carrier AMD (optional)

AMD (Answering Machine Detection) is a faster, carrier-level check that runs on your own telephony account. It listens to the audio directly and reports human or machine — often within \~3 seconds, before the greeting finishes.

* **Off by default.** Enable it per agent with the **Voicemail detection** toggle in **Call Settings**.
* **Speed:** around 3 seconds.
* **Cost:** roughly \$0.0075 per answered call, billed on your telephony account.
* **Best for:** US and Canada.
* When AMD ends the call, it happens before the AI is involved, so the call has **no transcript, sentiment, or summary**. This is expected.

## Comparison

|                  | AI detection         | Carrier AMD                |
| ---------------- | -------------------- | -------------------------- |
| Default          | Always on            | Off (toggle)               |
| Speed            | \~8–9 sec            | \~3 sec                    |
| Cost             | Free                 | \~\$0.0075 / answered call |
| Languages        | Any                  | Best in US / CA            |
| Transcript saved | Yes                  | No                         |
| Ended reason     | `voicemail_detected` | `voicemail_detected`       |

We recommend leaving AI detection on as your free safety net, and enabling AMD only for agents calling US/CA numbers where the extra speed is worth the small per-call cost.

## What happens on detection

Either layer ends the call the same way:

1. The call ends immediately — the agent does **not** leave a message.
2. The call record gets `ended_reason: voicemail_detected`.
3. Your webhook fires so you can react in your own system.
