VAPI and trunk SIP
# support
b
I havea sip proxy/server, it's possible to connecte vapi on my VOIP server ? i dont understand how it's work thanks for your help
v
Yes, you can connect Vapi to your own SIP proxy/server using the "Custom BYO SIP Trunk" option. Here’s a quick example of how to create a SIP trunk credential in Vapi (replace the placeholders with your actual SIP server 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_SERVER_ADDRESS", "inboundEnabled": false }],
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_SIP_USERNAME",
      "authPassword": "YOUR_SIP_PASSWORD"
    }
  }'
Gather your SIP server address and credentials, then use this API call to connect Vapi to your VOIP server. For more details, see the [Vapi SIP Trunking guide](https://docs.vapi.ai/advanced/sip/sip-trunk). Source: - [SIP Trunking | Vapi Documentation](https://docs.vapi.ai/advanced/sip/sip-trunk)
b
ok thank, but if i used this it's possible to use for inbound callto vapi ?
v
Message marked as helpful by @barto_95 | πŸ‡΅πŸ‡Ή! πŸŽ‰
b
what is the ip of vapi when connect to SIP Server ?
@Vapi Support Bot ?
v
To connect Vapi to your SIP server, you need to allowlist the following IP addresses for SIP signaling and media:
Copy code
44.229.228.186/32
44.238.177.138/32
Add these to your SIP server's firewall or access control list to ensure proper connectivity. These IPs are used exclusively for Vapi SIP traffic. For more details, see the [Vapi SIP Trunking documentation](https://docs.vapi.ai/advanced/sip/sip-trunk). Source: - [SIP Trunking | Vapi Documentation](https://docs.vapi.ai/advanced/sip/sip-trunk)
b
i have error failed to create sip trunk credential and i check no request from vapi to my sip server @Vapi Support Bot
v
Suggestion: Double-check that you have allowlisted both Vapi IPs (
44.229.228.186/32
and
44.238.177.138/32
) on your SIP server's firewall or ACL. If not, Vapi cannot reach your server and credential creation will fail. Here’s the required step:
Copy code
plaintext
# Add these to your SIP server's allowlist:
44.229.228.186/32
44.238.177.138/32
After updating your firewall, try creating the SIP trunk credential again. For more details, see the [Vapi SIP Trunking documentation](https://docs.vapi.ai/advanced/sip/sip-trunk). Source: - [SIP Trunking | Vapi Documentation](https://docs.vapi.ai/advanced/sip/sip-trunk)
b
when i configured the information to connect no request from vapi to my sip server received for registration
c
Hi, could you please provide the credential id of the SIP trunk? Phone number works too.
2 Views