sql=switch_mprintf("update fifo_outbound set use_count=use_count-1, outbound_call_total_count=outbound_call_total_count+1 "
sql=switch_mprintf("update fifo_outbound set use_count=use_count-1, outbound_call_count=outbound_call_count+1, next_avail=%ld + lag where uuid='%s' and use_count > 0",(long)switch_epoch_time_now(NULL),outbound_id);
"outbound_call_count=outbound_call_count+1, next_avail=%ld + lag where uuid='%s' and use_count > 0",
@@ -3269,12 +2886,10 @@ static switch_status_t load_config(int reload, int del_all)
...
@@ -3269,12 +2886,10 @@ static switch_status_t load_config(int reload, int del_all)
gotodone;
gotodone;
}
}
switch_cache_db_test_reactive(dbh,"delete from fifo_outbound where static = 1 or taking_calls < 0 or manual_calls_in_total_count < 0","drop table fifo_outbound",outbound_sql);
switch_cache_db_test_reactive(dbh,"delete from fifo_outbound where static = 1 or taking_calls < 0","drop table fifo_outbound",outbound_sql);
switch_cache_db_test_reactive(dbh,"delete from fifo_bridge","drop table fifo_bridge",bridge_sql);
switch_cache_db_test_reactive(dbh,"delete from fifo_bridge","drop table fifo_bridge",bridge_sql);
switch_cache_db_release_db_handle(&dbh);
switch_cache_db_release_db_handle(&dbh);
fifo_execute_sql("update fifo_outbound set use_count=0,outbound_call_count=0,outbound_fail_count=0",globals.sql_mutex);
if(reload){
if(reload){
switch_hash_index_t*hi;
switch_hash_index_t*hi;
fifo_node_t*node;
fifo_node_t*node;
...
@@ -3298,34 +2913,20 @@ static switch_status_t load_config(int reload, int del_all)
...
@@ -3298,34 +2913,20 @@ static switch_status_t load_config(int reload, int del_all)