diff --git a/apps/app_queue.c b/apps/app_queue.c index c6dbfa84f1d1a88b9d82f5fffb9f3c0bb7ebde41..0f2df8d16ce74dec0a67290d0be20fc9cc2c2667 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -4266,6 +4266,11 @@ check_turns: if ((res = say_periodic_announcement(&qe,ringing))) goto stop; + /* see if we need to move to the next penalty level for this queue */ + while (qe.pr && ((time(NULL) - qe.start) > qe.pr->time)) { + update_qe_rule(&qe); + } + /* Try calling all queue members for 'timeout' seconds */ res = try_calling(&qe, args.options, args.announceoverride, args.url, &tries, &noption, args.agi, args.macro, args.gosub, ringing); if (res) { @@ -4317,11 +4322,6 @@ check_turns: break; } - /* see if we need to move to the next penalty level for this queue */ - while (qe.pr && ((time(NULL) - qe.start) > qe.pr->time)) { - update_qe_rule(&qe); - } - /* If using dynamic realtime members, we should regenerate the member list for this queue */ update_realtime_members(qe.parent);