Inbound Calls via SIP

Learn how to handle inbound phone calls with your LiveKit agent.

This guide explains how to set up inbound calls via SIP to your LiveKit agent. By integrating SIP trunking with your Agent, users can call a phone number and interact directly with your AI-powered voice assistant. This setup is great for things like:

  • Call centers: Automate customer interactions and reduce wait times.
  • Customer service: Provide immediate assistance through an AI agent.
  • Sales inquiries: Allow customers to ask questions about products or services.

Prerequisites

Steps

Handling incoming calls with your Agents is a straightforward process. As long as you have a SIP trunk that can add participants to a LiveKit room, your agent will automatically join the room and start interacting with the caller.

The following steps take you through the process of creating your SIP trunk and starting an agent that can handle inbound calls. At the end of the quickstart, you'll have an Agent that is capable of speaking to a user over the phone.

1. Set Up Your SIP Trunk

Follow the SIP Quickstart guide to configure your SIP trunk and phone number. This enables users to connect to LiveKit rooms via phone calls.

Specifically, ensure you complete the following in the SIP Quickstart guide:

2. Set Up Your Agent

Once you've finished the SIP quickstart guide, set up your agent using one of the Agent Quickstart guides. This creates the agent that interacts with callers.

You'll need to choose one of the following agent types:

Once your agent is running, it will automatically join any new room created by the dispatch rule you created when a call is received.

3. Test your Agent

With both the SIP trunk and the agent created, test your setup:

  1. Call the Phone Number: Dial the phone number associated with your SIP trunk.
  2. Agent Joins the Room: When your call is dispatched to a LiveKit room, your Agent will automatically join the room.
  3. Interact with the Agent: Engage in a conversation with your agent!