]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_queue: Fix leave-empty not recording a call as abandoned
authorKfir Itzhak <mastertheknife@gmail.com>
Wed, 26 Aug 2020 09:58:21 +0000 (12:58 +0300)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Tue, 1 Sep 2020 15:14:41 +0000 (10:14 -0500)
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

apps/app_queue.c

index ba206eb8dc28b4ec334469ec0e35463489de9a9c..d94a8099aab9aaf59bc33f2fb08e0b3e1bcd1568 100644 (file)
@@ -5641,6 +5641,7 @@ static int wait_our_turn(struct queue_ent *qe, int ringing, enum queue_result *r
                        int status = 0;
 
                        if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->raise_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;