[Asterisk-code-review] Automatically pause for wrap-up after completion. (asterisk[13.9])
Troy Bowman
asteriskteam at digium.com
Tue May 17 17:19:07 CDT 2016
Troy Bowman has uploaded a new change for review.
https://gerrit.asterisk.org/2859
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/59/2859/1
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 7629f08..86bd7c3 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1638,6 +1638,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 */
@@ -2600,6 +2601,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) {
@@ -3045,6 +3047,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) {
@@ -6117,6 +6121,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/2859
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic00109ea7cb1fbd1d1164ff2d674d404303579d5
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13.9
Gerrit-Owner: Troy Bowman <troy at lump.net>
More information about the asterisk-code-review
mailing list