Summary: | ASTERISK-26643: Extra new line in Device field of DeviceStateChange AMI Event after restart of Asterisk | ||
Reporter: | Roman Bedros (rbedros) | Labels: | |
Date Opened: | 2016-12-06 06:17:08.000-0600 | Date Closed: | 2017-03-15 01:02:12 |
Priority: | Minor | Regression? | |
Status: | Closed/Complete | Components: | Functions/func_devstate |
Versions: | 14.2.0 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | OpenSUSE 13.2 32bit | Attachments: | ( 0) ami_devstate.diff |
Description: | h4. Symptoms
DeviceStateChange AMI Event contains an extra new-line character in the Device field after restart of the Asterisk. h4. Steps to reproduce: # Add a custom device state from CLI: {{devstate change Custom:test INUSE}} # Restart Asterisk {{service asterisk restart}} # Connect to Asterisk via AMI {{telnet XX.XX.XX.XX 5038}} # Login {{Action:Login}} {{Username:xxxxx}} {{Secret:xxxxx}} # Request device states {{Action:DeviceStateList}} Asterisk replies by the following messages: {quote} Response: Success EventList: start Message: Device State Changes will follow Event: DeviceStateChange Device: Custom:test State: INUSE Event: DeviceStateListComplete EventList: Complete ListItems: 1 {quote} There is an extra empty line in DeviceStateChange event message. If step 2 is skipped, Asterisk responds without an extra new line. h4. Patch A patch (attached in a comment) which fixes this issue was created, but I'm not sure that it doesn't break anything else. | ||
Comments: | By: Asterisk Team (asteriskteam) 2016-12-06 06:17:08.956-0600 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: Roman Bedros (rbedros) 2016-12-06 06:27:22.701-0600 A patch which eliminates described symptoms. By: Rusty Newton (rnewton) 2016-12-09 08:44:15.443-0600 Once you've followed the Code Review process [1] and submitted your code to Gerrit [2] be sure to edit this JIRA issue and add the Gerrit review URL in the appropriate field. Thanks! [1] https://wiki.asterisk.org/wiki/display/AST/Code+Review [2] https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage By: Friendly Automation (friendly-automation) 2017-03-15 01:02:13.119-0500 Change 5189 merged by zuul: funcs/func_devstate: Remove new line in Device field of during module load [https://gerrit.asterisk.org/5189|https://gerrit.asterisk.org/5189] By: Friendly Automation (friendly-automation) 2017-03-15 05:21:25.907-0500 Change 5190 merged by Joshua Colp: funcs/func_devstate: Remove new line in Device field of during module load [https://gerrit.asterisk.org/5190|https://gerrit.asterisk.org/5190] By: Friendly Automation (friendly-automation) 2017-03-15 20:14:25.767-0500 Change 5191 merged by zuul: funcs/func_devstate: Remove new line in Device field of during module load [https://gerrit.asterisk.org/5191|https://gerrit.asterisk.org/5191] |