Summary: | ASTERISK-25391: AMI GetConfigJSON returns invalid JSON | ||||
Reporter: | Bojan Nemčić (bnemcic) | Labels: | |||
Date Opened: | 2015-09-11 07:25:40 | Date Closed: | 2015-10-06 14:31:54 | ||
Priority: | Minor | Regression? | No | ||
Status: | Closed/Complete | Components: | Core/ManagerInterface | ||
Versions: | 13.5.0 | Frequency of Occurrence | Constant | ||
Related Issues: |
| ||||
Environment: | Debian 8 | Attachments: | |||
Description: | JSON returned by manager action GetConfigJSON is invalid.
Example output (formatted the JSON for readibility): {code} Response: Success JSON: { "100": [ templates: "tpl1", "type": "friend", "host": "dynamic", "nat": "no", "secret": "1234", "context": "sip-phones", "dtmfmode": "rfc2833", "canreinvite": "no", "allowsubscribe": "yes", "relaxdtmf": "yes", "allow": "!all,alaw,ulaw,ilbc,speex16", "pickupgroup": "1", "callgroup": "1", "language": "hr", "cc_agent_policy": "generic", "cc_monitor_policy": "generic", "progressinband": "yes", "callcounter": "yes" ] } {code} According to [specification|http://json.org/], the inner structure should be an object, not an array (in other words, {{\[}} and {{\]}} characters should be {{\{}} and {{\}}}). Additionally, {{templates}} key should be quoted. Correct output of above should be: {code} Response: Success JSON: { "100": { "templates": "tpl1", "type": "friend", "host": "dynamic", "nat": "no", "secret": "1234", "context": "sip-phones", "dtmfmode": "rfc2833", "canreinvite": "no", "allowsubscribe": "yes", "relaxdtmf": "yes", "allow": "!all,alaw,ulaw,ilbc,speex16", "pickupgroup": "1", "callgroup": "1", "language": "hr", "cc_agent_policy": "generic", "cc_monitor_policy": "generic", "progressinband": "yes", "callcounter": "yes" } } {code} Possible duplicate of ASTERISK-25357, but since the description there is vague I created a new one in case the author was referencing something else. | ||||
Comments: | By: Asterisk Team (asteriskteam) 2015-09-11 07:25:44.657-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]. By: Ivan Poddubny (ipoddubny) 2015-10-03 08:15:22.517-0500 Posted a patch for review: https://gerrit.asterisk.org/1370 |