Skip to main content

Channels

VOICE CALLING

AI-powered inbound voice call agents via Twilio.

Setup

  1. Create a bot with type: "inbound_call"
  2. Configure Twilio credentials in Settings
  3. Set your Twilio phone number webhook to:
bash
https://api.callmissed.com/api/v1/webhooks/twilio/voice

Call Flow

bash
Incoming call → Twilio
  → POST /api/v1/webhooks/twilio/voice
  → Returns TwiML to open WebSocket stream
  → WebSocket /ws/call/{call_id} receives audio
  → Audio chunks → Sarvam STT → text
  → Text → Sarvam LLM → response
  → Response → Sarvam TTS → audio
  → Audio streamed back to caller

WebSocket Streaming

Connect to the voice WebSocket for real-time audio. Requires an API key:

bash
wss://api.callmissed.com/ws/call/{call_id}?api_key=cm_your_key

The WebSocket implements a full STT → LLM → TTS pipeline:

  1. Audio in — Twilio sends 8kHz mulaw audio chunks
  2. STT — Sarvam saaras:v3 transcribes in real-time
  3. LLM — Generates response using bot's system prompt + conversation history
  4. TTS — Sarvam bulbul:v3 synthesizes speech (MP3 at 24kHz)
  5. Audio out — Streamed back to the caller

LLM and TTS run concurrently for minimum latency — audio playback begins while the LLM is still generating.

Outbound Calling

Outbound calling (type: "outbound_call") is available as a bot type. Configure Twilio credentials and use the bot to initiate outbound calls.

Was this page helpful?