app_queue: Log reason for PAUSEALL/UNPAUSEALL
authorTroy Bowman <troy@lump.net>
Tue, 4 Apr 2017 16:44:34 +0000 (10:44 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 5 Apr 2017 20:22:00 +0000 (15:22 -0500)
We needed the reason for our reporting when agents pause/unpause all of
their queues at once.  This is a small, simple patch that adds a reason
for PAUSEALL and UNPAUSEALL.  I have been using it in production for years.

ASTERISK-26920 #close

Change-Id: Ifb3f0d1a0abd5194253d9794023546e1395baf3d

CHANGES
apps/app_queue.c

diff --git a/CHANGES b/CHANGES
index f7f8505..9a82e1f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 --- Functionality changes from Asterisk 14 to Asterisk 15 --------------------
 ------------------------------------------------------------------------------
 
+app_queue
+------------------
+ * PAUSEALL/UNPAUSEALL now sets the pause reason in the queue_log if it has
+   been defined.
+
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 14.4.0 to Asterisk 14.5.0 ------------
 ------------------------------------------------------------------------------
index 9bba676..ae2d645 100644 (file)
@@ -7332,7 +7332,7 @@ static int set_member_paused(const char *queuename, const char *interface, const
                                         * but since this affects all queues, we cannot.
                                         */
                                        ast_queue_log("NONE", "NONE", mem->membername,
-                                               (paused ? "PAUSEALL" : "UNPAUSEALL"), "%s", "");
+                                               (paused ? "PAUSEALL" : "UNPAUSEALL"), "%s", S_OR(reason, ""));
                                }
 
                                set_queue_member_pause(q, mem, reason, paused);