Asterisk ARI - Connectivity Testing Challenges

Hi, I am trying to configure asterisk ARI and test REST API calls. I am running Asterisk 16 on CentOS 6

I have made changes to http.conf and ari.conf but when i test using swagger -, i am getting this error

“Can’t read from server. It may not have the appropriate access-control-origin settings”

I have checked the CORS settings and i am allowing this origin. Can someone advise what could be the problem

I am running my asterisk setup in Oracle Virutal BOX VM

Thanks in advance.

Did you update the address within to have the correct IP address? Did you verify you can connect to the IP address from the host?

Yes, I have tested with the correct IP address and i am also able to ping the IP address from my host. Is there any specific test i need to do other than this. The http service and ari service are also running.

What exactly happens? What shows in the browser console? If you visit the address for the Asterisk HTTP server in your browser yourself what happens?

This site can’t be reached , refused to connect

That would mean either the HTTP server in Asterisk is not set up properly, a firewall has blocked it, or the Virtualbox setup is blocking it.

Is there a way to find out [through any network tools] if traffic is going to asterisk ? I have disabled selinux not sure if that is a problem. I also enabled and tested but did not work. Thanks in advance

The tcpdump utility can be used to do packet capture, there are various guides and such on the internet.

sngrep would show even if blocked by firewall

I am aware of tcpdump but in this case it could not help. The swagger UI works now but i am not sure what was the exact cause of the issue. I tried to setup this with another asterisk instance - same configuration steps were followed but it did not work. This is quite strange. Thanks for the help in providing some inputs

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.