Integrating with Telephony

Learn how to integrate OpenAI voice agents with telephony systems using SIP.

Using LiveKit, it's easy to integrate OpenAI voice agents with telephony systems using SIP (Session Initiation Protocol). By connecting your agents to phone calls, you can enable users to interact with AI-powered voice assistants over traditional telephony networks.

Overview of SIP integration

SIP is a signaling protocol used for initiating, maintaining, and terminating realtime sessions that involve voice, video, and messaging applications. In the context of telephony integration with OpenAI voice agents, SIP allows you to bridge phone calls into LiveKit rooms where your agents can interact with callers.

How it works

  1. SIP Trunking: You'll require a SIP trunk with a provider like Twilio or Telnyx to obtain a phone number and handle call routing.
  2. Call Routing: Incoming or outgoing calls are routed through the SIP trunk into a dynamically generated LiveKit room.
  3. Agent Participation: Your OpenAI voice agent joins the LiveKit room as a participant.
  4. LiveKit Rooms: The LiveKit room acts as a bridge between the phone call and the agent, allowing them to interact in realtime. It also provides an intuitive backend API for transcriptions, recordings, moderation, and other features.

Getting started