Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Exotel AgentStream Voice Streaming API

Documented WebSocket (wss://) voice-streaming API. When a call reaches a Voicebot or Stream applet, Exotel opens a secure WebSocket to your endpoint and streams base64 linear-PCM audio in ~100 ms frames (connected/start/media/dtmf/mark/stop); the Voicebot applet is bidirectional so your server sends media/mark/clear back to speak to the caller and barge in. Exotel is the WebSocket client; you host the endpoint.

Exotel AgentStream Voice Streaming API is one of 6 APIs that Exotel publishes on the APIs.io network, described by an AsyncAPI event-driven specification.

Tagged areas include WebSocket, Voice Streaming, Voicebot, and Real Time. The published artifact set on APIs.io includes API documentation and an AsyncAPI specification.

This event API exposes 2 operations across 1 channel, and defines 9 schemas. It is described by AsyncAPI 2.6.0, at version 1.0.

The API connects through a single server, your-bot-host.example.com (wss).

2 operations 1 channels 9 schemas

Metadata

The identity and technical contract details declared by the specification.

Specification
AsyncAPI 2.6.0
API Version
1.0
Base URL
wss://your-bot-host.example.com
Resource Areas
1

Channels & Operations 2

Across 1 channel, the API surfaces 2 operations. Each is listed below with its action, channel, parameters, and response codes.

Channels 2
SUB
/
Messages Exotel sends to your server.
receiveFromExotel body
PUB
/
Messages your server sends back to Exotel (Voicebot applet only).
sendToExotel body

Messages & Schemas 9

The contract defines 9 schemas that model the data carried by its messages. Each schema is shown below with its type and property counts.

Connected
message
First frame after the socket opens.
Start
message
Sent once at stream start with call and media metadata.
MediaIn
message
A frame of caller audio (base64 linear PCM).
Dtmf
message
A DTMF keypress detected during the call.
MarkIn
message
Confirms previously sent audio has finished playing.
Stop
message
Sent when the stream ends.
MediaOut
message
A frame of audio to play to the caller (base64 PCM).
MarkOut
message
Label a point in your outbound audio stream.
Clear
message
Barge-in - discard queued outbound audio.

Specification

The full machine-readable AsyncAPI contract behind this narrative.

Source

exotel-asyncapi.yml Raw ↑

Other APIs Exotel publishes across the network.

Exotel Call Details API
Exotel Campaigns API
Exotel Numbers API
Exotel SMS API
Exotel Voice API