How to troubleshoot Asterisk REST Interface not launching?

We’ve had two occasions so far where the Astrisk Rest Interface (ARI) which is usually contacted at “http://subdomain.domain.com:8088/ari/channels” stops responding after a server reboot. In the Asterisk CLI Module, the entering the “ari show status” command says that it is not a valid command, when usually it reports the status. We’ve had to roll back snapshots pretty far on the Amazon instance to get to a state where it is working again.

We’re having trouble isolating what is breaking ARI, because it seems like we can run plenty of module updates and do Apply Config and the ARI continues to work. Only after a full system reboot do we see that the ARI won’t come back up.

Would anyone have any tips on how we could pin down the issue? Is there any command to force it to try to relaunch, or to see further output on what is preventing it from launching?

If you are at the asterisk CLI and this doesn’t work:

ari show status

that hints that Asterisk is starting without one or more of the ari modules loading Do a:

module show like ari

I found the command “module show” and ran it to find there’s indeed an issue with the ARI module.

“res_ari.so” is what we can’t seem to launch:


Trying to load it manually:

Is ARI configured by hand or by FreePBX? I believe it is an all or nothing module. So if there is an error then it will fail.

Check your logs to see if there are any errors

Thank you, we tracked it down:

The only thing involving ARI that we have configured by hand is a single entry. We wanted to get the “Swagger” Asterisk page to talk to our server and even though all the guides say it will work if we set “allowed_origins=*”, that command did not seem to function as intended, so we manually named the domain in ari_additional_custom:

But, as it turns out, that conf edit doesn’t take effect until after a reboot I think. It seems like the ARI will crash if we have the conflicting commands both trying to load. The =* wildcard and the =ari.asterisk.org can’t coexist.

Now we removed the ari.asterisk.org entry, rebooted, and the =* now does work when accessing the Asterisk Swagger site. I guess we got mixed up because they needed reboots to take effect, or something.

Just so you know you can set origins in advanced settings.

You also can’t load modules over the manager interface. Which is what you are doing when you run cli commands through freepbx. This is for security.

Only run module load commands through the real CLI.

Oh, is there a list of restricted commands for the manager interface then?

Just module loading and unloading.