From 79069f8ccb45d844afdeb98f64107e4ebf0f4cbc Mon Sep 17 00:00:00 2001 From: Robert Mordec Date: Tue, 14 Mar 2017 15:27:56 +0100 Subject: 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 --- apps/app_queue.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apps/app_queue.c') diff --git a/apps/app_queue.c b/apps/app_queue.c index c0de00173..36e005e36 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -5574,6 +5574,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) { -- cgit v1.2.3