c
Hi! I would like to enable Bring Your Own SIP (BYOS) feature so I can connect my local Asterisk PBX and route calls to a Vapi agent via SIP.
v
To enable BYOS and connect your Asterisk PBX to Vapi, create a SIP trunk credential in Vapi using your Asterisk server details. Here’s a sample API call:
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": "Asterisk Trunk",
    "gateways": [{ "ip": "YOUR_ASTERISK_SERVER_IP_OR_DOMAIN" }],
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_SIP_USERNAME",
      "authPassword": "YOUR_SIP_PASSWORD"
    }
  }'
Replace the placeholders with your actual details. After this, associate a phone number and configure your PBX to route calls to the Vapi SIP URI. Tip: Make sure your Asterisk server allows SIP traffic from Vapi’s IPs and matches authentication settings. Source: - [Vapi SIP Trunking Documentation](https://docs.vapi.ai/advanced/sip/sip-trunk)
c
Hey, You can check out this guide: for details on integration. Note: This is a standard guide used by many telephony providers, so it should be helpful.
3 Views