1. Overview

This document explains how to integrate Exotel PSTN calls with LiveKit SIP infrastructure. The integration allows incoming PSTN calls to be connected into a LiveKit room, where AI agents can join and handle the conversation in real time.


2. Architecture

  1. A PSTN call arrives at Exotel.

  2. Exotel forwards the call to the LiveKit SIP FQDN.

    • Example format: sip:xxxxxxx.sip.livekit.cloud (actual ID masked).

  3. LiveKit bridges the call into a LiveKit room.

  4. The agent joins the same room to handle the conversation.





3. FQDN Provisioning

  • You can provide the LiveKit FQDN and mobile DID by sending a request to hello@exotel.com

  • The support team will take care of configuring the mapping in Exotel.

How to Find the FQDN in LiveKit

  1. Log in to your LiveKit console.

  2. Navigate to Telephony → Configuration.

  3. Copy the SIP URL (FQDN).




4. Deploying the Agent

Customers are responsible for deploying their LiveKit Agent.

References

Steps

  1. Use the starter project or build a custom agent following the documentation.

  2. Deploy the agent on your infrastructure.

  3. Define a Dispatch Rule to connect incoming SIP calls to the correct agent room.

Reference: LiveKit Dispatch Rules







5. Security (Optional)

For enhanced security, you may share with the customer the following:

  • SIP Signaling IP addresses

  • Media IP addresses

This allows the customer to configure their SIP trunk to only accept traffic from LiveKit infrastructure.