Asterisk
# support
l
How can I integrate the asterisk VoIP number to my Vapi AI
v
Hi there! 👋 I'd be happy to help you integrate your Asterisk VoIP number with Vapi AI. I can provide you with several methods to integrate your Asterisk VoIP number with Vapi AI, including the primary approach using SIP trunking and some alternative methods if direct integration presents challenges. ## Primary Method: SIP Trunking The most common way to integrate Asterisk with Vapi AI is through SIP trunking: 1. **Set up a SIP trunk in Asterisk for Vapi**: - Configure a SIP trunk in Asterisk that points to Vapi's SIP endpoint - Input Vapi's SIP hostname and credentials into your PBX configuration - [According to the documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1331674878092382218), you'll need to configure both outbound and inbound routes 2. **Configure outbound routes in Asterisk**: - Set up your dial plan to route outbound calls through the Vapi SIP trunk - Ensure proper authentication is configured (Vapi expects authentication credentials in the SIP Authorization header) - [The documentation notes](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334238882660618250) that the username must be your SIP username, and the password can be anything except "test" 3. **Set up inbound routes in Asterisk**: - Configure a DID (Direct Inward Dialing) number in Asterisk - Point it to Vapi's SIP URI to receive calls - Configure the
sipUri
attribute within the
forwardingPhoneNumbers
array to specify the destination SIP address - [According to the information found](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334821142204121088), ensure your system can handle SIP REFER messages for call transfers ## Alternative Methods If direct SIP integration proves challenging, here are some alternatives: 1. **Using Twilio as a SIP Bridge**:
- [Documentation suggests](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335340719317192714) that Twilio can be used as a SIP bridge, especially if there are proxy authentication issues - Asterisk registers with Twilio, and Twilio forwards calls to Vapi.ai 2. **Direct API Integration**: - Use server-side SDKs or directly interact with the Vapi REST API - This allows you to initiate sessions and handle audio streams - [According to the information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1329523231375495260), the API provides endpoints for initiating calls, managing sessions, and sending/receiving audio streams ## Troubleshooting Tips If you encounter issues with the integration: - For "sip gateway failed to connect" errors, check that your SIP trunk is correctly configured with the proper Credential ID, IP/Port, and authentication details - Ensure SIP Register is enabled with the correct Domain and Realm - [Documentation recommends](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333747605628391434) verifying network connectivity between your Asterisk server and Vapi's SIP endpoint Is there a specific aspect of the integration you'd like me to elaborate on further? Sources: - [Discord Channel Asterisk Integration](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1331674878092382218) - [Discord Channel SIP Authentication](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334238882660618250) - [Discord Channel SIP URI Configuration](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334821142204121088) - [Discord Channel Twilio Bridge](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335340719317192714) - [Discord Channel API Integration](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1329523231375495260)
k
Refer to the following guides that demonstrate how to establish a connection with your SIP provider. Note: While these guides use Twilio as an example, the process remains consistent across other telephony providers.
3 Views