Search on this blog

Search on this blog

Telxi · SIP Trunk Integration

Connecting your Telxi SIP Trunk to Vapi

Bring your Telxi numbers to Vapi assistants using Vapi's Custom BYO SIP Trunk — inbound and outbound.

This guide shows how to connect a Telxi SIP trunk to Vapi using Vapi's Custom BYO (Bring Your Own) SIP Trunk integration, so your assistants can make and receive calls over the PSTN with your Telxi numbers. It covers both authentication methods supported by Telxi — Digest (username/password) and IP-based.

SIP trunk credential byo-sip-trunkTells Vapi how to reach Telxi.
Phone number byo-phone-numberLinks your Telxi DID to that credential and an assistant.

Architecture at a glance

Caller / PSTN Any phone Telxi SIP Trunk sip.telxi.com port 5060 Vapi <id>.sip.vapi.ai BYO SIP trunk credential Assistant Your voice agent Inbound — Telxi forwards your DID to the Vapi SIP URI Outbound — Vapi dials out through your Telxi trunk
The BYO SIP trunk credential connects Vapi to Telxi; a phone-number resource ties your DID to an assistant.

Telxi connection details

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

Authentication methods

Digest — recommended Sign in to the Telxi portal: portal.telxi.com SIP trunks → select trunk → copy SIP username + SIP password into the Vapi credential. IP-based Email ALL Vapi signaling IPs to support@telxi.com Telxi whitelists them. Reliable only on a dedicated trunk — Vapi runs on shared infrastructure.
Digest is recommended for Vapi. IP-based is only reliable when your Telxi trunk is dedicated to you.
Digest

Username & password

Telxi authenticates each call with SIP credentials from portal.telxi.com → SIP trunks. Recommended for Vapi.

IP-based

Authorise by source IP

Telxi authorises by source IP. You must provide all of Vapi's signaling IPs to whitelist; otherwise inbound calls fail with 401 Unauthorized.

Prerequisites

  • A Vapi account and your Vapi private API key.
  • An active Telxi SIP trunk with at least one DID on your Telxi account.
  • Your SIP username/password (Digest), or Vapi's signaling IPs to whitelist (IP-based).
1

Get your trunk details from Telxi

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

  • Digest (recommended): 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 in the Vapi credential in Step 2.
  • IP-based: Send all of Vapi's public signaling IPs 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 Vapi credential.

For inbound calls, give Telxi support the destination to route your DID to — your Vapi SIP URI in the form {phoneNumber}@<credential_id>.sip.vapi.ai (you'll have the credential ID after Step 2). Telxi sets up the routing on their side.

2

Create a SIP trunk credential in Vapi

Create a credential of type byo-sip-trunk pointing at sip.telxi.com.

Digest authentication

curl -X POST "https://api.vapi.ai/credential" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
  -d '{
    "provider": "byo-sip-trunk",
    "name": "Telxi Trunk",
    "gateways": [{
      "ip": "sip.telxi.com",
      "port": 5060,
      "inboundEnabled": true
    }],
    "outboundLeadingPlusEnabled": true,
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_SIP_USERNAME",
      "authPassword": "YOUR_SIP_PASSWORD"
    }
  }'

IP-based authentication

Omit outboundAuthenticationPlan; Telxi authorises by Vapi's source IP:

curl -X POST "https://api.vapi.ai/credential" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
  -d '{
    "provider": "byo-sip-trunk",
    "name": "Telxi Trunk",
    "gateways": [{
      "ip": "sip.telxi.com",
      "port": 5060,
      "inboundEnabled": true
    }],
    "outboundLeadingPlusEnabled": true
  }'
Save the returned Credential ID — you'll need it in the next step and for inbound routing.
3

Associate your Telxi number with the trunk

Link your Telxi DID to the credential by creating a phone-number resource:

curl -X POST "https://api.vapi.ai/phone-number" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
  -d '{
    "provider": "byo-phone-number",
    "name": "Telxi Number",
    "number": "1XXXXXXXXXX",
    "numberE164CheckEnabled": false,
    "credentialId": "YOUR_CREDENTIAL_ID"
  }'

Note the returned Phone Number ID for test calls.

Inbound routing: Telxi routes incoming calls for this DID to your Vapi SIP URI in the form {phoneNumber}@<credential_id>.sip.vapi.ai — for example 1XXXXXXXXXX@a1b2c3d4....sip.vapi.ai. Provide this URI to Telxi support (see Step 1).

4

Test

Outbound call (via API or the Vapi dashboard):

curl -X POST "https://api.vapi.ai/call/phone" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
  -d '{
    "assistantId": "YOUR_ASSISTANT_ID",
    "customer": { "number": "1XXXXXXXXXX", "numberE164CheckEnabled": false },
    "phoneNumberId": "YOUR_PHONE_NUMBER_ID"
  }'

Inbound call: Dial your Telxi DID from any external line. The call should reach the assistant assigned to that number.

Call transfer (SIP REFER)

To transfer a live call to another number, use a transferCall tool with a SIP destination pointed at Telxi:

{
  "type": "transferCall",
  "destinations": [
    {
      "type": "sip",
      "sipUri": "sip:1XXXXXXXXXX@sip.telxi.com"
    }
  ]
}

Some providers require E.164 format in the URI (e.g. sip:+1XXXXXXXXXX@sip.telxi.com). Confirm that SIP REFER is enabled on your Telxi trunk.

Troubleshooting

SymptomLikely causeWhat to check
401 Unauthorized on inboundSignaling IPs not whitelistedProvide all Vapi signaling IPs to support@telxi.com, or switch to Digest auth.
Outbound fails to authenticateWrong credentialsRe-copy the SIP username/password from portal.telxi.com → SIP trunks.
Inbound call never arrivesOrigination URI wrongConfirm Telxi forwards the DID to {number}@<credential_id>.sip.vapi.ai.
Calls routed to wrong accountShared IP with IP-based authUse Digest auth, or a dedicated Telxi trunk URI.
Transfer failsSIP REFER disabledEnable SIP REFER on the Telxi trunk.

Reference