***

title: detect
slug: /reference/python/rest/calling/detect
description: Start detection (answering machine, fax, DTMF) on a call via REST.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Start a detector on an active call. Detectors can identify answering machines,
fax tones, or DTMF digits. Returns a `control_id` for managing the detector.

<EndpointSchemaSnippet endpoint="POST /api/calling/calls" />

## **Response Example**

<EndpointResponseSnippet endpoint="POST /api/calling/calls" />

## **Examples**

### Answering Machine Detection

```python {10}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

# Answering machine detection
result = client.calling.detect(
    call_id="call-id-xxx",
    detect={
        "type": "machine",
        "params": {
            "initial_timeout": 4.5,
            "end_silence_timeout": 1.0,
        }
    },
    timeout=30.0,
)
```

### Fax Detection

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

result = client.calling.detect(
    call_id="call-id-xxx",
    detect={"type": "fax", "params": {"tone": "CED"}}
)
```

### Digit Detection

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

result = client.calling.detect(
    call_id="call-id-xxx",
    detect={"type": "digit", "params": {"digits": "0123456789#*"}}
)
```