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

# Answering Machine Detection

> Work out who picked up an outbound call — a person, a voicemail box, or a phone menu — and act accordingly

When an outbound agent dials a number, the call can be answered by a person, by a voicemail box, by an automated phone menu (IVR), or by nothing at all. **Answering Machine Detection (AMD)** listens to the first moments of the call, decides which of those it reached, and then does what you have configured for that case: carry on with the conversation, leave a voicemail, navigate the menu, re-prompt, or hang up.

AMD is off by default. It applies to **outbound agents only** — an inbound call is always answered by a person, so there is nothing to detect.

<Note>
  AMD is unrelated to the older **mobile calls detection** toggle (`callDetection` in the API), which looks up whether a caller's number is a mobile phone. The two can be used independently.
</Note>

## Turning it on

In the Dashboard, open the agent (**Customers → Resellers and Organizations**, pick the organization, click the agent, then **Configure**) and find **Answering Machine Detection** in the Call Handling section. The same settings appear on the Connect App's agent edit page for outbound agents.

Through the API, set `amdConfig` on [Create Agent](/api-reference/agents/create) or [Update Agent](/api-reference/agents/update). `true` turns it on with the defaults below; an object lets you tune it; `false` turns it off.

```json theme={null}
{ "amdConfig": true }
```

## Settings

| Setting | API key | Default | What it does |
| - | - | - | - |
| Answering Machine Detection | `enabled` | `false` | Turns detection on for this agent's outbound calls |
| Detection Sensitivity | `sensitivity` | `balanced` | How long the agent listens before deciding. `fast` decides sooner with more mistakes; `precise` listens longer with fewer. See [presets](#detection-sensitivity) |
| *(API only)* | `max_detection_ms` | preset | Overrides the preset's overall detection budget. Leave unset unless you have measured a need |
| When a machine answers | `on_machine` | `leave_voicemail` | What to do once the agent is confident it reached a voicemail box: `leave_voicemail`, `hang_up`, or `continue_as_human` (carry on as a normal call) |
| Voicemail Message | `voicemailMessage` (top-level agent field) | — | Spoken after the beep. Leave it empty to hang up instead of leaving a message |
| Voicemail Audio URL | `voicemailMessageAudioUrl` (top-level agent field) | — | Optional pre-recorded audio, played instead of speaking the message. If it cannot be fetched, the text is spoken instead |
| When nobody speaks | `on_silence` | `reprompt` | Used when the call connects but the agent hears nothing, or cannot tell who answered: `reprompt` (ask again), `hang_up`, or `continue_as_human` |
| Re-prompt Message | `uncertain_prompt` | "Hello, is this a good time?" | A short, cautious opener used instead of the normal greeting when the agent is unsure |
| *(API only)* | `voicemail_max_duration_ms` | `25000` | Longest voicemail the agent will leave before cutting itself off |
| *(API only)* | `voicemail_beep_wait_ms` | `2000` | How long to wait for the machine's beep before speaking. There is no beep signal on the line, so this is a fixed pause |

### Detection sensitivity

Each preset sets how long the agent will listen overall, and how much silence it tolerates before concluding that nobody is there. A clear greeting resolves in well under a second; the budget is a cap, not a wait.

| Preset | Listens for up to | Treats as silence after |
| - | - | - |
| `fast` | 12 s | 6 s |
| `balanced` | 20 s | 10 s |
| `precise` | 28 s | 12 s |

Whatever the preset, a person who answers and then pauses waits about two seconds before the agent speaks. That short delay is what stops a voicemail greeting's first syllable from being mistaken for a human.

## What happens on each kind of answer

| The agent hears | `answer_type` | What it does |
| - | - | - |
| A person | `human` | Continues as a normal call, opening with the usual greeting |
| A voicemail greeting that invites a message | `machine` | Follows **When a machine answers**. With `leave_voicemail`, it waits for the beep, speaks the Voicemail Message (or plays the audio), and hangs up. The call ends with status `voicemail_left` |
| A voicemail box that cannot take a message (full, not set up) | `machine` | Hangs up — there is nothing to leave |
| An automated phone menu | `ivr` | Navigates the menu if [IVR Menu Navigation](/functions/ivr-navigation) is on; otherwise hangs up |
| Silence, or an answer it cannot classify | `silence_unknown` | Follows **When nobody speaks**. With `reprompt`, it opens with the Re-prompt Message instead of its full greeting, then carries on if someone replies |

The verdict is recorded on the call as `answer_type` and shown in the **Answered By** column of the Outbound Calls report (**Reports → Outbound Calls**). It is also sent on the [result webhook](/api-reference/outbound-calls/overview#the-result-webhook), together with `voicemail_left`. When AMD is off, `answer_type` is `null`.

<Tip>
  **Keep the voicemail message self-contained.** The agent leaves it and hangs up; nobody is listening for a reply. Say who is calling, why, and how to call back.
</Tip>

## Per-call overrides

A single call can override the agent's settings when you trigger it through the API:

* `voicemail_message` — the message for this call only. Overrides the agent's message and suppresses its pre-recorded audio.
* `amd_config` — any of the keys above, merged over the agent's settings for this call. `{ "enabled": true }` turns AMD on for one call of an agent that normally has it off, and vice versa.

See [Trigger Outbound Call](/api-reference/outbound-calls/create). The **Place call** dialog in the Dashboard also offers a per-call **Voicemail message**.

## AMD and retries

A call that ends in `voicemail_left` can be redialled automatically: the `voicemail` rule of a [retry policy](/functions/retry-policies) governs it, separately from `no_answer` and `busy`. A call that reached a person is never redialled.

## Good to know

* Detection runs its own short speech-recognition pass at the start of the call, so the agent's first line arrives a little later on AMD-enabled calls than on calls without it.
* There is no confidence score. An answer the agent could not classify is reported as `silence_unknown`; that is the low-confidence signal.
* A fax line has no category of its own and is reported as `machine`.
* Turning AMD off also turns off [IVR Menu Navigation](/functions/ivr-navigation), which cannot run without it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.