FreePBX
# support
s
Is there any guide on how to connect FreePBX to VAPI? From what I understand, it should be possible, but as I’m new to this, I would appreciate the most comprehensive instructions available.
n
Not staight forward
but, you can do it via Cloudonix in 5 minutes
s
Do I understand correctly that the sequence for an incoming call will be approximately as follows: MyPhoneOperator - FreePBX - Cloudonix - VAPI?
Is there an easier way if I need to connect to different operators?
n
You can connect all operators via Cloudonix and simplify everything
I would recommend something like:
Copy code
Carrier_1 ---+                  +---> VAPI
Carrier_2 ---+---> Cloudonix ---+---> FreePBX
Carrier_3 ---+
Like this, you can maintain a single unified source of truth for routing and control, while simplifying your entire setup
s
Thank you very much for your offer and support! I’m currently covering communication costs with my mobile operator and considering VAPI in the future. Given my current budget, I have to be mindful of additional subscriptions. That’s why I’m exploring FreePBX as an alternative for now.
n
Cloudonix has a free usage tier, which may be applicable for you. Check the pricing page.
a
Based on what you're looking to do, I'd recommend starting with the Cloudonix approach. It's going to be significantly easier to set up initially, especially if you're new to telephony integrations. Cloudonix handles a lot of the complex SIP configuration details that would otherwise require deeper technical experience. Here's why this approach makes sense to begin with: 1\. Simple, fast setup - You can have it running in about 5 minutes following their integration guides 2\. Less technical overhead - No need to worry about SIP security, codecs, and other complex telephony settings 3\. Unified interface - Manage all your carriers through a single platform 4\. Free tier available - You can test it out without significant investment The great thing is you're not locked in. After you've gained some experience and have your system running smoothly, you can always reevaluate whether to: \- Continue with Cloudonix if it meets your needs \- Switch to a direct FreePBX-to-VAPI integration for more control or cost savings If you decide you'd prefer to go the direct FreePBX route from the start, I'm happy to schedule some time to deep dive into the details. We can walk through the SIP configuration, security settings, and other technical aspects to ensure you get a solid direct connection set up. Let me know which direction you'd like to go, and we can take it from there!
s
I found the following part in the “Create Phone Numbers” section of the API. Do I understand correctly that in order to successfully connect FreePBX to VAPI via SIP-Trunk, I must specify these parameters both on VAPI and in the FreePBX trunk? https://cdn.discordapp.com/attachments/1351279624574865448/1351576382639181944/image.png?ex=67dae118&is=67d98f98&hm=dc4a54b9060213773fcc74dfdb9474cd67804498bc8ac371037e122a3f37e313&
@Nir S (CEO/Founder @Cloudonix) I tried your service, but the setup took significantly longer than the advertised 5 minutes. There are two separate guides on integrating with VAPI, located in different parts of the documentation: 1. https://developers.cloudonix.com/guides/cxmlExamples/voiceAgentProvider/Vapi.ai 2. https://developers.cloudonix.com/integrations/telephonyIntegration/Provider/VAPI.ai Neither of them clearly explains where to register the VAPI connection in a Cloudonix account. As a result, I had to search Discord for the relevant thread, ask for clarification, and wait for a response—far from a quick setup. And this is just for the VAPI connection. I haven’t even started with the mobile operator integration yet. Could you please provide clear instructions on how to complete the setup?
n
Will be happy to schedule a session with you and walk you through the process. Just pin a meeting on my calendar and I'll be happy to show you https://calendly.com/cloudonix/talk-to-nir
s
@Semsan Yes, you're correct! To successfully connect FreePBX to VAPI via SIP-Trunk, you need to configure the authentication parameters shown in the screenshot on both sides: 1. **On VAPI side**: You need to configure the authentication parameters in your phone number settings: - Username (20-40 characters) - Password (20-40 characters) - Realm (optional, defaults to sip.vapi.ai) 2. **On FreePBX side**: These same parameters need to be configured in your SIP trunk settings: - The username must match exactly what you set in VAPI - The password must match exactly what you set in VAPI - The realm should be set to sip.vapi.ai (unless you've configured a custom realm in VAPI)
SIP protocol is preferred.
s
@Shubham Bajaj Thank you, I will try it today and let you know the result.
@Shubham Bajaj I am trying to establish a connection in different ways, including direct connection to my telephony provider, Ringostat. Direct connection is also not working, and their support team asked me to clarify the following points with you: 1. Is the gateways list in "byo-sip-trunk" a whitelist? If my provider's IP is not there, will registration fail? 2. Is it possible to register SIP directly on vapi ai using the authorization credentials provided by Ringostat, or does it mean that SIP needs to be registered somewhere in an application or softphone first and then its details should be added in the service in parallel? Here are the call logs from Ringostat: https://cdn.discordapp.com/attachments/1351279624574865448/1352212972872794122/logs_ringostat_vapi.txt?ex=67dd31f7&is=67dbe077&hm=5da732fbeeb2b47a7b2df19024ea5bad2d188db6644515ba4fe7c9764eca46ca&
n
@Shubham Bajaj @Semsan Following @semsan's feedback, I'm building a Cloudonix-VAPI integration CLI tool to simplify the process,.
s
@Shubham Bajaj Now i'm testing MicroSIP connection: First Test (MicroSIP_test_1) – Only
sipUri
VAPI Configuration:
Copy code
json
{
  "provider": "vapi",
  "assistantId": "275c78a4-f45d-4afb-8e28-935059ab0759",
  "name": "microsip_test_1",
  "sipUri": "sip:microsip_test_1@sip.vapi.ai"
}
MicroSIP Configuration: (Shown in the screenshot) Result: The connection was successfully established, and the assistant answered the call. https://cdn.discordapp.com/attachments/1351279624574865448/1352303107975024791/image.png?ex=67dd85e9&is=67dc3469&hm=f5e0303c21127b23f2fa6fb426f6b4cded3001b8c1f58cc2806966dbeb96b8e2&
Second Test (MicroSIP_test_2) – Credentials +
sipUri
VAPI Configuration:
Copy code
json
{
  "provider": "vapi",
  "assistantId": "275c78a4-f45d-4afb-8e28-935059ab0759",
  "name": "microsip_test_2",
  "sipUri": "sip:microsip_test_2@sip.vapi.ai",
  "authentication": {
    "username": "MicroSipSecondTestUser",
    "password": "G4rT2fM8V9sN7JqK5P1B",
    "realm": "sip.vapi.ai"
  }
}
MicroSIP Configuration: (Shown in the screenshot) Result: MicroSIP returns an error: "Incorrect Password". Logs are attached in the file. https://cdn.discordapp.com/attachments/1351279624574865448/1352303414511669249/image.png?ex=67dd8632&is=67dc34b2&hm=d645eec41d9036be015f11970d07f0f933cd8c5656579bc9fe09c597c2077eaa& https://cdn.discordapp.com/attachments/1351279624574865448/1352303415124033567/microsip_log.txt?ex=67dd8632&is=67dc34b2&hm=8f2073a719b4c8436fc3b154ff7a4c2ecc1d186aab5548e0ddba740685d74ac3&
Third Test (MicroSIP_test_3) – Only Credentials, No
sipUri
VAPI Configuration:
Copy code
json
{
  "provider": "vapi",
  "assistantId": "275c78a4-f45d-4afb-8e28-935059ab0759",
  "name": "microsip_test_3",
  "authentication": {
    "username": "MicroSipThirdTestUser",
    "password": "G4rT2fM8V9sN7JqK5P1B",
    "realm": "sip.vapi.ai"
  }
}
MicroSIP Configuration: (Shown in the screenshot) Result: MicroSIP returns an error: "Incorrect Password". The VAPI UI does not support this scenario. https://cdn.discordapp.com/attachments/1351279624574865448/1352303884630233088/image.png?ex=67dd86a2&is=67dc3522&hm=932b4dae74918b47cd560cc514267aa1cf497b30018c25a376a281b5226c2b2b& https://cdn.discordapp.com/attachments/1351279624574865448/1352303885032620106/image.png?ex=67dd86a2&is=67dc3522&hm=86b7786da9128ab0daef6d463b27605874f3a20f94b746b8be41f0e0cecd2ba0&
In the second test, where I added authentication details (username, password, realm), MicroSIP returns an "Incorrect Password" error, even though the credentials are correctly specified. Could you explain why this scenario is not working? Are there any additional requirements or restrictions for authentication in VAPI?
Could you estimate how much time it will take to develop the new tool? Should I schedule a meeting right away, or is it better to wait?
n
I have a basic version working, but I need to polish it a bit and upload to npm. You'll need node.js for it to work on your computer. In any case, you can schedule a call regardless, hopefully by then the tool will be ready for initial testing.
s
Understood, thank you.
n
@Semsan I've published the first version of the tool, which currently supports VAPI (i'll add more providers later on). You can find the tool at https://www.npmjs.com/package/cloudonix-voiceai-connector and follow the installation guide in there. If you run into issues, tell me.
I had to remove the tool for a bit
I'll resubmit it shorly
s
@Semsan > Is the gateways list in "byo-sip-trunk" a whitelist? If my provider's IP is not there, will registration fail? - The gateways field in the credential API call specifies the SIP servers that VAPI will connect to when making outbound calls.
example
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": "Zadarma Trunk", "gateways": [{ "ip": "sip.zadarma.com" }], "outboundLeadingPlusEnabled": true, "outboundAuthenticationPlan": { "authUsername": "YOUR_SIP_NUMBER", "authPassword": "YOUR_SIP_PASSWORD" } }' https://docs.vapi.ai/advanced/sip/sip-trunk This tells VAPI: - When making outbound calls, connect to the SIP server at "sip.zadarma.com" - Use the authentication credentials specified in "outboundAuthenticationPlan" - This is where VAPI will route calls when it needs to reach external numbers through your SIP provider (Zadarma in this case) > Is it possible to register SIP directly on vapi ai using the authorization credentials provided by Ringostat, or does it mean that SIP needs to be registered somewhere in an application or softphone first and then its details should be added in the service in parallel? You don't "register" with VAPI as you would with a traditional SIP server. Instead of SIP registration, you configure the connection through VAPI's API, You create credentials and phone numbers with specific parameters.
@Semsan > Second Test (MicroSIP_test_2) – Credentials + sipUri > VAPI Configuration: Your SIP username has to be
microsip_test_2
and password can be anything.
@Semsan let me know if you require further help, we can get on a call.
7 Views