SIP trunking from cloudtalk.io to VAPI
# support
a
Hi, I tried making an inbound voice agent that I can call using SIP and cloudtalk.io I've set up SIP trunking in VAPI, with authentication (not shared here), and have been in contact with Cloudtalk's support for help on their side. It should be set up properly but it still doesn't catch when I call the agent, my Cloudtalk is rings instead of the agent picking up the phone. Has anyone set it up successfully before? Or do you have any ideas of what I can try? Thanks in advance! https://cdn.discordapp.com/attachments/1359221669344051210/1359221669817880878/Screenshot_2025-04-08_at_19.41.04.png?ex=67f6b153&is=67f55fd3&hm=ad800f4e831ac02c64adc25aac9a48bfc99cbb6498423fcd603c6a1ff8b87026&
v
Hi there! 👋 I see you're having trouble with SIP trunking between Cloudtalk.io and VAPI. While I don't have specific information about anyone who has successfully set this up before, I can definitely help with some troubleshooting steps and configuration guidance. Based on the information you've shared, here are some things to check: ### VAPI SIP Settings Make sure you're using the correct VAPI SIP endpoint: - The SIP endpoint for VAPI should be
sip.vapi.ai
- Transport protocol should be UDP - Port is typically 5060 (which matches your Cloudtalk setting) According to [VAPI documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1329143416386355270), you must send inbound requests to
sip.vapi.ai
rather than directly to IP addresses. ### Common Issues to Check 1. **SIP URI Configuration**: Make sure the
sipUri
is correctly formatted in your VAPI settings. If outbound calls remain in "queued" status, the SIP INVITEs might not be reaching your PBX according to [troubleshooting documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333747605628391434). 2. **Network/Firewall Configuration**: Ensure your firewall allows SIP traffic and there are no blocks on the ports used by SIP. NAT traversal issues might prevent SIP messages from reaching the PBX as mentioned in [VAPI documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334919245468799007). 3. **SIP REFER Handling**: Confirm that your system is set up to handle SIP REFER messages, as VAPI uses SIP REFER to transfer calls according to [VAPI's SIP documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336713212233515089).
4. **Authentication**: Double-check that the credentials provided to VAPI are correct if your SIP endpoint requires authentication. VAPI expects authentication credentials using the Authorization header in SIP, with your SIP username and a password (anything except "test") as noted in [VAPI's authentication documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334238882660618250). 5. **Codec Compatibility**: Ensure that the codecs used by VAPI are supported by your SIP endpoint. A common order of priority is PCMU, PCMA, and then G729. ### Troubleshooting Checklist Based on [VAPI's troubleshooting guide](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336713212233515089), verify: - Network configuration allows SIP protocol traffic - SIP server/PBX is configured to accept calls from VAPI's servers - Credentials are correct if authentication is required - Codec compatibility between systems - Review logs for error messages that might indicate the issue Is there any specific error message you're seeing, or could you share more details about your VAPI configuration that I might be able to help troubleshoot further? Sources: - [VAPI SIP endpoint information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1329143416386355270) - [SIP trunking troubleshooting guide](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336713212233515089) - [SIP URI configuration details](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333747605628391434) - [Network/firewall configuration information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334919245468799007) - [Authentication requirements documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334238882660618250)
n
Please DM me and I'll try to help you
k
checking if this is resolved/solved for you?
a
Hey, not yet. I will go through all links and see if it works. I'm in another timezone so I'll need to pick it up tomorrow morning my time. Would appreciate if this could be open for around 10-12 more hours so I get time to test it properly. Thanks!
Sent you a DM, thank you 🙂
@Vapi all the URLs in the AI response lead to Discord
k
Hey! To help track down this issue, could you share: - The call ID This would really help us figure out what went wrong!
a
There is no call ID, the call won't go through to VAPI @Shubham Bajaj. Any ideas on how to fix this?
n
@Shubham Bajaj Small update on the CloudTalk issue. We've resolved the issue by passing the calls via the Cloudonix infrastructure. Basically, the issue is consisting of several "sub-issues": 1. CloudTalk doesn't provide any SIP trunking capabilities. 2. CloudTalk requires special configurations for connecting SIP based "User Agents". 3. CloudTalk requires that the "User Agents" maintain active SIP registration with a 60 seconds OPTIONS and RE-Registration. 4. CloudTalk manipulates the inbound calls from the world to the agents, is a way to is presented in a funky way to the "User Agent", as they are a call-center platform with built-in CRM tools. The above 4 issues make the direct connection from CloudTalk to VAPI impossible - also, after @addeba talked to CloudTalk, they were trying to push him to use their agent solution and not VAPI, which of course, isn't the objective here - which means, from a business perspective, they will not be inclined (or even driven) to provide a direct connection to VAPI, as its a competitor to their own product. The solution was to configure the CloudTalk user agent credential on Cloudonix's experimental SBC (will be released by end of Q2 - should all go the right way). Once that was configured, calls were able to traverse between CloudTalk and Cloudonix, and from their, properly transitioned into VAPI as well.
@Shubham Bajaj You can mark this issue right now as resolved.
a
I received a confirmation of what @Nir S (CEO/Founder @Cloudonix) wrote from cloudtalk. Can post their response here for anyone trying to integrate in the future.
n
@addeba This is a common answer that will be received from most Cloud PBX vendors, and the reason is simple - they have no control over their systems. In most cases, they will be a 3CX or a 4PSA reseller, which is very much a "walleed garden" experience.
This morning I added a document to our developer website, on how to route calls from 3CX into Cloudonix and from their into VAPI - you won't believe how complex that is - it's a painful experience.
a
That makes a lot of sense. Thank you for the help, and great documentation!
s
Thanks Sir @Nir S (CEO/Founder @Cloudonix) for helping @addeba and detailed documentation. I can only say thank you for your efforts and help.
@addeba @Nir S (CEO/Founder @Cloudonix) I was out of office for a few days and was unable to respond to your message earlier. I apologize for any inconvenience this may have caused.
n
👍
3 Views