> This page is for APIs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# Tap status callback

POST 

Sent to the `status_url` of a `calling.tap` command when the tap starts (`tapping`) and when it
ends (`finished`).

Status callbacks are advisory, best-effort notifications — delivery can be delayed or fail silently, so don't gate time-critical actions on receiving one. See [Status callback reliability](/docs/platform/webhooks#status-callback-reliability).

Reference: https://signalwire.com/docs/apis/rest/webhooks/tap-status-callback

## Request

### Payload

- `event_type` (enum, required) — The type of event. Always `calling.call.tap` for tap status callbacks.
  - Allowed values: `calling.call.tap`
- `event_channel` (string, required) — The channel the event was delivered on.
- `timestamp` (double, required) — When the event was sent, as a Unix timestamp in seconds.
- `project_id` (string, required) — Your project ID.
- `space_id` (string, required) — Your Space ID.
- `params` (WebhooksCallingTapStatusCallbackPayloadParams, required) — The tap operation and its new state.

## Types

### WebhooksCallingTapStatusCallbackPayloadParams

The tap operation and its new state.

- `call_id` (string, required) — ID of the call.
- `node_id` (string, required) — ID of the node the call is on.
- `control_id` (string, required) — The control ID of the tap operation, as set in `calling.tap`.
- `state` (enum, required) — The tap state. `tapping` when the tap starts, `finished` when it ends.
  - Allowed values: `tapping`, `finished`
- `tap` (Calling.TapConfig, required) — The `tap` configuration, as sent in `calling.tap`.
- `device` (Calling.TapDevice, required) — The `device` configuration, as sent in `calling.tap`.
- `segment_id` (string, optional) — ID of the call segment. Present when the call has one.
- `tag` (string, optional) — The tag associated with the call. Present only when a tag was set on the call.

### Calling.TapConfig

Tap configuration — specifies what audio to capture.

- `type` (enum, required) — Currently only `audio` is supported.
  - Allowed values: `audio`
- `params` (CallingTapConfigParams, required) — Audio tap parameters.

### Calling.TapDevice

Tap device configuration — specifies where to stream captured audio. The shape of `params` is determined by `type`.

- `type`: `rtp` (rtp)
  - `params` (Calling.TapRtpParams, required) — RTP connection parameters.
- `type`: `ws` (ws)
  - `params` (Calling.TapWsParams, required) — WebSocket connection parameters.

### CallingTapConfigParams

Audio tap parameters.

- `direction` (enum, required) — The direction of audio to tap.
  - Allowed values: `listen`, `speak`, `both`

### Calling.TapRtpParams

RTP tap target parameters.

- `addr` (string, required) — Public IPv4 address of the RTP target. Private/reserved ranges are rejected.
- `port` (integer, required) — UDP port of the RTP target (1-65535).
- `codec` (enum, optional) — Audio codec to request. Defaults to the call's negotiated codec.
  - Allowed values: `PCMA`, `PCMU`, `pcma`, `pcmu`, `OPUS`, `opus`
- `ptime` (enum, optional) — Packetization time in milliseconds. Defaults to the call's negotiated ptime.
  - Allowed values: `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90`, `100`, `110`, `120`

### Calling.TapWsParams

WebSocket tap target parameters.

- `uri` (string, required) — WebSocket URI of the tap target. Must start with `ws://` or `wss://`.
- `codec` (enum, optional) — Audio codec to request. Defaults to the call's negotiated codec.
  - Allowed values: `PCMA`, `PCMU`, `pcma`, `pcmu`, `OPUS`, `opus`