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.
byo-sip-trunkTells Vapi how to reach Telxi.byo-phone-numberLinks your Telxi DID to that credential and an assistant.Architecture at a glance
Telxi connection details
Authentication methods
Username & password
Telxi authenticates each call with SIP credentials from portal.telxi.com → SIP trunks. Recommended for Vapi.
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).
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.
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
}'
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).
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
| Symptom | Likely cause | What to check |
|---|---|---|
401 Unauthorized on inbound | Signaling IPs not whitelisted | Provide all Vapi signaling IPs to support@telxi.com, or switch to Digest auth. |
| Outbound fails to authenticate | Wrong credentials | Re-copy the SIP username/password from portal.telxi.com → SIP trunks. |
| Inbound call never arrives | Origination URI wrong | Confirm Telxi forwards the DID to {number}@<credential_id>.sip.vapi.ai. |
| Calls routed to wrong account | Shared IP with IP-based auth | Use Digest auth, or a dedicated Telxi trunk URI. |
| Transfer fails | SIP REFER disabled | Enable SIP REFER on the Telxi trunk. |
Reference
- Vapi SIP trunking: docs.vapi.ai/advanced/sip/sip-trunk
- Vapi SIP networking & firewall: docs.vapi.ai/advanced/sip/sip-networking
- Troubleshoot SIP trunk credential errors: docs.vapi.ai/advanced/sip/troubleshoot-sip-trunk-credential-errors
- Telxi portal: portal.telxi.com