Colosaborr
06/13/2025, 12:46 AMVapi Support Bot
06/13/2025, 12:47 AMbash
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)