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

# Machine Detection

> Detect answering machines and voicemail on global outbound calls with Vobiz AMD - configure sync or async mode, silence timeout, and callback delivery.

Detect answering machines on outbound calls with synchronous or asynchronous detection modes.

## Introduction

<Warning>
  **Important: Not a Separate Endpoint.** Machine detection is **NOT a separate API endpoint**. It is configured as parameters when making a call using `POST https://api.vobiz.ai/api/v1/Account/{auth_id}/Call/`. This page documents the machine detection parameters and callback format.
</Warning>

Machine detection allows you to identify when an answering machine picks up your outbound call instead of a human. You can configure Vobiz to either hang up automatically or continue the call when a machine is detected.

<Note>
  Machine detection is only supported on outbound calls initiated via the [Make Call API](/call/make-call). Set the `machine_detection` parameter to enable this feature.
</Note>

## Synchronous Machine Detection

When you set `machine_detection=true` or `machine_detection=hangup` when making a call, Vobiz analyzes the audio after the call is answered to determine if a machine answered.

| Field                                     | Type    | Required | Description                                                                                         |
| ----------------------------------------- | ------- | -------- | --------------------------------------------------------------------------------------------------- |
| `machine_detection`                       | string  | No       | Set to "true" to continue the call or "hangup" to automatically hang up when a machine is detected. |
| `machine_detection_time`                  | integer | No       | Time in milliseconds to analyze audio. Default: 5000. Range: 2000–10000.                            |
| `machine_detection_maximum_speech_length` | integer | No       | Maximum speech duration in milliseconds. Default: 5000. Range: 1000–6000.                           |
| `machine_detection_initial_silence`       | integer | No       | Maximum silence after answer in milliseconds. Default: 4500. Range: 2000–10000.                     |
| `machine_detection_maximum_words`         | integer | No       | Maximum number of sentences. Default: 3. Range: 2–10.                                               |
| `machine_detection_initial_greeting`      | integer | No       | Maximum greeting length in milliseconds. Default: 1500. Range: 1000–5000.                           |

## Asynchronous Machine Detection

To act on a detected answering machine, set the `machine_detection_url` parameter when making an outbound call. Vobiz detects the answering machine in the background and invokes `machine_detection_url` with the results.

| Field                      | Type   | Required | Description                                                                                       |
| -------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------- |
| `machine_detection_url`    | string | No       | Callback URL invoked when machine detection completes. Vobiz sends detection results to this URL. |
| `machine_detection_method` | string | No       | HTTP method used to invoke machine\_detection\_url. Default: POST.                                |

<Tip>
  **Benefit:** Asynchronous detection allows your application to handle the call immediately while detection happens in the background, providing better user experience.
</Tip>

## Parameters Sent to machine\_detection\_url

When machine detection completes, Vobiz sends these parameters to your machine\_detection\_url:

| Field             | Type    | Description                                                                                         |
| ----------------- | ------- | --------------------------------------------------------------------------------------------------- |
| `From`            | string  | The caller ID number used to initiate the call.                                                     |
| `Machine`         | boolean | `true` if a machine was detected.                                                                   |
| `To`              | string  | Destination of the call.                                                                            |
| `RequestUUID`     | string  | Unique identifier for the call request.                                                             |
| `ALegRequestUUID` | string  | Identifier for the first leg of the call (multi-leg calls).                                         |
| `CallUUID`        | string  | Unique identifier for the call.                                                                     |
| `IfMachine`       | string  | `"continue"` or `"hangup"`, reflecting the `machine_detection` value set when initiating the call.  |
| `Direction`       | string  | Direction of the call. Always `"outbound"` (machine detection is only supported on outbound calls). |
| `ALegUUID`        | string  | Unique identifier for the A leg of the call.                                                        |
| `Event`           | string  | Event that triggered this notification. Always `"MachineDetection"`.                                |
| `CallStatus`      | string  | Status of the call. Always `"in-progress"`.                                                         |

### Example Callback Response

```json JSON Sent to machine_detection_url theme={null}
{
  "From": "+12025550000",
  "Machine": true,
  "To": "+12025551111",
  "RequestUUID": "9834029e-58b6-11e1-b8b7-a5bd0e4e126f",
  "ALegRequestUUID": "9834029e-58b6-11e1-b8b7-a5bd0e4e126f",
  "CallUUID": "97ceeb52-58b6-11e1-86da-77300b68f8bb",
  "IfMachine": "continue",
  "Direction": "outbound",
  "ALegUUID": "97ceeb52-58b6-11e1-86da-77300b68f8bb",
  "Event": "MachineDetection",
  "CallStatus": "in-progress"
}
```
