Sage Voice API Reference
API reference for Sage Voice WebSocket and HTTP endpoints. Base URL: https://sage-voice.devblocktechnologies.com
WebSocket Test Info
Sage Voice uses WebSocket connections for real-time voice communication. Browser WebSocket testing requires a dedicated WS client or the browser console.
Endpoints
WS/call/browser/:callId
Establish a direct browser-to-server WebSocket connection for real-time voice communication. Replace :callId with a unique call identifier.
WebSocket URL
wss://sage-voice.devblocktechnologies.com/call/browser/my-call-id
Messages (Client to Server)
// Audio chunk (binary)
Binary audio data (16-bit PCM, 16kHz)
// Control message (JSON)
{
"type": "control",
"action": "end_call" | "mute" | "unmute"
}Messages (Server to Client)
// Audio response (binary)
Binary audio data (16-bit PCM, 16kHz)
// Status message (JSON)
{
"type": "status",
"state": "connected" | "listening" | "speaking" | "disconnected"
}
// Error message (JSON)
{
"type": "error",
"code": "string",
"message": "string"
}WS/call/:callId (Twilio)
Twilio Media Streams WebSocket endpoint. Connect Twilio phone numbers to Sage Voice for PSTN voice calls. Uses Twilio's Media Streams protocol for bidirectional audio.
WebSocket URL
wss://sage-voice.devblocktechnologies.com/call/my-call-id
GET/
Health check endpoint. Returns the current status of the Sage Voice service.
Response
{
"status": "healthy",
"service": "sage-voice",
"version": "1.0.0"
}