Skip to main content

Why LiveKit Is Used

LiveKit is the realtime audio layer. It provides:
  • Rooms for each call
  • Audio transport between the phone participant and the AI agent
  • Agent job dispatch through livekit-agents
  • SIP APIs for connecting phone calls
  • JWT-based access tokens for browser/local testing

Room Naming

Outbound lead calls use:
The agent reads the room name to understand which lead is being called.

SIP Participant Creation

The scheduler calls LiveKit’s SIP API:
If VOBIZ_PHONE_NUMBER is configured, it is also passed as sip_number.

Agent Runtime

Both agents are LiveKit agents:
  • agent.py: Sarvam STT + LLM + TTS pipeline
  • agent_realtime.py: OpenAI Realtime session
Each agent joins the LiveKit room, listens for the SIP participant, conducts the conversation, and saves the result to PostgreSQL.

Token Server

token_server.py exposes:
It returns:
This is mainly for local browser testing, not the production outbound calling path.

Required Environment