From: Robert Mordec Date: Tue, 14 Mar 2017 14:27:56 +0000 (+0100) Subject: app_queue: Member stuck as pending after forwarding previous call from queue X-Git-Tag: 14.4.0-rc1~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ae6e16468d34b02933b7ea98db48cf4b64e3fb0;p=thirdparty%2Fasterisk.git app_queue: Member stuck as pending after forwarding previous call from queue Queue member will get stuck in pending_members if queue calls a device that is different from the one observed for state changes. This patch removes members from pending_members as a result of channel stasis events such as blind or attended transfers and hangup. ASTERISK-26862 #close Change-Id: I8bf6df487b9bb35726c08049ff25cdad5e357727 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 6ce9705e58..d465c39c21 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -5539,6 +5539,13 @@ static int update_queue(struct call_queue *q, struct member *member, int callcom member->membername, (long)member->lastcall); ao2_unlock(q); } + /* Member might never experience any direct status change (local + * channel with forwarding in particular). If that's the case, + * this is the last chance to remove it from pending or subsequent + * calls will not occur. + */ + pending_members_remove(member); + ao2_lock(q); q->callscompleted++; if (callcompletedinsl) {