NethServer Version: 7.5.1804
Module: freepbx
Hi,
i’m trying to enable and use ARI on freePBX in NethServer.
My goal is to get a web page that can display the asterisk info and make calls.
I’ve installed Asterisk REST Interface Users module and i’ve enabled, in “Settings -> Advanced Settings” the “Asterisk Builtin mini-HTTP server” and “Asterisk REST Interface”.
In “Asterisk Rest Interface Users” i’ve created a user whit write permission.
The problem is that i receive always a 404 error.
In CLI i’ve this output:
cdc*CLI> ari show status
ARI Status:
Enabled: Yes
Output format: pretty
Auth realm: Asterisk REST Interface
Allowed Origins: *
User count: 2
cdc*CLI> http show status
HTTP Server Status:
Prefix:
Server: Asterisk/13.17.2
Server Enabled and Bound to 0.0.0.0:8088
Enabled URI’s:
/httpstatus => Asterisk HTTP General Status
/static/… => Asterisk HTTP Static Delivery
/ari/… => Asterisk RESTful API
/ws => Asterisk HTTP WebSocket
Enabled Redirects:
_ None._
If i try to connect from browser to:
http://ipaddress:8088/ari/asterisk/info
after entered username and password i obtain the following response:
{
“message” : “Resource not found”
}
and the following log in console:
[2018-06-27 15:28:20] DEBUG[22381]: http.c:1954 httpd_helper_thread: HTTP opening session. Top level
[2018-06-27 15:28:20] DEBUG[22381]: http.c:1430 handle_uri: HTTP Request URI is /ari/asterisk/info
[2018-06-27 15:28:20] DEBUG[22381]: http.c:1485 handle_uri: match request [ari/asterisk/info] with handler [httpstatus] len 10
[2018-06-27 15:28:20] DEBUG[22381]: http.c:1485 handle_uri: match request [ari/asterisk/info] with handler [static] len 6
[2018-06-27 15:28:20] DEBUG[22381]: http.c:1485 handle_uri: match request [ari/asterisk/info] with handler [ari] len 3
[2018-06-27 15:28:20] DEBUG[22381]: http.c:1501 handle_uri: Match made with [ari]
[2018-06-27 15:28:20] DEBUG[22381]: http.c:565 ast_http_send: HTTP keeping session open. status_code:404
The same thing in i try in console:
curl -v -u username:password -X GET “http://ipaddress:8088/ari/asterisk/info”
i get:
* About to connect() to servername.xyz port 8088 (#0)
* Trying ipaddress…
* Connected to servername.xyz (ipaddress) port 8088 (#0)
* Server auth using Basic with user ‘username’
> GET /ari/asterisk/info HTTP/1.1
> Authorization: Basic YXJpcmVwbHl1c2VyOnJlcGx5
> User-Agent: curl/7.29.0
> Host: servername.xyz:8088
> Accept: /
>
< HTTP/1.1 404 Not Found
< Server: Asterisk/13.17.2
< Date: Wed, 27 Jun 2018 13:34:51 GMT
< Cache-Control: no-cache, no-store
< Content-type: application/json
< Content-Length: 37
<
{
“message”: “Resource not found”
* Connection #0 to host servername.xyz left intact
There are someone that have tryied something similar?