Error When Creating SIP Trunk Number
# support
c
I'm trying to set up an SIP Trunk from my own phone provider. But after setting it up in VAPI, I get the error ''Failed to create Sip Trunk Credential". Here's the information I was given by my phone provider: In VAPI, I'm going to User - Account Settings - Integrations - SIP Trunk Credentials - Add New SIP Trunk Gateway Configuration Server: sip-mtl-03.voicemeup.com - I'm entering this in the IP Address / Domain box Port: 5060 Netmask: 32 Outbound Protocol: UDP Allow inbound calls - checkmark is in Allow outbound calls - checkmark is on Enable options ping - checkmark is off Authentication (Optional) Username: megtech_vapi Password: I'm entering my regular password Use SIP Registration - checkmark is off Advanced Settings (Optional) Enable leading plus for outbound calls - checkmark is off Use Cluster SIP - checkmark is off Tech Prefix - Left it empty SIP Diversion Header - Left it empty What am I doing wrong? What am I missing? Please help as this is the last step in order to launch the assistant. Thanks! 8:49 But it'S posisble i need to entermore information but i dont know
v
Thanks for sharing your configuration details. To help troubleshoot, could you confirm if your SIP provider requires a specific authentication method (such as SIP registration or IP-based authentication), or if they provided any additional error details or logs when the credential creation failed? Source: - [SIP Trunking Documentation](https://docs.vapi.ai/advanced/sip/sip-trunk)
c
Please hold hands with me, I'm new to VAPI and I'm not very technical. I already read the SIP Trunking documentation but I don't know how to set up the SIP provider via VAPI's API. I thought it was done through Settings - Integrations - SIP Trunk Credential - Configure New SIP Trunk When I explained to my phone provider what I was trying to do in VAPI (i.e. connecting a phone number from the provider with VAPI) they said I had to do it via SIP Trunking. They gave me the server to use and they told me to use my username and password. But that was it. I see there are more settings I can fill out when creating an SIP Trunk in VAPI but that's as far as I have gotten. Based on this what questiona do you have for me? Or questions I should ask my phone provider?
And I'm not sure what you meant by "If they provided any additional error details or logs when the credential creation failed?"
I haven't spoken to them yet, I wanted to see if VAPI's support could help me troubleshoot the issue 1st
Hi! Are you able to provide an update? I really want to get the assistant to go live. Thanks!
m
fix for me was first creating the trunk with inbound false. then adding origination in your sip provider. then patching the credential
c
Hi @User - can you explain if you were spesaking to a 10 yeard old? LOL! What do you mean to first create the trunk with inbound false? And then adding origination in your SIP provider. Then patching the credential?
m
Okay, so the principle behind this is I think you can't update inbound to be true until like some other kind of ping check to your server works. So the only way I saw this working is that when you try to create the initial credential, you uncheck allow inbound calls. And then after it's created and you create the phone number and then you patch. So by patch, I mean, you have to figure out your VAPI API key. Save the credential UUID and then mark allow inbound true. But you know, I might be wrong.
c
Hi Charlie, To integrate your Plivo SIP trunk with Vapi, follow these key steps: 1. Plivo Configuration: - Create an IP ACL with IP addresses
44.229.228.186/32
and
44.238.177.138/32
. - Set up an Outbound Trunk linked to the IP ACL. - Note the Termination SIP Domain from the trunk details. - Buy and associate a phone number within Plivo. 2. Vapi Configuration: - Use the Vapi API to create a credential with your
Plivo Termination SIP Domain
. - Example API call:
Copy code
bash
     curl -X POST https://api.vapi.ai/credential \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_VAPI_PRIVATE_API_KEY" \
     -d '{ "provider": "byo-sip-trunk", "name": "PLIVO Trunk", "gateways": [ { "ip": "YOUR_PLIVO_TERMINATION_SIP_DOMAIN", "inboundEnabled": false } ] }'
- Next, associate the phone number with the credential ID you received:
Copy code
bash
     curl -X POST https://api.vapi.ai/phone-number \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_VAPI_PRIVATE_API_KEY" \
     -d '{ "provider": "byo-phone-number", "name": "PLIVO SIP Number", "number": "YOUR_PLIVO_PHONE_NUMBER", "numberE164CheckEnabled": false, "credentialId": "YOUR_CREDENTIAL_ID" }'
3. Testing: - Initiate calls through the Vapi API or Dashboard using the Phone Number ID from Vapi. For detailed instructions and examples, please refer to the [Plivo SIP Integration Guide](https://docs.vapi.ai/advanced/sip/plivo). Remember that Indian phone numbers are not supported due to regulatory requirements. If you encounter errors, double-check the IPs and credentials provided. Let me know if you need more assistance.
3 Views