Search on this blog

Search on this blog

Telxi · SIP Trunk Integration

Connecting your Telxi SIP Trunk to LiveKit

Route PSTN calls between your Telxi numbers and LiveKit voice AI agents — inbound and outbound.

This guide shows how to connect a Telxi SIP trunk to LiveKit so your voice AI agents can place and receive calls over the PSTN using your Telxi numbers. It covers both authentication methods supported by Telxi — IP-based and Digest (username/password).

Inbound trunkAccepts incoming calls from Telxi.
Dispatch ruleRoutes calls into a LiveKit room with your agent.
Outbound trunkPlaces outgoing calls through Telxi.

Architecture at a glance

Caller / PSTN Any phone Telxi SIP Trunk sip.telxi.com port 5060 LiveKit *.sip.livekit.cloud Inbound · Dispatch · Outbound AI Agent Your voice app Inbound — incoming calls reach your agent Outbound — your agent dials out via Telxi
End-to-end call flow: the PSTN connects through your Telxi trunk to LiveKit, which routes the call to your agent.

Telxi connection details

SIP host
sip.telxi.com
Port
5060
Transport
UDP / TCP
Auth method
IP-based or Digest authentication

Authentication methods

IP-based You email the LiveKit signaling IP to support@telxi.com Telxi whitelists it. No username/password. You configure only: sip.telxi.com : 5060 Digest Sign in to the Telxi portal: portal.telxi.com SIP trunks → select trunk → copy SIP username + SIP password into the LiveKit outbound trunk.
Pick one method per trunk. Digest is the quickest to self-serve; IP-based needs a one-time whitelist by Telxi support.
IP-based

Authorise by source IP

Telxi authorises traffic by source IP. Provide the LiveKit signaling IP/endpoint that will send calls. No username or password is used.

Digest

Username & password

Telxi authenticates each call with SIP credentials. Find them at portal.telxi.com → SIP trunks, select your trunk, and copy the SIP username and password.

Prerequisites

  • A LiveKit Cloud project (cloud.livekit.io).
  • An active Telxi SIP trunk and at least one DID (phone number) on your Telxi account.
  • Your authentication credentials, or the IP/endpoint you'll register with Telxi.

Find your LiveKit SIP endpoint

For inbound calls (and for IP-based authorisation), Telxi needs to know where to send your calls. This is your LiveKit SIP endpoint — your SIP URI without the sip: prefix.

Find it using the LiveKit CLI:

lk project list --json

Take the ProjectId (for example p_vjnxecm0tjk), remove the p_ prefix, and build the URI:

sip:{subdomain}.sip.livekit.cloud

So project p_vjnxecm0tjk has the SIP endpoint vjnxecm0tjk.sip.livekit.cloud. You can also find the SIP URI on the Project settings page in the LiveKit dashboard.

1

Get your trunk details from Telxi

What you do on the Telxi side depends on the authentication method:

  • Digest: Sign in at portal.telxi.com → SIP trunks, select your trunk, and copy the SIP username and SIP password. Nothing else is configured on the Telxi side — you'll enter these on the LiveKit outbound trunk in Step 4.
  • IP-based: Send the public signaling IP that LiveKit will use to support@telxi.com to be whitelisted. Telxi configures the whitelist for you; you then only need the SIP host (sip.telxi.com) and port (5060) when creating the LiveKit outbound trunk.

For inbound calls, give Telxi support the destination to route your DID to — your LiveKit SIP endpoint (e.g. vjnxecm0tjk.sip.livekit.cloud). Telxi sets up the routing on their side.

2

Create an inbound trunk in LiveKit

  1. In the LiveKit dashboard, go to Telephony → SIP trunks.
  2. Select Create new trunk, then open the JSON editor tab.
  3. Set Trunk direction to Inbound.
  4. Paste the following, replacing the number with your Telxi DID in E.164 format:
{
  "name": "Telxi inbound trunk",
  "numbers": ["+1XXXXXXXXXX"]
}

Select Create.

3

Create a dispatch rule

A dispatch rule routes each inbound call into a LiveKit room where your agent answers.

  1. Go to Telephony → Dispatch rules → Create new dispatch rule.
  2. Open the JSON editor and paste:
{
  "name": "Telxi dispatch rule",
  "rule": {
    "dispatchRuleIndividual": {
      "roomPrefix": "call-"
    }
  }
}

Select Create. Each caller is now placed into a unique room prefixed with call-.

4

Create an outbound trunk in LiveKit

This trunk lets LiveKit place outgoing calls through Telxi.

  1. Go to Telephony → SIP trunks → Create new trunk → JSON editor.
  2. Set Trunk direction to Outbound.

Digest authentication

Username/password from the Telxi portal:

{
  "name": "Telxi outbound trunk",
  "address": "sip.telxi.com",
  "numbers": ["+1XXXXXXXXXX"],
  "authUsername": "<SIP username>",
  "authPassword": "<SIP password>"
}

IP-based authentication

Omit credentials; Telxi authorises by your LiveKit IP:

{
  "name": "Telxi outbound trunk",
  "address": "sip.telxi.com",
  "numbers": ["+1XXXXXXXXXX"]
}

Select Create. You are now ready to place outgoing calls.

Tip: To encrypt signaling and media, enable secure trunking (TLS + SRTP) by setting transport to TLS and media_encryption on the trunk. Confirm with Telxi that TLS/SRTP is enabled on your trunk first.
5

Test

  • Inbound: Call your Telxi DID from any phone. The call should land in a LiveKit room (prefix call-) and reach your agent. Verify the room, SIP participant, and logs in the dashboard.
  • Outbound: Trigger an outbound call through your agent or the LiveKit API to confirm calls route through Telxi.

Troubleshooting

SymptomLikely causeWhat to check
Inbound call doesn't connectOrigination not pointed at LiveKitConfirm the Telxi trunk routes the DID to your *.sip.livekit.cloud endpoint on port 5060.
401 Unauthorized on outboundWrong credentials / IP not allowedRe-check the SIP username/password from the portal, or that your LiveKit IP is whitelisted (via support@telxi.com).
Call connects but no audioMedia/codec or NAT issueConfirm a common codec (G.711) and, if using TLS, that SRTP is enabled on both sides.
Caller ID rejectedNumber formatUse E.164 (+country code) and confirm the DID belongs to your Telxi trunk.

Reference