Error when creating new SIP trunk.
# support
n
I've tried registering my SIP with Vapi from my provider (DidsForSale) . No matter what I do, it will not register. I spoke with my telephony provider on the phone and we tried absolutely everything to make it work. It will still not connect.
v
Thank you for the details. To help troubleshoot your SIP trunk registration issue with Vapi, could you please share the exact error message or code you receive when attempting to register? This will help identify whether the problem is related to authentication, network configuration, or something else. Source: - [Vapi SIP Trunk Documentation](https://docs.vapi.ai/advanced/sip/sip-trunk)
n
Error Failed to create Sip Trunk Credential
n
When creating the trunk, trunk unchecking the "inbound calls" flag - if you enable both, the trunk failure fails. This is a well known bug that VAPI is still working on. If your trunk requires username/password registration for inbound and outbound services, you can try creating 2 different trunks - one for inbound and one for outbound. If you want to simplify your overall SIP setup - send me a DM.
c
Just to echo Nir here, you can setup a trunk with inbound and outbound functionality, but you must have two gateways. I will provide the configuration here: To configure the SIP Trunk, please follow the documentation for whitelisting the IP addresses: Then use this template as a guide to configuring both inbound and outbound gateways. The inbound gateway will need a static IP address and the outbound gateway will use the resolved domain name using UDP protocol:
Copy code
{
  "provider": "byo-sip-trunk",
  "name": "My SIP Trunk",
  "gateways": [
    {
      "ip": "sip.provider.com",
      "port": 5060,
      "outboundEnabled": true,
      "inboundEnabled": false,
      "outboundProtocol": "udp"
    },
    {
      "ip": "203.0.113.10",
      "port": 5060,
      "outboundEnabled": false,
      "inboundEnabled": true
    }
  ]
}
Once you have configured the SIP trunk, you will receive a value for credentialId. Save that and use it for the next step of assigning the SIP trunk to a phone number, as that is a required value for setting up the phone number. If you encounter any issues with the setup, please feel free to reach out.
d
Just seen this thread after having this error when trying to BYO Trunk Couldn't validate SIP trunk credential. SIP gateway creation failed. Is the only current solution really to ask my Voice Provider for another gateway and setup 2 trunks?....
Based off of all of the above, i was only able to make a Trunk with "outbound" config...
n
Technically speaking, that is a little "incorrect". If you use proper e.164 numbers for your voice agents (real international phone numbers) - you can create an "outbound trunk" only, as VAPI is designed to answer any call made to a valid E.164 numbers on its platform. As E.164 numbers are unique, VAPI knows which agent to activate accordingly.
d
Who are you replying to?
n
You
k
Outbound trunks are easier to configure than inbound. Inbound is still possible, but a lot more work for SIP Trunk depending on the provider (I currently have two inbound-only elastic SIP trunks with Telnyx and Twilio)
n
Well... this is why you should put Cloudonix as your connectivity layer. With Cloudonix, you'll have a single BYO Trunk with VAPI (or any other platform for that matter), and you manage the other connections via Cloudonix, that enable your wildcard routing, enhanced security capabilities and more.
d
Your whole comment was about using "correct e.164 numbers". I'm trying to setup an inbound trunk, the next step is to then assign individual e.164 numbers to each bot. Vapi have confirmed that my comment was correct.
n
Could be that I mis-understood your comment
g
Bro, you're a life saver with this tip
n
You should see my other bag of tricks 😆
2 Views