BYO-SIP trunk - registered but not working
# support
a
My SIP provider reports is is not registered at their end. However, on VAPI side, it failed the credentials until logged them in with the correct ones and I got it registered as per screenshot. How to monitor the end-to-end keep alive messaging or force the SIP trunk to connect against my provider (no traffic at all) https://cdn.discordapp.com/attachments/1420732074096197712/1420732074595188786/image.png?ex=68d6775a&is=68d525da&hm=1e0dbe1ec975eedd4caf0e004761a7c560a6d113eb902ec3ac7c5fab24b88a00&
We need to import our numbers via our private SIP trunk and assign agents to it
c
Hi AlexVendet, If you need assistance with setting up a BYO (Bring Your Own) SIP trunk with Vapi, you can follow these general steps: 1. **Obtain Provider Details**: Gather your SIP server address, authentication credentials (username/password or IP-based), and a phone number (DID) from your provider. 2. **Create a SIP Trunk Credential**: Use the Vapi API to create a new credential. Send a POST request to
https://api.vapi.ai/credential
with your provider’s details. Example for a provider using SIP credentials:
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": "YOUR_PROVIDER_NAME",
     "gateways": [{"ip": "YOUR_SIP_SERVER_DOMAIN", "inboundEnabled": false}],
     "outboundAuthenticationPlan": {
       "authUsername": "YOUR_SIP_NUMBER",
       "authPassword": "YOUR_SIP_PASSWORD"
     }
   }'
3. **Associate a Phone Number**: Link your external phone number to the SIP trunk credential by creating a Phone Number resource.
Copy code
bash
   curl -X POST "https://api.vapi.ai/phone-number" \
   -H "Content-Type: application/json" \
   -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
   -d '{
     "provider": "byo-phone-number",
     "name": "YOUR_PHONE_NUMBER_NAME",
     "number": "YOUR_PHONE_NUMBER",
     "credentialId": "YOUR_CREDENTIAL_ID"
   }'
4. **Test the SIP Trunk**: Perform both outbound and inbound call tests to ensure correct routing and connectivity. For more detailed instructions, you can check the [SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk).
2 Views