[Home]

Summary:ASTERISK-28429: Bad answer JSON when request ARI
Reporter:Pavel Garshtya (gpfspam@mail.ru)Labels:pjsip
Date Opened:2019-05-25 05:41:39Date Closed:2019-06-12 12:00:02
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_ari
Versions:16.2.0 Frequency of
Occurrence
Constant
Related
Issues:
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/LinuxAttachments:
Description: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"
Comments:By: Asterisk Team (asteriskteam) 2019-05-25 05:41:41.106-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Benjamin Keith Ford (bford) 2019-05-28 14:01:40.864-0500

Where are you pulling this response from? I can enter my data into the Swagger UI and get a correct (200) response back from it.

By: Asterisk Team (asteriskteam) 2019-06-12 12:00:01.913-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines