Small fixes for logging and agentdirect display

git-svn-id: svn://192.168.202.10@1317 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-01-26 12:10:45 +00:00
parent a3748fd9a5
commit 236cd83d76
3 changed files with 36 additions and 28 deletions
+1 -1
View File
@@ -267,7 +267,7 @@ if ($record_call =~ /Y/)
$AGI->exec("Monitor wav|/var/spool/asterisk/monitor/MIX/$filename");
### insert record into recording_log table ###
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,length_in_sec,filename,lead_id,user,location,vicidial_id) values('$channel','$VARserver_ip','$extension','$SQLdate','$now_date_epoch','0','$filename','0','$callerid','$filename','$unique_id');";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,length_in_sec,filename,lead_id,user,location,vicidial_id) values('$channel','$VARserver_ip','$callerid','$SQLdate','$now_date_epoch','0','$filename','0','$extension','$filename','$unique_id');";
$affected_rowsR = $dbhA->do($stmtA);
if ($affected_rowsR > 0)
{
+1 -1
View File
@@ -665,6 +665,7 @@ sub process_request
}
}
$sthA->finish();
}
### BEGIN Double-log end logging ###
$DOUBLEunique_id = $unique_id . "99";
@@ -691,7 +692,6 @@ sub process_request
$sthA->finish();
### END Double-log end logging ###
}
}
$stmtA = "DELETE from live_inbound where uniqueid IN('$unique_id','$CALLunique_id') and server_ip='$VARserver_ip'";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
+10 -2
View File
@@ -431,6 +431,7 @@ $CIDdate = date("mdHis");
$ENTRYdate = date("YmdHis");
$MT[0]='';
$agents='@agents';
$US='_';
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
@@ -6243,6 +6244,7 @@ if ($ACTION == 'AGENTSview')
if ($comments=='AgentXferViewSelect')
{
$AXVSuserORDER[$j] = "$full_name$US$j";
$AXVSuser[$j] = $user;
$AXVSfull_name[$j] = $full_name;
$AXVScall_time[$j] = $call_time;
@@ -6279,6 +6281,7 @@ if ($ACTION == 'AGENTSview')
if ($comments=='AgentXferViewSelect')
{
$AXVSuserORDER[$j] = "$full_name$US$j";
$AXVSuser[$j] = $user;
$AXVSfull_name[$j] = $full_name;
$AXVScall_time[$j] = '0:00';
@@ -6314,11 +6317,16 @@ if ($ACTION == 'AGENTSview')
$AXVSrecords = ($j / $AXVScolumns);
$AXVSrecords = round($AXVSrecords, 0);
$m=0;
sort($AXVSuserORDER);
while ($j > $k)
{
echo "<TR BGCOLOR=\"$AXVSstatuscolor[$k]\"><TD><font style=\"font-size: $AXVSfontsize; font-family: sans-serif;\"> &nbsp; <a href=\"#\" onclick=\"AgentsXferSelect('$AXVSuser[$k]','AgentXferViewSelect');return false;\">$AXVSuser[$k] - $AXVSfull_name[$k]</a>&nbsp;</font></TD>";
$order_split = explode("_",$AXVSuserORDER[$k]);
$i = $order_split[1];
echo "<TR BGCOLOR=\"$AXVSstatuscolor[$i]\"><TD><font style=\"font-size: $AXVSfontsize; font-family: sans-serif;\"> &nbsp; <a href=\"#\" onclick=\"AgentsXferSelect('$AXVSuser[$i]','AgentXferViewSelect');return false;\">$AXVSuser[$i] - $AXVSfull_name[$i]</a>&nbsp;</font></TD>";
if ($agent_status_view_time > 0)
{echo "<TD><font style=\"font-size: $AXVSfontsize; font-family: sans-serif;\">&nbsp; $AXVScall_time[$k] &nbsp;</font></TD>";}
{echo "<TD><font style=\"font-size: $AXVSfontsize; font-family: sans-serif;\">&nbsp; $AXVScall_time[$i] &nbsp;</font></TD>";}
echo "</TR>";
$k++;