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

# Answering Machine Detection (AMD)

> Detect humans, IVRs, and voicemail on outbound calls

Answering Machine Detection (AMD) helps outbound voice agents tell whether a live person, an IVR menu, or a voicemail answered the call—and decide what to do next.

<Warning>
  AMD only applies to **outbound** calls. You can save AMD settings on an agent used for inbound traffic, but detection and voicemail actions run only when the call is outbound.
</Warning>

## When to use it

Use AMD when your agents place outbound calls and you need to:

* Reach live people and skip or handle machines differently
* Navigate IVR menus (press digits) before speaking to someone
* End the call cleanly when voicemail answers, or leave a message after the beep

Skip AMD for inbound-only agents, or when every answered call should be treated as a normal conversation with no special voicemail handling.

## Configure AMD

Open the agent, go to settings → **Outbound** → **Answering machine detection (AMD)**.

| Setting                                | Purpose                                                                                                        |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| **Enable answering machine detection** | Master toggle for AMD on this agent’s outbound calls.                                                          |
| **When voicemail is detected**         | Choose what happens on voicemail: **End call** or **Play message**.                                            |
| **Message source**                     | How the voicemail content is produced: **Message**, **Prompt**, or **Audio**.                                  |
| **Message** / **Prompt** / **Audio**   | The fixed script, generation instructions, or recorded clip to leave.                                          |
| **Message delay**                      | Wait 0–5 seconds after voicemail detection before playing (helps wait for the beep). **0** = play immediately. |

When AMD is on, the agent can also press digits to navigate IVRs (for example “Press 1 for sales”). If the graph has no DTMF node, a `send_dtmf` tool is added automatically so the agent can navigate IVRs.

### Examples

**End call on voicemail** — Enable AMD, set **When voicemail is detected** to **End call**. If the callee’s mailbox answers, the call hangs up immediately. Useful for campaigns that should only talk to live people.

**Leave a message after the beep** — Enable AMD, set **When voicemail is detected** to **Play message**, choose **Message** (or Prompt/Audio), write your script, and set **Message delay** to something like `1.5`–`2` seconds so playback starts after the beep. The call ends after the message finishes.

<Warning>
  After a voicemail action completes (end call, or play message then hang up), the call ends.
</Warning>

## Voicemail message options

These options appear only when AMD is enabled and **When voicemail is detected** is **Play message**.

Message plays a fixed script. Prompt generates a voicemail from instructions. Audio lets you record a live message.

| Source      | What you provide                                       | Notes                                                                                |
| ----------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| **Message** | Exact fixed script to speak                            | Supports [agent variables](/configure/variables).                                    |
| **Prompt**  | Instructions used to generate a voicemail at call time | Also supports agent variables.                                                       |
| **Audio**   | A recorded message                                     | Record in the console (max **30 seconds**). You can preview or remove the recording. |

**Message delay** (0–5 seconds) applies to all three sources. Use it when voicemail systems announce and then beep before they start recording; too little delay can cut off the start of your message.

## What AMD can detect

| Outcome                   | Meaning                                           | What happens                                           |
| ------------------------- | ------------------------------------------------- | ------------------------------------------------------ |
| **Human**                 | A live person answered                            | The call continues normally.                           |
| **Machine · IVR**         | IVR, menu, or call-screening that expects input   | The agent may press digits to navigate.                |
| **Machine · Voicemail**   | Voicemail where leaving a message is possible     | Runs your voicemail action (end call or play message). |
| **Machine · Unavailable** | Can’t leave a message (mailbox full / not set up) | The call ends.                                         |
| **Uncertain**             | Ambiguous or partial greeting                     | Keeps listening.                                       |

Detection results also appear in the call transcript (for example **Detected: Human** or **Detected: Machine · Voicemail**).

## Tips

* Set a non-zero **Message delay** when leaving voicemails; many mailboxes need a beat after the beep.
* Remember AMD is **outbound-only**. Inbound calls ignore these settings even if they are saved on the agent.
* Prefer a clear fixed **Message** when the script must be exact (compliance, legal, offer terms). Use **Prompt** when you want the wording adapted at call time. Use **Audio** when brand tone depends on a human-recorded clip.

## FAQs and troubleshooting

**Someone answered “Hello?” but the agent still acted like a machine**\
Detection can take a moment at the start of the call. Check the transcript for AMD detection entries to see how the call was classified.

**The call ended as soon as voicemail picked up**\
That is expected if **When voicemail is detected** is **End call**, or if the result was **Machine · Unavailable** (mailbox full or not set up). Unavailable always ends the call—there is no message to leave.

**I chose Play message but the call hung up without speaking**\
An empty **Message**, empty **Prompt**, missing **Audio** recording, or a failed generation ends the call. Make sure the chosen source has content before you publish.

**My message starts mid-sentence on the recording**\
Increase **Message delay** so playback waits for the beep.

**Will AMD run on inbound calls?**\
No. Settings can be stored on the agent, but AMD only runs when the call is outbound.

**How do I confirm AMD ran on a call?**\
Open the call transcript. Detection results show as entries such as **Detected: Human** or **Detected: Machine · Voicemail**.
