diff --git a/apps/app_queue.c b/apps/app_queue.c index 4f5d3e33c3d23ebd5ae52b50bc1fe0b00705298c..b81e0912f57ea7021d7b98ce5f3419c985dea07e 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1214,7 +1214,9 @@ static int say_position(struct queue_ent *qe) /* Set our last_pos indicators */ qe->last_pos = now; qe->last_pos_said = qe->pos; - ast_moh_start(qe->chan, qe->moh); + /* Don't restart music on hold if we're about to exit the caller from the queue */ + if (!res) + ast_moh_start(qe->chan, qe->moh); return res; } @@ -3144,7 +3146,7 @@ check_turns: /* Make a position announcement, if enabled */ if (qe.parent->announcefrequency && !ringing) res = say_position(&qe); - if (res && valid_exit(&qe, res)) { + if (res) { ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITWITHKEY", "%s|%d", qe.digits, qe.pos); break; }