Command → webhook map
Every API command and the webhook events it produces. Use this page to know exactly what callbacks to expect after each API call.
Event flow
Section titled “Event flow”When you send a command, it follows this path from your application to webhook delivery:
Your App ──HTTP POST──▶ Voice Platform API ──async──▶ Webhook (your endpoint)Your application issues an HTTP request; the platform validates and dispatches it; resulting events are delivered to your registered webhook URL with retry and ordering guarantees.
Timing types:
- Immediate — the command returns
command.resultright away. - Deferred — the command waits for completion confirmation (with a timeout fallback).
- Event — the webhook fires from a system event, not from an API call.
Lifecycle events (automatic)
Section titled “Lifecycle events (automatic)”These webhooks fire automatically from system events, not from API commands.
| Trigger | Webhooks fired | Timing | Notes |
|---|---|---|---|
| Incoming call | call.new | Event | Fires when a new inbound call arrives. Published before any commands are sent. |
| Channel answered | call.answered | Event | Automatic channel-level answer event. May also fire from the answer command. |
| Call ended | call.hangup | Event | Fires on call termination. Also synthesized for orphaned sessions after ~120 s idle. |
| DTMF key press | dtmf | Event | Fires on each DTMF digit. Active during playback and recording. |
Call control
Section titled “Call control”| Command | Webhooks fired | Timing | Notes |
|---|---|---|---|
answer | command.result, call.answered | Deferred | Waits for execution confirmation. Timeout fallback at 2 s publishes command.result with success: false. |
hangup | command.result, call.hangup | Immediate | command.result fires immediately. call.hangup arrives later from the event stream. |
disconnect | command.result | Immediate | Returns control to the dialplan. Usually followed by a call.hangup lifecycle event. |
Playback
Section titled “Playback”| Command | Webhooks fired | Timing | Notes |
|---|---|---|---|
playback/start | command.result, playback.started, playback.stopped, playback.file_not_found | Deferred | Two-phase: file fetch then playback. playback.started after fetch; playback.stopped when done; file_not_found on failure. |
playback/stop | command.result, playback.stopped | Immediate | command.result fires immediately. Interrupting active playback triggers its playback.stopped. |
playback/pause | command.result | Immediate | No playback-specific webhook. Only command.result. |
playback/resume | command.result | Immediate | No playback-specific webhook. Only command.result. |
playback/seek | command.result | Immediate | Requires position_ms in payload. |
playback/restart | command.result | Immediate | Restarts playback from the beginning. |
playback/silence | command.result, playback.stopped | Deferred | Stops current playback (triggers its playback.stopped) and starts infinite silence. Silence only completes on hangup. |
play_and_get_digits | command.result, digits.collected, playback.file_not_found | Deferred | Multi-phase fetch then DTMF collection. Individual dtmf events also fire during collection. |
Recording
Section titled “Recording”| Command | Webhooks fired | Timing | Notes |
|---|---|---|---|
record/start | command.result | Immediate | Starts audio streaming to the recording service. command.result is immediate. |
record/stop | command.result, recording.completed | Immediate | recording.completed includes URL and duration. Uses the original record/start command_uid. |
Conference session commands
Section titled “Conference session commands”Per-session commands that control a call’s participation in a conference room.
| Command | Webhooks fired | Timing | Notes |
|---|---|---|---|
conference/join | conference.member.joined | Deferred | All members join muted. Webhook fires when the system confirms the join. |
conference/leave | conference.member.left | Deferred | Kicks member from conference. Webhook fires on removal confirmation. |
conference/mute | conference.member.muted | Deferred | Webhook fires on mute confirmation. |
conference/unmute | conference.member.unmuted | Deferred | Webhook fires on unmute confirmation. |
Conference room endpoints
Section titled “Conference room endpoints”Room-level endpoints for creating, destroying, and controlling conference playback.
| Endpoint | Webhooks fired | Timing | Notes |
|---|---|---|---|
POST /conferences | conference.created | Immediate | Returns 201 with room_id. Webhook published synchronously. |
DELETE /conferences/{room_id} | conference.destroyed | Immediate | Stops recording, kicks all members, publishes webhook synchronously. |
POST /conferences/{room_id}/play | conference.play.started, conference.play.finished | Immediate | play.started fires immediately. play.finished fires when playback reaches the end naturally. |
POST /conferences/{room_id}/pause | conference.play.paused | Immediate | Toggle pause/resume of conference playback. |
POST /conferences/{room_id}/stop | conference.play.stopped | Immediate | Stops all conference playback. |
POST /conferences/{room_id}/volume | conference.play.volume_changed | Immediate | Sets playback volume (range -50 to 7). |