[asterisk-bugs] [JIRA] (ASTERISK-28429) Bad answer JSON when request ARI

Pavel Garshtya (JIRA) noreply at issues.asterisk.org
Sat May 25 05:42:47 CDT 2019


Pavel Garshtya created ASTERISK-28429:
-----------------------------------------

             Summary: Bad answer JSON when request ARI
                 Key: ASTERISK-28429
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28429
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Resources/res_ari
    Affects Versions: 16.2.0
         Environment: # lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.8 (stretch)
Release:        9.8
Codename:       stretch

# uname -a
Linux asterisk 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
            Reporter: Pavel Garshtya


I use http://ari.asterisk.org

Request URL:
http://192.168.2.5:8088/asterisk/ari/channels?endpoint=PJSIP%2F1002&extension=s&context=obzvon&app=ari&timeout=30&formats=alaw&api_key=test_ari:test_ari

Answer (websocket):
b'\x81~\x02g{\n  "type": "Dial",\n  "timestamp": "2019-05-25T14:36:37.679+0500",\n  "dialstatus": "BUSY",\n  "forward": "",\n  "dialstring": "1002",\n  "peer": {\n    "id": "1558776996.14",\n    "name": "PJSIP/1002-0000000c",\n    "state": "Ringing",\n    "caller": {\n      "name": "",\n      "number": ""\n    },\n    "connected": {\n      "name": "",\n      "number": ""\n    },\n    "accountcode": "",\n    "dialplan": {\n      "context": "from-internal",\n      "exten": "s",\n      "priority": 1\n    },\n    "creationtime": "2019-05-25T14:36:36.704+0500",\n    "language": "ru"\n  },\n  "asterisk_id": "00:0c:29:16:a1:08",\n  "application": "ari"\n}\x81~\x02`{\n  "type": "ChannelDestroyed",\n  "timestamp": "2019-05-25T14:36:37.680+0500",\n  "cause": 17,\n  "cause_txt": "User busy",\n  "channel": {\n    "id": "1558776996.14",\n    "name": "PJSIP/1002-0000000c",\n    "state": "Ringing",\n    "caller": {\n      "name": "",\n      "number": ""\n    },\n    "connected": {\n      "name": "",\n      "number": ""\n    },\n    "accountcode": "",\n    "dialplan": {\n      "context": "from-internal",\n      "exten": "s",\n      "priority": 1\n    },\n    "creationtime": "2019-05-25T14:36:36.704+0500",\n    "language": "ru"\n  },\n  "asterisk_id": "00:0c:29:16:a1:08",\n  "application": "ari"\n}'

I can not parse JSON because "\x81~\x02g"



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list