From dcafff201e0be2f50f6bc1f952a99f17194ffa13 Mon Sep 17 00:00:00 2001 From: Marc Olivier Chouinard Date: Thu, 17 Mar 2011 10:58:39 -0400 Subject: [PATCH] mod_callcenter: FS-3158 Change the default and sequentially-by-agent-order strategy to include the longest-idle-agent. This should offer a default consistant way to go through all the agent within the same tier/position. (Before, it was left to the DB to return the order of the result) --- src/mod/applications/mod_callcenter/mod_callcenter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_callcenter/mod_callcenter.c b/src/mod/applications/mod_callcenter/mod_callcenter.c index 65ad78f5d8..b8c5eede74 100644 --- a/src/mod/applications/mod_callcenter/mod_callcenter.c +++ b/src/mod/applications/mod_callcenter/mod_callcenter.c @@ -1960,10 +1960,10 @@ static int members_callback(void *pArg, int argc, char **argv, char **columnName switch_safe_free(sql); sql_order_by = switch_mprintf("level, position"); } else if(!strcasecmp(queue_strategy, "sequentially-by-agent-order")) { - sql_order_by = switch_mprintf("level, position"); + sql_order_by = switch_mprintf("level, position, agents.last_offered_call"); /* Default to last_offered_call, let add new strategy if needing it differently */ } else { /* If the strategy doesn't exist, just fallback to the following */ - sql_order_by = switch_mprintf("level, position"); + sql_order_by = switch_mprintf("level, position, agents.last_offered_call"); } sql = switch_mprintf("SELECT system, name, status, contact, no_answer_count, max_no_answer, reject_delay_time, busy_delay_time, no_answer_delay_time, tiers.state, agents.last_bridge_end, agents.wrap_up_time, agents.state, agents.ready_time, tiers.level, agents.type, agents.uuid FROM agents LEFT JOIN tiers ON (agents.name = tiers.agent)"