***

title: detect
slug: /reference/typescript/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

```typescript {10}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

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

### Fax Detection

```typescript {9}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

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

### Digit Detection

```typescript {9}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

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