Calls API Essentials
Audio streaming requires an active call. Here are the key operations you’ll need.Make an Outbound Call
from (your Plivo number), to (destination), answer_url (returns XML with <Stream> element)
answer_url should return XML to start audio streaming:
Handle Incoming Calls
Configure your Plivo number’s Answer URL in the console. Plivo POSTs call details (CallUUID, From, To, Direction) to your server, which returns XML to start streaming.
Hang Up a Call
Transfer a Call
Redirect an active call to fetch new XML mid-call:Audio Streams API
The Audio Streams API lets you receive raw audio from active calls over a WebSocket connection in near real-time. Use it for real-time transcription, voice AI, call analytics, or custom audio processing.API Endpoint
The Audio Stream Object
Example Response
Start an Audio Stream
Initiate streaming for an active call.Parameters
Audio Formats
When
bidirectional is true, audio_track cannot be outbound or both.Start a Stream with Noise Cancellation
Retrieve an Audio Stream
Get details of a specific audio stream.List All Audio Streams
Get all audio streams for a call.Response
Stop a Specific Audio Stream
Stop streaming for a specific stream.Stop All Audio Streams
Stop all active streams on a call.Bidirectional Streaming
Whenbidirectional=true, your WebSocket server can send audio back to the call.
Sending Audio to Call
Send a JSON message to the WebSocket:Status Callback Events
Notifications sent tostatus_callback_url:
Related
- AudioStream XML - Start streams via XML
- Calls API - Call management