Legs API
...
Leg Actions
Categorized Overview
5 min
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
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.
