sql=switch_mprintf("UPDATE members SET state = '%q', session_uuid = '', abandoned_epoch = '%"SWITCH_TIME_T_FMT"' WHERE uuid = '%q' AND system = '%q' AND state != '%q'",
sql=switch_mprintf("SELECT count(*) FROM members WHERE serving_agent = '%q' AND uuid = '%q' AND system = '%q'",cbt->strategy,cbt->member_uuid,globals.core_uuid);
sql=switch_mprintf("SELECT count(*) FROM members WHERE serving_agent = '%q' AND uuid = '%q' AND system = '%q'",cbt->strategy,cbt->member_uuid,globals.cc_instance_id);
@@ -2700,7 +2704,7 @@ void *SWITCH_THREAD_FUNC cc_agent_dispatch_thread_run(switch_thread_t *thread, v
sql=switch_mprintf("SELECT queue,uuid,session_uuid,cid_number,cid_name,joined_epoch,(%"SWITCH_TIME_T_FMT"-joined_epoch)+base_score+skill_score AS score, state, abandoned_epoch, serving_agent, system FROM members"
" WHERE (state = '%q' OR state = '%q' OR (serving_agent = 'ring-all' AND state = '%q') OR (serving_agent = 'ring-progressively' AND state = '%q')) AND system = '%q' ORDER BY score DESC",
sql=switch_mprintf("UPDATE members SET session_uuid = '%q', state = '%q', rejoined_epoch = '%"SWITCH_TIME_T_FMT"', system = '%q' WHERE uuid = '%q' AND state = '%q'",