SIP Trunking Unauthorized Error
# support
a
I'm receiving a 401 Unauthorized response while setting up the SIP trunk using the VAPI SIP URI. Could you provide the requirements needed for a successful SIP trunk setup?
We are using Avaya IP Office as the source for incoming calls
v
message has been deleted
@AhmedFaisal11 Certainly! To set up a SIP trunk successfully and avoid a 401 Unauthorized response, you need to ensure the following requirements are met: 1. **Authentication**: Verify that you are using the correct credentials for authentication. This typically includes a username and password or sometimes a token. Ensure that these credentials are correctly configured in your SIP device or application. 2. **SIP URI Format**: The SIP URI should be correctly formatted. It usually looks like
sip:user@domain
. Make sure you are using the correct SIP URI provided by VAPI. 3. **Firewall and Network Configuration**: Ensure that your network allows SIP traffic and that any firewalls are configured to permit traffic on the necessary SIP ports (usually 5060 for UDP/TCP). 4. **Codecs Compatibility**: Check that the codecs used by your SIP trunk are supported by VAPI. Common codecs include G.711 (ulaw and alaw) and G.729. 5. **SIP Registration**: Some systems require SIP registration. If VAPI requires registration, ensure that your SIP trunk is configured to register with the VAPI SIP server. 6. **SIP Transport Protocol**: Confirm that you are using the correct transport protocol (UDP, TCP, or TLS) as required by VAPI. 7. **Encryption**: If encryption is required (e.g., using TLS), ensure that your certificates are valid and properly installed. 8. **SIP Headers**: Ensure that the SIP headers are correctly set. Some systems require specific headers to be present in the SIP INVITE messages. 9. **SIP Origination**: If the call originates from SIP, use the
sipUri
attribute within the
forwardingPhoneNumbers
array to specify the destination SIP address. If you've checked all these requirements and are still facing issues, it could be helpful to look at the SIP logs to identify the exact point of failure. If you need further assistance, please provide more details about your current setup, and I'll do my best to assist you.
You can continue this conversation by mentioning me in the message.
a
@Vapi can you elaborate point 1,2 and 3
s
Hey @AhmedFaisal11 You can read this guide; it showcases how you can connect with your SIP provider. https://www.notion.so/SIP-be5179f856e046688c69eba817e7fcc3 https://www.notion.so/SIP-Inbound-Guide-1f0789ae62024748a62a6d81076b9f32 https://www.notion.so/SIP-Outbound-Guide-997d66df35284295b7149fc10c82f3e8 And do let me know if you need any other help.
Also we use basic auth and expect you to pass dummy values in SIP auth headers.
17 Views