[Asterisk-code-review] Automatically pause for wrap-up after completion. (asterisk[13])

Joshua Colp asteriskteam at digium.com
Wed May 18 05:12:32 CDT 2016


Joshua Colp has uploaded a new change for review.

  https://gerrit.asterisk.org/2864

Change subject: Automatically pause for wrap-up after completion.
......................................................................

Automatically pause for wrap-up after completion.

This provides a configuration option to turn on full
pausing for wrap-up.  The agent would then have to use
another interface to unpause when they are ready to
accept another call.  This is necessary when after-call
wrap-up time might require making calls to other parties,
among many other possibilities.  Management would then use
queue reports to monitor and gauge agent wrap-up time.

ASTERISK-26032

Change-Id: Ic00109ea7cb1fbd1d1164ff2d674d404303579d5
---
M apps/app_queue.c
1 file changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/64/2864/1

diff --git a/apps/app_queue.c b/apps/app_queue.c
index dbd8393..a45ce1f 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1637,6 +1637,7 @@
 	int autopause;                      /*!< Auto pause queue members if they fail to answer */
 	int autopausedelay;                 /*!< Delay auto pause for autopausedelay seconds since last call */
 	int timeoutpriority;                /*!< Do we allow a fraction of the timeout to occur for a ring? */
+	int pause_wrapup_after_complete;    /*!< Pause all queues with wrap-up reason after a queue call is complete */
 
 	/* Queue strategy things */
 	int rrpos;                          /*!< Round Robin - position */
@@ -2666,6 +2667,7 @@
 	q->randomperiodicannounce = 0;
 	q->numperiodicannounce = 0;
 	q->autopause = QUEUE_AUTOPAUSE_OFF;
+	q->pause_wrapup_after_complete = 0;
 	q->timeoutpriority = TIMEOUT_PRIORITY_APP;
 	q->autopausedelay = 0;
 	if (!q->members) {
@@ -3111,6 +3113,8 @@
 		q->autopausebusy = ast_true(val);
 	} else if (!strcasecmp(param, "autopauseunavail")) {
 		q->autopauseunavail = ast_true(val);
+	} else if (!strcasecmp(param, "pause_wrapup_after_complete")) {
+		q->pause_wrapup_after_complete = ast_true(val);
 	} else if (!strcasecmp(param, "maxlen")) {
 		q->maxlen = atoi(val);
 		if (q->maxlen < 0) {
@@ -6166,6 +6170,16 @@
 			queue_data->holdstart, queue_data->starttime, reason);
 	update_queue(queue_data->queue, queue_data->member, queue_data->callcompletedinsl,
 			time(NULL) - queue_data->starttime);
+
+	/* pause all of the agent's queues after a complete */
+	if (queue_data->queue->pause_wrapup_after_complete) {
+		if (!set_member_paused( (char *) NULL, queue_data->member->interface, "wrap-up", 1)) {
+			ast_verb(3, "Paused %s for after-call wrap-up after call complete.\n", queue_data->member->interface);
+		} else {
+			ast_verb(3, "Failed to pause %s for after-call wrap-up after call complete.\n", queue_data->member->interface);
+		}
+	}
+
 	remove_stasis_subscriptions(queue_data);
 }
 

-- 
To view, visit https://gerrit.asterisk.org/2864
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic00109ea7cb1fbd1d1164ff2d674d404303579d5
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Troy Bowman <troy at lump.net>



More information about the asterisk-code-review mailing list