Unable to create BYO-SIP credential
# support
g
Hi team, I’m trying to create a SIP trunk credential with the following payload:
Copy code
{
  "provider": "byo-sip-trunk",
  "name": "Telephony TRUNK",
  "gateways": [{ "ip": "XXXX.telephony.co" }],
  "outboundAuthenticationPlan": {
    "authUsername": "123", //this is an ext from a number
    "authPassword": "<Password>"
  }
}
But I get this error:
Copy code
{
  "message": "Couldn't validate SIP trunk credential. SIP gateway creation failed.",
  "error": "Bad Request",
  "statusCode": 400
}
Here are the clients SIP endpoint sent to us: > Domain/Proxy: ClientCompany > Outbound Proxy: xxxxx.telephony.co > Username: 123 > Password: The telephony also have provisioned us a phone number so thats what we're planning to add to VAPI Here’s what I’ve already tried: - Switched "gateways.ip" to the provider’s literal IP address instead of domain. - Confirmed that Vapi's IPs (44.229.228.186, 44.238.177.138) are allow-listed in our SIP provider. - adding
"inboundEnabled": false
inside "gateways" works on adding credentials but our solution require inbound calling. Could you help verify what might be wrong or if there’s an additional required field? Thanks! @Vapi Support Bot https://cdn.discordapp.com/attachments/1415509316248797245/1415509317020291134/image.png?ex=68c37748&is=68c225c8&hm=4499e65b9a72c6b0befadc2ab238e33b1f5e8137d5147426e7c93bd963bd1d45&
v
Thank you for the detailed info. Based on the error and your payload, some SIP providers require a
sipRegisterPlan
(with a
realm
) or other fields like
techPrefix
or
sipDiversionHeader
for successful validation ([Vapi docs](https://docs.vapi.ai/advanced/sip/sip-trunk), [changelog](https://docs.vapi.ai/changelog/2024/11/21)). Could you confirm if your SIP provider requires SIP registration (i.e., REGISTER method), and if so, have you tried adding a
sipRegisterPlan
with the correct
realm
to your
outboundAuthenticationPlan
?
This detail will help narrow down the cause of the 400 error. Sources: - [SIP Trunking Guide – Vapi Docs](https://docs.vapi.ai/advanced/sip/sip-trunk) - [Changelog: Enhanced BYO SIP Trunk Configuration](https://docs.vapi.ai/changelog/2024/11/21)
g
I have also tried adding this in the outboundAuthenticationPlan
Copy code
"sipRegisterPlan": {
    "domain": "ClientCompany",
    "username": "123",
    "realm": "ClientCompany"
}
But the return is still the same https://cdn.discordapp.com/attachments/1415509316248797245/1415510909295525918/image.png?ex=68c378c3&is=68c22743&hm=4a144604c645ceaeee8de209b3b43bd92f98eec9d2ae549f6afbf986fa102fe1&
c
Hello, Here are the key points for setting up a custom SIP trunk: 1. Try this complete configuration format:
Copy code
{
  "provider": "byo-sip-trunk",
  "name": "Telephony TRUNK",
  "gateways": [
    {
      "ip": "XXXX.telephony.co",
      "inboundEnabled": true,
      "port": 5060
    }
  ],
  "outboundAuthenticationPlan": {
    "authUsername": "123",
    "authPassword": "<Password>",
    "sipRegisterPlan": {
      "realm": "XXXX.telephony.co",
      "domain": "XXXX.telephony.co",
      "username": "123"
    }
  },
  "outboundLeadingPlusEnabled": true
}
Key points to verify: 1. Make sure
realm
matches your SIP provider's domain 2. Include port 5060 explicitly 3. Set
outboundLeadingPlusEnabled
if your provider requires E.164 format 4. When using
inboundEnabled: true
, ensure: - All Vapi IPs are whitelisted - Your provider's signaling IPs are configured correctly - Proper inbound routing is set up on provider side Common issues: - Realm mismatch between configuration and provider - Missing or incorrect port specification - Authentication credentials format - Incorrect gateway domain/IP format If this doesn’t resolve the issue, please let us know and we’ll be happy to step in and assist further.
g
The realm provided was "ClientCompany" there's no dot or other URL , its just a string I tried putting realm and domain as the URL given by the telephony and it still return 400 couldn't register.
c
For an inbound only SIP trunk you will need to configure the direct IP address of the provider instead of the resolved domain name.
g
Hey @Kyle, yes I have continued our conversation on email. Thankyou
c
Sounds good thank you!
2 Views