SIP Gateway Failed to Connect Call
# support
a
Hello Vapi Support Team, I am experiencing an issue with outbound calls through a SIP trunk integration with MySIPProvider. The calls are failing with the error: “sip-gateway-failed-to-connect-call”. Below are the steps I have taken and the details of the issue: Configuration Details 1. I created a SIP trunk credential as follows:
Copy code
{
  "provider": "byo-sip-trunk",
  "name": "MySIPProvider",
  "gateways": [
    {
      "provider": "byo-phone-number",
      "name": "Meu Número DirectCall",
      "number": "+551421098931",
      "credentialId": "7e657bf8-5cad-41d0-97be-cc861dc8085b",
      "numberE164CheckEnabled": false
    }
  ]
}
2. I associated the phone number provided by DirectCall:
Copy code
{
  "provider": "byo-phone-number",
  "name": "MySIPProvider",
  "number": "+551421098931",
  "credentialId": "<returned-credential-id>",
  "numberE164CheckEnabled": false
}
3. I attempted to make an outbound call using this phone number via the Vapi dashboard. Issue Encountered • The call failed with the error “sip-gateway-failed-to-connect-call”. • A 503 Service Unavailable response was captured by the MySIPProvider team on their end during the attempted connection. • The captured pcap indicates the issue occurred when communicating with the Vapi SIP server. Additional Details • IPs whitelisted on the provider’s side: 44.229.228.186, 44.238.177.138 • MySIPProvider gateway IP: 189.84.133.111 • Call ID: ff582065-1bf7-4f88-af59-e5771124723f Request for Assistance Could you please verify: 1. Whether there are any configuration issues on Vapi’s side regarding this SIP trunk setup? 2. If the IP ranges provided to MySIPProvider for whitelisting are sufficient? 3. Any additional logs or troubleshooting steps we can take to resolve the issue? Looking forward to your guidance to resolve this issue. Thank you
v
message has been deleted
@andmac Hello, Thank you for reaching out to VAPI Support with the details of the issue you're encountering. Let's address each of your concerns: 1. **Configuration Issues on Vapi's Side**: Based on the configuration details you've provided, your SIP trunk credential setup appears to be correct. However, we need to ensure that the
credentialId
you've used in the phone number association is the correct one returned after creating the SIP trunk credential. If there's any mismatch or typo, that could be a reason for the connection failure. 2. **IP Ranges for Whitelisting**: The IPs you've provided (44.229.228.186, 44.238.177.138) should typically be sufficient for whitelisting on MySIPProvider's side. However, it's important to confirm that these are the correct and current IP ranges that Vapi uses for SIP communication. There might be additional IPs that need to be whitelisted, or the existing ones might have changed. 3. **Additional Logs and Troubleshooting Steps**: To further investigate the issue, we would need to check the logs on our side for the call ID you've provided (916a2886-6ebd-4c45-812e-88819f1301fb). This will help us understand if there are any errors or anomalies during the call setup process. Additionally, verifying the network path between Vapi and MySIPProvider's gateway (189.84.133.111) could provide insights into any potential connectivity issues. To proceed with the investigation, I will need to check our internal logs for the specified call ID and verify the current IP ranges for SIP communication. If you have any further information or changes you've made since encountering the issue, please let me know so I can take that into account during the troubleshooting process. If you have any other questions or need further assistance, feel free to ask. We're here to help you resolve this issue as smoothly as possible. Thank you for your patience and cooperation.
You can continue this conversation by mentioning me in the message.
@User
s
@andmac Your SIP Proxy Server requires Proxy Authentication, which means authentication is required before proceeding from the VAPI IP (our SIP Server). Currently, we don't have the capability to send authentication credentials for the proxy server.
This missing authentication handling results in a failure, and when your SIP Server retries, it fails with a 503 Service Unavailable error.
Do let me know how can I help you further.
a
@Shubham Bajaj Thank you for your message. I’ve relayed the information to my provider, and they confirmed that the IPs you mentioned, 44.229.228.186 and 44.238.177.138, have been whitelisted. They also mentioned the following: "The IP-based routing is specifically designed to avoid the need for any authentication. When an INVITE comes from your IP, we will complete the request, and all incoming calls will be forwarded to the IPs associated with the number." Additionally, regarding the 503 error, they explained that it refers to "Service Unavailable." Could you please confirm if you are certain that the issue is related to authentication? If so, would it be possible for you to provide a PCAP from your side? This would help me determine if I need to open a new support request with my provider. https://cdn.discordapp.com/attachments/1324811251376848928/1325838999784521820/other-pcap?ex=677d3f4a&is=677bedca&hm=f8953279dfbb944c05fa12bea3d57dfa4fa97d5f6f6ab6f00f70f667fd81a125&
s
@andmac I am currently away from keyboard, allow me sometime to look into this.
@andmac I just checked with the team, you cannot send SIP requests to an IP address as those are blocked. Instead, you need to send requests to
sip.vapi.ai
and then it will work properly.
Do let me know how it goes.
a
Just wanted to give you a quick update — everything is working perfectly now with the integration. Thank you for your help and guidance.
6 Views