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
- SIP Trunking: You'll require a SIP trunk with a provider like Twilio or Telnyx to obtain a phone number and handle call routing.
- Call Routing: Incoming or outgoing calls are routed through the SIP trunk into a dynamically generated LiveKit room.
- Agent Participation: Your OpenAI voice agent joins the LiveKit room as a participant.
- 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
- Agent Setup: The best way to get started with telephony applications is by creating a Speech-to-Speech agent using the OpenAI Realtime API Quickstart guide.
- Inbound Calls: To handle inbound calls from users to your agent, follow the Inbound Calls via SIP guide.
- Outbound Calls: To enable your agent to make outbound calls to users, refer to the Outbound Calls via SIP guide.