CANNOT CREATE TELNYX SIP TRUNK CREDENTIALS IN VAPI...
# support
m
I'm experiencing an issue creating a SIP trunk credentials with Telnyx on my account (Org ID: 339cafe4-8428-482a-9987-c5d5e5be36f5). Problem: When I try to create a SIP trunk credentials with both "Allow inbound calls" and "Allow outbound calls" enabled, I get the error: "Failed to create SIP trunk credentials." What I discovered: - When I DISABLE "Allow inbound calls" → trunk creates successfully - When I ENABLE "Allow inbound calls" → creation fails Additional context: - I have another Vapi account where the EXACT same Telnyx configuration works perfectly with both inbound and outbound calls enabled - Telnyx side is configured identically (credentials authentication, FQDN: sip.vapi.ai:5060, proper inbound routing) - The issue only occurs on this specific Vapi account - account age: 1.5+ years Could you please check if there's an account-level restriction or configuration issue preventing inbound SIP trunk creation?
c
Hi Marcello, To integrate your Telnyx SIP trunk with Vapi, follow these steps: 1. **Create SIP Trunk Credential**:Use the Vapi API to create a SIP trunk credential:
Copy code
bash
   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": "Telnyx Trunk", 
     "gateways": [ 
       { "ip": "sip.telnyx.com", "inboundEnabled": false } 
     ], 
     "outboundAuthenticationPlan": { 
       "authUsername": "YOUR_SIP_USERNAME", 
       "authPassword": "YOUR_SIP_PASSWORD",
       "sipRegisterPlan": { "realm": "sip.telnyx.com" } 
     } 
   }'
Replace
YOUR_VAPI_PRIVATE_KEY
,
YOUR_SIP_USERNAME
, and
YOUR_SIP_PASSWORD
with your credentials. 2. **Configure Telnyx Account**:Go to the [Telnyx Portal](https://portal.telnyx.com/#/outbound-profiles) to set up or select the outbound voice profile. Under "Connections and Applications," add Vapi. 3. Assign Numbers: - Navigate to the Vapi dashboard to assign your numbers. Go to the Phone Numbers tab and configure inbound and outbound settings for your voice assistant. 4. **Allowlist Vapi IPs**:Ensure all necessary IPs are allowlisted for SIP traffic:
44.229.228.186/32
and
44.238.177.138/32
. These steps should help establish the Telnyx SIP integration with Vapi. For additional details, refer to the [Telnyx SIP integration guide](https://docs.vapi.ai/advanced/sip/telnyx). If you encounter issues, checking your API request for correct credential inputs often resolves setup errors.
m
But why "inboundEnabled": false?
c
You cannot have inbound and outbound enabled on the same gateway. You can have two gateways configured for one BYO SIP trunk, but each gateway must only have one type: inbound or outbound.
Also I've been trying to solve some issue via mail, the topic of this mail is URGENT!!! Re: SIP Registration not maintained - trunk becomes unregistered. You have answered for one Mail Kyle but eversince that I haven't got any answer. That thread has been going for around 3 weeks now. Please help me resolve this issue. It's really annoying that you guys claim to respond to emails withing maximum 48h but it's not true cause I've been getting responses after one week... and all of your responses are funny, typical AI responses with solutions like "have you checked that id's are whitelisted"... Of course I have checked that, just saying if you plan to answer like that again... Please help
c
It can be configured for both directions if the static IP address of the trunk's domain is used. Telnyx can be special in this way since we largely support their integration. There was an issue with un-registering trunks that was fixed recently so if you continue to experience a disconnecting SIP trunk, let us know and we'll look at it.
2 Views