Issue with SIP Trunk Integration – Call Initiated ...
# support
b
Hello, I am located in Bulgaria and trying to connect my SIP account to Vapi.ai following the official documentation: πŸ”— Vapi SIP Trunk Docs My Setup: I have built a small application that should initiate an outbound call from my SIP number to a client’s phone number. The AI assistant is supposed to say a few words and then hang up. Integration Details: Using Ringostat as my SIP provider (bg1.ringostat.com) Integrated with Vapi.ai REST API Phone numbers are in E.164 format SIP Trunk is configured with the correct credentials A phone number is associated The outbound call is successfully initiated via API The Problem: The API responds successfully, but the call is never actually received on the customer’s phone (I am testing as the customer). I will attach screenshots from my Vapi.ai call logs and my setup configuration for reference. Any help would be greatly appreciated! I can provide some code if needed. Thanks! πŸ™ https://cdn.discordapp.com/attachments/1347548407102832702/1347548407249768468/Screen1.JPG?ex=67cc39c0&is=67cae840&hm=d005b0a7aaf16f871590b03a7f2f4050f37880a71523c9a6f8ebab483260fef0&
v
Hi there! πŸ‘‹ I see you're having trouble with your SIP Trunk integration where calls are initiated but not received, with the error "SIP gateway failed to connect". Let me help troubleshoot this issue. Based on the information you've provided and the error message, here are some common causes and potential solutions: 1. SIP Trunk Configuration Issues - Verify that your SIP trunk configuration includes the correct Credential ID, IP/Port, and Authentication details - Ensure SIP Register is properly enabled with the appropriate Domain and Realm - Check that your configuration looks similar to this format:
Copy code
json
   {
     "provider": "byo-sip-trunk",
     "name": "BYOC Trunk",
     "credentials": {
       "username": "YourUsername",
       "password": "YourPassword"
     },
     "gateways": [
       {
         "ip": "YourStaticIP",
         "port": YourStaticPort,
         "netmask": 32,
         "inboundEnabled": true,
         "outboundEnabled": true,
         "outboundProtocol": "udp"
       }
     ]
   }
2. Network and Firewall Issues - Ensure your network settings allow SIP protocol traffic - Verify that the necessary ports are open for SIP communication - Check if there are any firewall rules blocking the connection [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1336713212233515089) 3. E.164 Number Formatting - Confirm that your phone numbers are correctly formatted in E.164 format with the '+' followed by country code - There can be issues with international calls if they aren't correctly configured with the right country code [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1336921030433833060) 4. SIP REFER Message Handling
- Ensure your SIP provider (Ringostat) is configured to handle SIP REFER messages, which are commonly used by Vapi for call transfers [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1333747605628391434) 5. Latency Issues - Since you're in Bulgaria, check if there are any latency issues caused by routing through distant data centers - Verify the routing through the nearest data centers [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1333747605628391434) 6. Provider Compatibility - Verify if Ringostat supports all the necessary SIP standards and configurations required by Vapi [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1329035928873996298) I'd recommend checking your SIP trunk configuration first, as misconfiguration is one of the most common causes of this error. If you've verified all these points and are still experiencing issues, I'd be happy to help further if you can provide more details about your configuration. Sources: - [Discord Source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333747605628391434) - [Discord Source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336713212233515089) - [Discord Source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336921030433833060) - [Discord Source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1329035928873996298)
Hi there! πŸ‘‹ I see you're having trouble with your SIP Trunk integration where calls are initiated but not received. Let me help troubleshoot this "SIP gateway failed to connect" error. ### Common Causes for This Error Based on the error message in your screenshot, here are some potential issues: 1. **SIP Trunk Configuration Issues**: - Verify that your SIP trunk settings include the correct Credential ID, IP/Port, and Authentication details - Ensure SIP Register is enabled with the proper Domain and Realm - Check that your
sipUri
attribute is correctly formatted and points to your Ringostat address (bg1.ringostat.com) [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1333747605628391434) 2. **Network Configuration**: - Verify your network settings allow SIP protocol traffic through firewalls and NAT configurations - Ensure your SIP server is configured to accept Vapi's incoming communication [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1336713212233515089) ### Troubleshooting Steps 1. **Review SIP Trunk Configuration**: - Validate your SIP trunk settings, especially the
sipUri
, IP/Port, and authentication credentials - Make sure SIP Register is active with the necessary Domain and Realm information [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1333747605628391434) 2. **Check Network Settings**: - Ensure your network allows SIP protocol traffic - Configure firewalls/NATs to accommodate SIP messages [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1336713212233515089) 3. **Examine API Requests and Logs**: - Check the formatting of your API requests - Review any available logs for additional error details [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1336432457943351358) 4. **Test Alternative Numbers**:
- Try calling a different phone number to determine if the issue is specific to one number [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1336432457943351358) While I don't have Ringostat-specific configuration details, a typical SIP trunk configuration JSON might look like:
Copy code
json
{
  "provider": "byo-sip-trunk",
  "name": "My SIP Trunk",
  "gateway": {
    "ip": "bg1.ringostat.com",
    "port": YourPort,
    "netmask": 32,
    "inboundEnabled": true,
    "outboundEnabled": true
  },
  "credentials": {
    "username": "YourUsername",
    "password": "YourPassword"
  }
}
Let me know if you've tried these steps or if you need more specific guidance! πŸ™‚ Sources: - [Common Causes of "SIP gateway failed to connect" errors in Vapi.ai SIP Trunk integrations](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333747605628391434) - [How should Ringostat SIP provider settings be configured for successful integration with Vapi.ai REST API](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336713212233515089) - [What troubleshooting steps does Vapi.ai recommend for outbound calls that are initiated via API but not received by the customer](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336432457943351358)
i
Where can I obtain the IP address ranges used by VAPI for communication so that I can configure them in the SIP provider, which strictly enforces IP address restrictions?
n
@IliaDobrev There might be several reasons why this interconnect doesn't work - namely, ringostat security restrictions or a specific "REGISTER/INVITE" policy that is enforced on all accounts. If you would like, you can DM me and I'll be happy to have a look with you at the matter. Over the past 8 weeks, I've helped multiple VAPI customers resolve similar issues by integrating Cloudonix as a programmable Switching platform to resolve these issues - but let's have a look and maybe even write a proper document about it πŸ™‚
s
@BeetleJuice could you share the call ID so I could take a look!! what could have gone wrong.
b
Hi there @Shubham Bajaj . Thank you for the support. Sure, here are a few call ID`s from the log... b16ad6fd-a5ea-496d-b715-85944f20f8cf 450e3814-0791-46c4-a628-802d9fcd8373 b4cdd922-7942-4434-badd-0118cb3a1fb4
Hello @Nir S (CEO/Founder @Cloudonix) Thank you for the offered help. Let Shubham check if he can identify the issue, and if he doesn't succeed, I will contact you so we can try. πŸ™‚
s
@BeetleJuice looking into it.
2 Views