[Asterisk-code-review] Unpausing of wrap-up should grant grace time. (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/2860
Change subject: Unpausing of wrap-up should grant grace time.
......................................................................
Unpausing of wrap-up should grant grace time.
If an agent unpauses from wrap-up, they should get
Asterisk's internal wrap-up grace time to allow them to
pause again, for another reason.
For example, if an agent finishes their wrap-up after
a call, and then if they need to go on break, this
would allow them to re-pause for break without having
a new call instantly come in when they unpause from
wrap-up.
ASTERISK-26032
Change-Id: If1119dd490c17429741d6974550da34d266c066f
---
M apps/app_queue.c
1 file changed, 17 insertions(+), 3 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/60/2860/1
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 86bd7c3..7837cfe 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1358,6 +1358,8 @@
static char *app_ql = "QueueLog" ;
+static char *wrap_up = "wrap-up";
+
/*! \brief Persistent Members astdb family */
static const char * const pm_family = "Queue/PersistentMembers";
@@ -6124,10 +6126,10 @@
/* 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);
+ if (!set_member_paused( (char *) NULL, queue_data->member->interface, wrap_up, 1)) {
+ ast_verb(3, "Paused %s for after-call %s after call complete.\n", queue_data->member->interface, wrap_up);
} else {
- ast_verb(3, "Failed to pause %s for after-call wrap-up after call complete.\n", queue_data->member->interface);
+ ast_verb(3, "Failed to pause %s for after-call %s after call complete.\n", queue_data->member->interface, wrap_up);
}
}
@@ -7137,6 +7139,18 @@
ast_copy_string(mem->reason_paused, reason, sizeof(mem->reason_paused));
}
} else {
+ ast_debug(1, "%s was paused for %s.\n", mem->interface, mem->reason_paused);
+
+ /* if we're using pause_wrapup_after_complete, we want to
+ * reset lastcall after a wrap-up pause to give a grace
+ * period from wrapup after un-pausing for wrap-up.
+ * e.g., done with wrap-up pause, going on break now.
+ */
+ if (q->pause_wrapup_after_complete && !strcmp(mem->reason_paused, wrap_up)) {
+ ast_debug(1, "resetting lastcall for %s because they were paused for %s.\n", mem->interface, mem->reason_paused);
+ mem->lastcall = time(NULL);
+ }
+
ast_copy_string(mem->reason_paused, "", sizeof(mem->reason_paused));
}
--
To view, visit https://gerrit.asterisk.org/2860
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If1119dd490c17429741d6974550da34d266c066f
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