[Asterisk-code-review] app_queue: Fix leave-empty not recording a call as abandoned (asterisk[13])

George Joseph asteriskteam at digium.com
Mon Aug 31 08:12:37 CDT 2020


Hello Kfir Itzhak,

I'd like you to do a code review. Please visit

    https://gerrit.asterisk.org/c/asterisk/+/14884

to review the following change.


Change subject: app_queue: Fix leave-empty not recording a call as abandoned
......................................................................

app_queue: Fix leave-empty not recording a call as abandoned

This fixes a bug introduced mistakenly in ASTERISK-25665:
If leave-empty is enabled, a call may sometimes be removed from
a queue without recording it as abandoned.
This causes Asterisk to not generate an abandon event for that
call, and for the queue abandoned counter to be incorrect.

ASTERISK-29043 #close

Change-Id: I1a71b81df78adff59af587f1d8483cf57df430c7
---
M apps/app_queue.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/84/14884/1

diff --git a/apps/app_queue.c b/apps/app_queue.c
index 5d2721b..4db468f 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -5431,6 +5431,7 @@
 			int status = 0;
 
 			if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty, 0))) {
+				record_abandoned(qe);
 				*reason = QUEUE_LEAVEEMPTY;
 				ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) (time(NULL) - qe->start));
 				res = -1;

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14884
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I1a71b81df78adff59af587f1d8483cf57df430c7
Gerrit-Change-Number: 14884
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kfir Itzhak <mastertheknife at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200831/8d2a1a45/attachment-0001.html>


More information about the asterisk-code-review mailing list