Fail Sip Trunk credential.
# support
i
I attempt to create SIP trunk through Vapi GUI, and when press on create it says invalid credentials. but I checked like 100 times already, my SIP credentials and domain are correct.
v
Try creating your SIP trunk credential using the Vapi API directly to rule out GUI issues. Replace the placeholders with your actual SIP details:
Copy code
bash
curl -X POST https://api.vapi.ai/credential \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
  -d '{
    "provider": "byo-sip-trunk",
    "name": "My SIP Trunk",
    "gateways": [{ "ip": "YOUR_SIP_DOMAIN", "inboundEnabled": false }],
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_SIP_USERNAME",
      "authPassword": "YOUR_SIP_PASSWORD"
    }
  }'
If this still fails, double-check for extra spaces or hidden characters in your credentials, and ensure your SIP provider supports the authentication method you're using. More details: [Vapi SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk) Source: - [SIP Trunking](https://docs.vapi.ai/advanced/sip/sip-trunk)
i
there are no spaces and hidden characters there, I checked many times
c
Hi ivrig, If you need help setting up SIP Trunking with Vapi, you can start by following these steps: 1. **Obtain Provider Details**: Gather the SIP server address, authentication credentials (username/password or IP-based), and a phone number from your provider. 2. **Create a SIP Trunk Credential in Vapi**: Use the Vapi API to create a new credential with your provider’s details. You can find the setup process [here](https://docs.vapi.ai/advanced/sip/sip-trunk). 3. **Associate a Phone Number**: Link your phone number with the SIP trunk credential by creating a Phone Number resource. 4. **Test the SIP Trunk**: Initiate test calls to ensure your setup is working correctly—both outbound and inbound. Please make sure also to allowlist the required IP addresses: - 44.229.228.186/32 - 44.238.177.138/32 For more detailed instructions, you can refer to the [Vapi SIP Trunking documentation](https://docs.vapi.ai/advanced/sip/sip-trunk). If you encounter issues related to creating SIP trunk credentials, reviewing your configuration against these steps might help pinpoint any problems. - Verify your SIP gateway address is correct - If using username/password authentication, ensure: - Username is in the correct format (some providers require specific formats) - Password is entered exactly as provided by your SIP provider If you continue experiencing "invalid credentials" errors despite correct credentials, you may want to: 1. Try creating the trunk via API instead of GUI 2. Verify with your SIP provider that the credentials are active 3. Check if your provider requires any special formatting for the credentials
d
I've got this same issue, i was able to configure our BYO Trunk by checking "Outbound", but i need inbound calls to also go through this trunk. Confirmed with out voice provider that inbound/outbound are both provisioned. is there an fix incomming?
c
We are working on a fix, but in the meantime you can configure two separate gateways to handle inbound and outbound. One gateway for each direction. Inbound has to be IP address and outbound has to be resolved URI name (eg. format looks like
sip.vapi.ai
) Inbound and outbound cannot be on the same gateway.
3 Views