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);
sql=switch_mprintf("update fifo_outbound set use_count=use_count-1, outbound_call_total_count=outbound_call_total_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);
fifo_execute_sql(sql,globals.sql_mutex);
switch_safe_free(sql);
...
...
@@ -2345,7 +2530,17 @@ static int xml_callback(void *pArg, int argc, char **argv, char **columnNames)
charexp_buf[128]="";
switch_time_exp_ttm;
switch_time_tetime=0;
char*expires=exp_buf;
charatime[128]="";
char*expires=exp_buf,*tb=atime;
intarg=0;
for(arg=0;arg<argc;arg++){
if(!argv[arg]){
argv[arg]="";
}
}
arg=0;
if(argv[7]){
if((etime=atol(argv[7]))){
...
...
@@ -2358,7 +2553,23 @@ static int xml_callback(void *pArg, int argc, char **argv, char **columnNames)
@@ -2917,7 +3164,7 @@ static switch_status_t load_config(int reload, int del_all)
gotodone;
}
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_outbound where static = 1 or taking_calls < 0 or manual_calls_in < 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_release_db_handle(&dbh);
...
...
@@ -2946,6 +3193,10 @@ static switch_status_t load_config(int reload, int del_all)