I try to try the example in:
wiki.asterisk.org/wiki/display/ … d+with+ARI
it work fine, but when I tried to do (I would channels list):
curl -v -u asterisk:asterisk -X POST “http://192.168.56.12:8088/ari/channels”
I receive:
[code]* About to connect() to 192.168.56.12 port 8088 (#0)
- Trying 192.168.56.12…
- Adding handle: conn: 0x7ff4c900c000
- Adding handle: send: 0
- Adding handle: recv: 0
- Curl_addHandleToPipeline: length: 1
-
- Conn 0 (0x7ff4c900c000) send_pipe: 1, recv_pipe: 0
- Connected to 192.168.56.12 (192.168.56.12) port 8088 (#0)
- Server auth using Basic with user ‘asterisk’
POST /ari/channels HTTP/1.1
Authorization: Basic YXN0ZXJpc2s6YXN0ZXJpc2s=
User-Agent: curl/7.30.0
Host: 192.168.56.12:8088
Accept: /
< HTTP/1.1 400 Bad Request
- Server Asterisk/13.1.0 is not blacklisted
< Server: Asterisk/13.1.0
< Date: Sun, 08 Feb 2015 12:56:37 GMT
< Cache-Control: no-cache, no-store
< Content-type: application/json
< Content-Length: 45
<
{
“message”: “Endpoint must be specified” - Connection #0 to host 192.168.56.12 left intact[/code]
So, I tried:
curl -v -u asterisk:asterisk -X POST -H ‘Content-Type: application/json’ -H ‘Accept: application/json’ -H ‘User-Agent: php-ari’ -d ‘{“endpoint”: “local/1”}’ “http://192.168.56.12:8088/ari/channels”
[code]* About to connect() to 192.168.56.12 port 8088 (#0)
- Trying 192.168.56.12…
- Adding handle: conn: 0x7faa14003a00
- Adding handle: send: 0
- Adding handle: recv: 0
- Curl_addHandleToPipeline: length: 1
-
- Conn 0 (0x7faa14003a00) send_pipe: 1, recv_pipe: 0
- Connected to 192.168.56.12 (192.168.56.12) port 8088 (#0)
- Server auth using Basic with user ‘asterisk’
POST /ari/channels HTTP/1.1
Authorization: Basic YXN0ZXJpc2s6YXN0ZXJpc2s=
Host: 192.168.56.12:8088
Content-Type: application/json
Accept: application/json
User-Agent: php-ari
Content-Length: 23
- upload completely sent off: 23 out of 23 bytes
< HTTP/1.1 400 Bad Request - Server Asterisk/13.1.0 is not blacklisted
< Server: Asterisk/13.1.0
< Date: Sun, 08 Feb 2015 12:58:25 GMT
< Cache-Control: no-cache, no-store
< Content-type: application/json
< Content-Length: 61
<
{
“message”: “Application or extension must be specified” - Connection #0 to host 192.168.56.12 left intact[/code]
What do I mistake?
thanks