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).
Architecture at a glance
Telxi connection details
Authentication methods
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.
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.
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.
Create an inbound trunk in LiveKit
- In the LiveKit dashboard, go to Telephony → SIP trunks.
- Select Create new trunk, then open the JSON editor tab.
- Set Trunk direction to Inbound.
- Paste the following, replacing the number with your Telxi DID in E.164 format:
{
"name": "Telxi inbound trunk",
"numbers": ["+1XXXXXXXXXX"]
}
Select Create.
Create a dispatch rule
A dispatch rule routes each inbound call into a LiveKit room where your agent answers.
- Go to Telephony → Dispatch rules → Create new dispatch rule.
- 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-.
Create an outbound trunk in LiveKit
This trunk lets LiveKit place outgoing calls through Telxi.
- Go to Telephony → SIP trunks → Create new trunk → JSON editor.
- 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.
transport to TLS and media_encryption on the trunk. Confirm with Telxi that TLS/SRTP is enabled on your trunk first.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
| Symptom | Likely cause | What to check |
|---|---|---|
| Inbound call doesn't connect | Origination not pointed at LiveKit | Confirm the Telxi trunk routes the DID to your *.sip.livekit.cloud endpoint on port 5060. |
401 Unauthorized on outbound | Wrong credentials / IP not allowed | Re-check the SIP username/password from the portal, or that your LiveKit IP is whitelisted (via support@telxi.com). |
| Call connects but no audio | Media/codec or NAT issue | Confirm a common codec (G.711) and, if using TLS, that SRTP is enabled on both sides. |
| Caller ID rejected | Number format | Use E.164 (+country code) and confirm the DID belongs to your Telxi trunk. |
Reference
- LiveKit SIP trunk setup: docs.livekit.io/telephony/start/sip-trunk-setup
- LiveKit inbound trunks: docs.livekit.io/sip/trunk-inbound
- LiveKit outbound trunks: docs.livekit.io/sip/trunk-outbound
- LiveKit dispatch rules: docs.livekit.io/telephony/accepting-calls/dispatch-rule
- Telxi portal: portal.telxi.com