Can't connect to byo-sip-trunk
# support
a
Hello there! I am trying to connect my test sip-trunk to VAPI. For reference, my provider is the German company PeopleFone. Their documentation and support is unfotunately really bad. When I send the request to
https://api.vapi.ai/credential
I receive the answer that it has been created and no problem. But in my PeopleFone dashboard I do not see anything connected. If I take for example the Softphone app from the iOS AppStore and give only URL + Username + Password, I can see that the app is registered with my server. Does VAPI connect to the Trunk after creating the credential at all? Or does that happen after the phone number has been configured? For the record, I also configured a phone number that didn't work, so I am trying to pinpoint the issue. Another related although less important question. How do I delete a created credential with the API? I did not see that in the docs, and when I do a
get
to
/credential
I see old entries with some errors I made before. Thank you very much for your help.
v
Hi there! 👋 I understand you're having trouble connecting your PeopleFone SIP trunk to VAPI. While I don't have specific information about PeopleFone, I can help with your questions about the VAPI connection process and credential deletion. Regarding your first question about when VAPI connects to the SIP trunk - VAPI does not connect to a SIP trunk immediately after credential creation. The connection process involves multiple steps: According to the [information I found](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341469652366266408), VAPI likely connects to the SIP trunk after both the credential has been created AND the phone number has been configured and associated with that credential. The process typically involves: 1. Creating a BYO SIP Trunk credential using the
/credential
endpoint 2. Creating a phone number and associating it with the credential using the
/phone-number
endpoint When you send an initial connection request, VAPI's authentication process requires additional steps. As noted in [this source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334238882660618250), the initial INVITE does not include credentials, and VAPI responds with a 401 Unauthorized message, requiring further authentication steps. For your second question about deleting credentials - you can delete VAPI credentials using the
/credential
endpoint with the DELETE method. According to [this information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1317475563220504596), when a credential is no longer needed, you would use the
/credential
endpoint to remove it from the system. The full endpoint would be
https://api.vapi.ai/credential/:id
where
:id
is the ID of the credential you want to delete. You'll need to include the Authorization header with your API token in the format
Bearer <token>
.
Is there anything else I can help you with regarding the VAPI SIP trunk connection process? Sources: - [Discord Thread about VAPI SIP trunk connection process](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341469652366266408) - [Discord Thread about VAPI Authentication Process](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334238882660618250) - [Discord Thread about Deleting Credentials](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1317475563220504596)
v
Message marked as helpful by @ANIMATEK! 🎉
a
I managed to configure the SIP trunk and add a number. However when trying to place a test call it does not work. This is my callID
1aae1185-8dbf-49ce-8ad3-52f27da6f0f1
- what could be the issue? By the way the links to the sources in the post above are broken.
Someone please 🥲
k
Thank you for reaching out to us. We've received your message and will get back to you as soon as possible.
Hi, checking if this is resolved/solved for you?
a
Hey no unfortunately not solved. You can check in the backend with the call id right? Do you mind to take a look?
k
Hey ANIMATEK, As you can see in the below screenshot, your SIP provider requires proxy authentication, but we at VAPI only provide authentication headers. So, you have to add a proxy middleware in between which sends the proxy header to your SIP provider, or you can ask them to allow us to send authentication headers only. You have to check on this part with them. https://cdn.discordapp.com/attachments/1357313953377812542/1359335137615286332/image.png?ex=67f71b00&is=67f5c980&hm=4f94dbd578619a0bf9f047d21e7f1091de1e82f81f5675531a139c644f04b9ca&
a
Thank you for you help. I will see if I can clear this out.
k
Marking this ticket as Solved ✅
2 Views