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

# DTMF Events

> Learn how to enable and listen to DTMF (Dual-Tone Multi-Frequency) events in Zero Runtime SIP calls, including event payloads and integration options.

DTMF (Dual-Tone Multi-Frequency) events are generated when a participant presses keys (0-9, \*, #) on their phone or SIP device during a call. These events are useful for building IVR flows, collecting user input, or triggering actions in your application.

<Note>
  This page covers the SIP platform side: enabling DTMF on the gateway and the event payload. To handle DTMF from your agent code, see [DTMF Handling](/build/telephony/dtmf).
</Note>

## Enabling DTMF Events

DTMF event detection can be enabled in two ways:

* **Via Dashboard:**
  * When creating or editing a SIP gateway in the Zero Runtime dashboard, enable the `DTMF` option.
* **Via API:**
  * Set the `enableDtmf` parameter to `true` when creating or updating a SIP gateway using the API.

Once enabled, DTMF events will be detected and published for all calls routed through that gateway.

## Listening to DTMF Events

To listen DTMF events in a Zero Runtime room, you can subscribe to the `DTMF_EVENT` topic using the PubSub system. This allows your application to react to DTMF input in real time.

**Sample Event Payload:**

```json theme={null}
{
  "message": "Dtmf event received",
  "senderId": "otb9vc4s",
  "timestamp": "2025-09-08T12:02:14.726Z",
  "topic": "DTMF_EVENT",
  "senderName": "Participant",
  "id": "32gwnzkt5we",
  "payload": {
    "number": 1,
    "timestamp": "1757332934706"
  }
}
```

**Payload Fields:**

* `message`: Description of the event.
* `senderId`: The unique ID of the participant who sent the DTMF input.
* `timestamp`: When the event was received (ISO format).
* `topic`: Always `DTMF_EVENT` for these events.
* `senderName`: Name of the participant (if available).
* `id`: Unique event/message ID.
* `payload.number`: The DTMF digit pressed (0-9, \*, #).
* `payload.timestamp`: Timestamp (in ms) when the digit was pressed.

## Use Cases

* Build IVR menus and collect user input during calls.
* Trigger actions in your app based on keypresses (e.g., press 1 for support, 2 for sales).
* Log or analyze DTMF input for compliance or analytics.

<Tip>
  DTMF events are available for both inbound and outbound SIP calls, as long as the gateway is configured with DTMF enabled.
</Tip>
