[Home]

Summary:ASTERISK-24803: (Un)PauseQueueMember AMI action writes event to queue_log even on failure
Reporter:WRP (wrp)Labels:
Date Opened:2015-02-17 13:38:38.000-0600Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Core/ManagerInterface
Versions:11.14.0 13.18.4 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:If you attempt to pause an interface/agent that is not in a queue from the Asterisk CLI or via the Asterisk AMI, an error is returned that the interface/agent couldn't be found and so it couldn't be paused or unpaused. When this error occurs in the Asterisk CLI, no PAUSE, PAUSEALL, UNPAUSE, or UNPAUSEALL event is written to queue_log. This makes sense, as the command wasn't successful, so it shouldn't be logged.

This behavior differs when this error situation arises via the Asterisk AMI. If the PauseQueueMember or UnpauseQueueMember command is run and an error is returned, an event is still logged to queue_log. This creates issues downstream when other applications try to process queue_log. They see these pause and unpause events and falsely believe that they actually occurred.

My proposal to a solution is to eliminate writing to the queue_log when PauseQueueMember or UnpauseQueueMember completes with an error.
Comments:By: Matt Jordan (mjordan) 2015-02-20 10:48:15.050-0600

That sounds reasonable.

Would you like to provide a patch?

By: Rusty Newton (rnewton) 2015-03-06 16:28:20.827-0600

WRP if you do decide to contribute a patch then after attaching it to this issue you should submit your patch for code review by the Asterisk Developer Community. To do so, please follow the Code Review [1] instructions on the wiki. Be sure to:
* Verify that your patch conforms to the Coding Guidelines [2]
* Review the Code Review Checklist [3] for common items reviewers will look for
* If necessary, provide tests for the Asterisk Test Suite that verify the correctness of your patch [4]

When ready, submit your patch and any tests to Review Board [5] for code review.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Code+Review
[2] https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines
[3] https://wiki.asterisk.org/wiki/display/AST/Code+Review+Checklist
[4] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Test+Suite+Documentation
[5] https://wiki.asterisk.org/wiki/display/AST/Review+Board+Usage