fixed pause time bug when no calls handled in vicidial.php and vdc_db_query.php
git-svn-id: svn://192.168.202.10@498 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -1522,6 +1522,21 @@ else
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
}
|
||||
|
||||
$pause_sec=0;
|
||||
$stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$VDpr_ct = mysql_num_rows($rslt);
|
||||
if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) )
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$pause_sec = (($StarTtime - $row[0]) + $row[1]);
|
||||
|
||||
$stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
}
|
||||
|
||||
echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4752,7 +4752,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
if (xmlhttp)
|
||||
{
|
||||
VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions;
|
||||
VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions;
|
||||
xmlhttp.open('POST', 'vdc_db_query.php');
|
||||
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xmlhttp.send(VDlogout_query);
|
||||
|
||||
Reference in New Issue
Block a user