complex-teal
complex-tealโ€ข6mo ago

FreePBX to VAPI SIP Integration Issue

Hi everyone! ๐Ÿ‘‹ I'm trying to configure FreePBX 17 to connect with VAPI's SIP URI service (**@sip.vapi.ai) but running into challenges. What I've tried: Created a custom SIP trunk in FreePBX Set up a direct dialplan in extensions_custom.conf Added PJSIP endpoint configurations Created outbound routes with prefix 800 The issue: When dialing 800+extension, I get "all circuits busy" errors. From logs, I can see FreePBX is trying to establish a traditional trunk connection expecting VAPI to register, but from what I understand, VAPI doesn't perform registration as it functions more like a SIP destination server. Questions: Has anyone successfully connected FreePBX to VAPI? Is a middle SIP proxy (like Kamailio) absolutely necessary, or is there a way to configure FreePBX directly? Any specific configuration tips for making this work without adding additional components? Any help would be greatly appreciated! ๐Ÿ™
8 Replies
Vapi Support Bot
Vapi Support Botโ€ข6mo ago
For your "all circuits busy" error, configure your FreePBX SIP trunk with these VAPI-specific settings:
[trunk_name]
type=peer
host=sip.vapi.ai
port=5060
fromuser=YOUR_SIP_USERNAME # Use your SIP URI username
secret=YOUR_PASSWORD # Can be anything except "test"
transport=udp
insecure=port,invite
context=from-trunk
[trunk_name]
type=peer
host=sip.vapi.ai
port=5060
fromuser=YOUR_SIP_USERNAME # Use your SIP URI username
secret=YOUR_PASSWORD # Can be anything except "test"
transport=udp
insecure=port,invite
context=from-trunk
Ensure your firewall allows SIP traffic and verify your network permits communication on port 5060. Sources: - Troubleshooting "all circuits busy" errors in FreePBX when connecting to a SIP URI service - FreePBX SIP trunk configuration options for connecting to SIP URI services
โคต๏ธ Mention @Vapi Support Bot for follow-ups ๐Ÿฅ
complex-teal
complex-tealOPโ€ข6mo ago
@Duckie how about PJSIP config? currently the freepbx dont support chan_sip
Vapi Support Bot
Vapi Support Botโ€ข6mo ago
I found some general information about SIP configuration with VAPI, but I don't have specific PJSIP configuration examples for FreePBX 17. Could you share your current PJSIP endpoint configuration that you've already tried? This would help me provide more targeted assistance for your FreePBX 17 setup. Key points to ensure in your configuration: - Authentication username should be your SIP URI username - Password can be anything except "test" - Server should be set to sip.vapi.ai - Ensure port 5060 is open in your firewall Sources: - Troubleshooting "all circuits busy" errors in FreePBX when connecting to a SIP URI service - FreePBX SIP trunk configuration options for connecting to SIP URI services I found some general information about SIP configuration with VAPI, but I don't have specific PJSIP configuration examples for FreePBX 17. Could you share your current PJSIP endpoint configuration that you've already tried? This would help me provide more targeted assistance for your FreePBX 17 setup. Key points to ensure in your configuration: - Authentication username should be your SIP URI username - Password can be anything except "test" - Server should be set to sip.vapi.ai - Ensure port 5060 is open in your firewall Sources: - Troubleshooting "all circuits busy" errors in FreePBX when connecting to a SIP URI service - FreePBX SIP trunk configuration options for connecting to SIP URI services
like-gold
like-goldโ€ข6mo ago
Here you go...
Kyle Brunker
Kyle Brunkerโ€ข6mo ago
checking if this is resolved/solved for you?
complex-teal
complex-tealOPโ€ข5mo ago
Yes. I resolve the issues using trunking.
Kyle Brunker
Kyle Brunkerโ€ข5mo ago
Marking this ticket as Solved โœ…

Did you find this page helpful?