Question

How to make own VOIP system using FreePBX business app?

I want to build my own VOIP system using FreePBX business app provided by DO. So I have installed FreePBX business app in my droplet server and could access to Web admin panel. But I could not connect to FreePBX (Asterisk) server using Asterisk rest Interface. (Asterisk user and application were already created via web admin panel.) If anyone have experience, please help. And if you need more information, kindly let me know.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
December 14, 2023

Heya,

You can check your logs for more information on the received errors when connection is tried. Without that info, here are some general tips on how to troubleshoot the issue you are experiencing:

Ensure Proper Installation and Configuration

  1. Verify FreePBX Installation: Make sure that FreePBX is properly installed on your DO droplet and that you can access the web admin panel without issues.

  2. Check Asterisk Installation: FreePBX is a front-end administration interface for Asterisk. Ensure that Asterisk is installed and running on your server.

  3. Enable ARI Module: In FreePBX, ensure the Asterisk REST Interface module is installed and enabled. This can usually be done through the Module Admin section of the web interface.

  4. Create Asterisk User and Application: As you mentioned, ensure that the user and application for ARI are properly created in FreePBX. Double-check the credentials and permissions.

Configure Network and Firewall Settings

  1. Open Necessary Ports: Ensure that your server’s firewall allows traffic on the ports used by ARI. By default, ARI uses port 8088 for HTTP and optionally 8089 for HTTPS.

  2. Configure NAT Settings: If your server is behind a NAT, ensure that NAT settings are correctly configured in FreePBX (Settings -> Asterisk SIP Settings).

Validate ARI Access and Credentials

  1. Test ARI Endpoint: You can test the ARI endpoint using a tool like curl. For example:
curl -v -u username:password http://your_server_ip:8088/ari/endpoints
Replace `username`, `password`, and `your_server_ip` with your actual ARI credentials and server IP.
  1. Check Credentials: Ensure that the username and password are correct and that the user has the necessary permissions to access ARI.
Bobby Iliev
Site Moderator
Site Moderator badge
December 13, 2023

Hi there,

It looks like you’ve made great progress by setting up FreePBX on your Droplet. Now, let’s dive into troubleshooting your connection issue with the Asterisk REST Interface:

  1. Check Your Network and Firewall Settings:

    • First things first, let’s make sure your network setup is not the culprit. On your DigitalOcean dashboard, you’ll want to adjust your droplet’s firewall rules to allow traffic on the ARI’s default port, which is 8088.
    • Don’t forget to check the local firewall settings on your Ubuntu 22.04 as well. A quick sudo ufw status will reveal your current setup, and if necessary, you can open the required port with sudo ufw allow 8088.
  2. Dive into FreePBX and ARI Configurations:

    • In the FreePBX admin panel, double-check that the ARI user you created has the right permissions set. These permissions need to align with the types of requests you’ll be making through ARI.
    • Take a look at the http.conf file in Asterisk’s configuration. Here, you’re looking for enabled=yes in the [general] section, confirming that ARI is ready to go.
  3. Verify the Asterisk Service:

    • Ensure that the Asterisk service is up and running smoothly. Run sudo systemctl status asterisk on your server to check its status.
  4. Local Testing of ARI Connection:

    • To narrow down the issue, try connecting to ARI from within the server. Using a tool like curl, you can test this out. For example: curl -v http://localhost:8088/ari/api_call (replace api_call with your specific API endpoint and include the necessary authentication).
  5. Analyzing Logs for Clues:

    • Head over to /var/log/asterisk/ and look for any error messages that might hint at what’s going wrong.
  6. Credential Check:

    • Make sure the username and password you’re using for ARI access are correct and have the required permissions.
  7. Ensure Correct API Endpoint Access:

    • Verify that you’re using the right URL format for accessing ARI. It usually looks like this: http://[your-server-ip]:8088/ari/endpoint.
  8. HTTPS and Security:

    • If your setup requires secure connections, ensure your ARI requests are made via HTTPS. Also, check that your SSL certificates are in place and correctly configured.

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel