Bandwidth is a telecom carrier with a Programmable Voice API, and its media streaming feature is how a voice agent gets at the live audio of a phone call. A BXML verb tells Bandwidth to fork call audio to a WebSocket server you run; the verb is non-blocking, so the rest of the call flow continues while the stream runs in the background.
takes a destination WebSocket URI, an optional name, a tracks value of inbound, outbound, or both, a mode of unidirectional (default) or bidirectional, and a streamEventUrl webhook for lifecycle events. Over the socket your server receives start, media, and stop messages; media arrives as base64 PCMU/G711 at 8 kHz mono with a track name and sequence number. In bidirectional mode the server sends playAudio events with base64 audio (audio/pcmu or audio/pcm at 8, 16, or 24 kHz) and clear events to drop buffered audio, and the call stays open with or . A call supports up to four concurrent track streams, and a bidirectional stream on both tracks counts as two.
Bandwidth publishes reference integrations for OpenAI's Realtime API over this WebSocket and a community Pipecat serializer (pipecat-bandwidth). The same platform provides SMS, MMS, and RCS messaging, emergency calling, WebRTC, number management and porting, and connectors for contact-center and UCaaS systems such as Genesys Cloud, Microsoft Teams, and Zoom Phone.
Features
- StartStream BXML: forks live call audio to a WebSocket destination without blocking the call flow
- Track selection: stream inbound, outbound, or both tracks of a call
- Bidirectional mode: send playAudio and clear events to play synthesized speech back into the call
- Audio formats: PCMU at 8 kHz inbound; PCMU or PCM at 8, 16, or 24 kHz for playback
- Stream events: start, media, and stop messages plus an optional lifecycle webhook
- Concurrency limits: up to four track streams per call
- Reference integrations: OpenAI Realtime API example and a Pipecat frame serializer
- Wider platform: Voice API, messaging APIs, emergency calling, WebRTC, and phone-number tooling under one account