Categorized Overview
Introduction
Leg Actions are executed on an active call leg to control media, call state, routing, recording, and real-time integrations.
Use this page to quickly discover the right action before diving into detailed API reference pages.
A. Media & Interaction Actions
These actions control what the participant hears, says, or inputs during a call.
- <StartPlay> Plays an audio file from a URL to the leg.
- <StopPlay> Stops an ongoing audio playback.
- <Say> Converts text to speech and plays it to the leg. Supports Amazon Polly and Google TTS.
- <StopSay> Stops an ongoing text-to-speech playback.
- <PlaySequence> Plays a sequence of media actions (e.g., Play → Say → Play) in order.
- <Gather> Collects DTMF digits (for IVR menus, PIN entry, confirmations).
- <SendDigits> Plays DTMF tones out to the leg (used to interact with downstream IVRs).
B. Call State Control
These actions manage the lifecycle and audio state of a call leg.
- <Answer> Picks up an incoming leg.
- <Hangup> Terminates the leg immediately.
- <Mute> / <UnMute> Mutes or unmutes audio on the leg. Supports direction control: in, out, or both.
- <Hold> / <UnHold> Places the leg on hold and resumes it. Supports optional Music on Hold (MOH) using nested <StartPlay>.
C. Connectivity & Routing
Advanced actions for connecting legs, conferencing, and supervision.
- <Dial> Creates a new outbound leg and bridges it to the current leg. Supports PSTN and VoIP destinations.
- <JoinBridge> Moves the leg into an existing multi-party bridge.
- <LeaveBridge> Removes the leg from a bridge.
- <StartMonitoring> Allows a supervisor to listen or whisper on another leg (rxAudio: muted / enabled).
- <StopMonitoring> Stops an active monitoring session.
D. Recording Actions
These actions manage call recordings at the leg level.
- <StartRecording> Starts recording audio on the leg. Supports multiple formats and storage options (S3 / HTTPS).
- <StopRecording> Stops an active recording and finalizes the recording file.
E. Streaming & Real-Time Integrations
Used for voice bots, real-time analytics, and AI processing.
- <StartStream> Streams live audio from the leg to a WebSocket endpoint.Supports unidirectional and bidirectional streaming.
- <StopStream> Stops an active audio stream.
F. Control & Event Routing
Actions that affect control ownership and event delivery.
- <Refer> Updates the external event delivery endpoint (gRPC) for the leg.Used when control needs to be transferred between systems.
Quick Summary Table
Category | Actions |
|---|---|
Media & Interaction | StartPlay, StopPlay, Say, StopSay, PlaySequence, Gather, SendDigits |
Call State Control | Answer, Hangup, Mute, UnMute, Hold, UnHold |
Connectivity & Routing | Dial, JoinBridge, LeaveBridge, StartMonitoring, StopMonitoring |
Recording | StartRecording, StopRecording |
Streaming | StartStream, StopStream |
Control & Event Routing | Refer |