summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-08-29 13:40:58 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-08-29 13:40:58 -0500
commit0542afa1807d74f5fbf8d8f29e5adc993c65708c (patch)
tree872470b523fd2decc84a808902577e7bf40d5c65 /apps
parent2fa168348e54e2c6662137404ba115c77020854a (diff)
parentf69f5cd3c43025180b61a20cc1aa906c9cf7f4f4 (diff)
Merge "app_queue: Ensure member is removed from pending when hanging up." into 13
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index e04942f68..9b283d467 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4077,6 +4077,17 @@ static void hangupcalls(struct queue_ent *qe, struct callattempt *outgoing, stru
ast_channel_hangupcause_set(outgoing->chan, AST_CAUSE_ANSWERED_ELSEWHERE);
}
ast_channel_publish_dial(qe->chan, outgoing->chan, outgoing->interface, "CANCEL");
+
+ /* When dialing channels it is possible that they may not ever
+ * leave the not in use state (Local channels in particular) by
+ * the time we cancel them. If this occurs but we know they were
+ * dialed we explicitly remove them from the pending members
+ * container so that subsequent call attempts occur.
+ */
+ if (outgoing->member->status == AST_DEVICE_NOT_INUSE) {
+ pending_members_remove(outgoing->member);
+ }
+
ast_hangup(outgoing->chan);
}
oo = outgoing;