Getting Unauthorize 401 error message
# support
a
I need help. We created the SIP URL in VAPI, but whenever we call the inbound agent, we consistently receive a 401 Unauthorized error in the VICI dialer admin panel. We have already checked the caller ID, credentials, and many other settings. How can I resolve this error?
c
Hi @Alex Kovacs, Have you created an SIP trunk with inbound enabled with your IP addresses listed? If that is done, could you provide me which To SIP URI you are using to send the calls?
a
Yes, we created that! this is our sip:botstestingimpossibe@sip.vapi.ai
If you need something else, let me know
c
Hi @Alex Kovacs, the correct SIP URI for inbound calls is
<phone_number>@<credential_id>.vapi.ai
(https://docs.vapi.ai/advanced/sip/sip-trunk#inbound-call-test). You can get the credential ID in the response body while creating the credential using the API. Please find more information about it here: https://docs.vapi.ai/advanced/sip/sip-trunk#create-a-sip-trunk-credential-in-vapi
s
Hi @Bharath Hope you're doing well! We are trying to configure the Vapi on SIP trunk based we created SIP gateway or SIP URI under the phone number as well and at PBX server end we've registered with all SIP trunk according to the provicded details but still we are unable to send the call towards the vapi we're unable to make any termination. We have tried with all documentation provided by Vapi support.
c
Hi @Sharjeelahmad, could you please send me the PCAP file of the call you are trying to make to Vapi? This will help me debug the issue better. Since PCAP files can contain sensitive data, please send it to us at support@vapi.ai, and I will look into it. Please let me know once you sent the email and please include
T-45031
in your email subject so that I can find it easily.