]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_callcenter: FS-3158 Change the default and sequentially-by-agent-order strategy...
authorMarc Olivier Chouinard <mochouinard@moctel.com>
Thu, 17 Mar 2011 14:58:39 +0000 (10:58 -0400)
committerMarc Olivier Chouinard <mochouinard@moctel.com>
Thu, 17 Mar 2011 14:58:39 +0000 (10:58 -0400)
src/mod/applications/mod_callcenter/mod_callcenter.c

index 65ad78f5d890fda7f1233cd99eba450866a13d95..b8c5eede74d32fd40131b11f93bc2f040967c8a1 100644 (file)
@@ -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)"