Added recording ability for Remote Agents

Added logged-in-user displayed in admin pages
Added the PDROP status for outbound auto-dial
Changed some logging of calls when using CPD

git-svn-id: svn://192.168.202.10@1629 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2011-03-25 03:52:14 +00:00
parent 35619e7dea
commit 9779c2ad54
13 changed files with 401 additions and 26 deletions
+5
View File
@@ -520,6 +520,11 @@ OTHER CHANGES:
halt executiong of javascript on the agent workstation. This change
should require no alterations to any configurations.
120. Added recording of Remote Agents calls per recording settings in campaigns.
If recording is set to ALLCALLS or ALLFORCE then a recording will be
initiated for the call upon routing to the Remote Agent and will be tied
to the R/ user and the lead_id. Also works with on-hook enabled.
+17 -3
View File
@@ -21,7 +21,7 @@
# exten => _8320*.,1,AGI(VD_amd.agi,${EXTEN}-----YES)
# exten => _8320*.,2,Hangup
#
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# changes:
# 60206-1434 first build
@@ -39,6 +39,7 @@
# 100823-0850 - Changed vac to UPDATE for Auto-alt-dial to function properly
# 100903-0041 - Changed lead_id max length to 10 digits
# 101111-1552 - Fixed minor bug in TTS filtering
# 110324-2334 - Logging changes made
#
$script = 'VD_amd.agi';
@@ -341,20 +342,33 @@ else
if ($AGILOG) {$agi_string = "-- VDAC record updated: |$affected_rows| |$VD_lead_id|$uniqueid|$VD_callerid"; &agi_output;}
########## FIND AND UPDATE vicidial_log ##########
$stmtA = "SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$VD_lead_id' order by call_date desc limit 1;";
$Euniqueid=$uniqueid;
$Euniqueid =~ s/\.\d+$//gi;
$stmtA = "SELECT start_epoch,uniqueid FROM vicidial_log where lead_id='$VD_lead_id' and uniqueid LIKE \"$Euniqueid%\" order by call_date desc limit 10;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$epc_countCUSTDATA=0;
$first_uniqueid='';
while ($sthArows > $epc_countCUSTDATA)
{
@aryA = $sthA->fetchrow_array;
$VD_start_epoch = $aryA[0];
$uniqueid = $aryA[1];
if ($epc_countCUSTDATA < 1) {$first_uniqueid = $aryA[1];}
$epc_countCUSTDATA++;
}
$sthA->finish();
if ($epc_countCUSTDATA > 1)
{
$stmtA = "DELETE from vicidial_log where uniqueid='$first_uniqueid' and lead_id='$VD_lead_id' limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log duplicate delete: |$affected_rows|$uniqueid|$first_uniqueid|$VD_lead_id|"; &agi_output;}
}
if (!$epc_countCUSTDATA)
{
if ($AGILOG) {$agi_string = "no VDL record found: $uniqueid $calleridname $VD_lead_id $uniqueid"; &agi_output;}
@@ -583,7 +597,7 @@ else
{$AGI->stream_file("$DB_am_message_exten");}
$stmtA = "UPDATE vicidial_log set status='AL' where lead_id='$VD_lead_id' order by call_date desc limit 1;";
$stmtA = "UPDATE vicidial_log set status='AL' where uniqueid='$uniqueid' and lead_id='$VD_lead_id' order by call_date desc limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log AL update: |$affected_rows|$uniqueid|"; &agi_output;}
+73 -3
View File
@@ -146,6 +146,7 @@
# 101219-2110 - Added call time overflow
# 110224-1735 - Added compatibility with QM phone environment logging
# 110303-2338 - Added on-hook agent compatibility and rewrote a few sections
# 110324-2330 - Added recording of remote agent calls, per in-group and campaign recording settings
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -587,7 +588,7 @@ $sthA->finish();
### Grab inbound groups values from the database
$cbc=0;
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time FROM vicidial_inbound_groups where group_id = '$channel_group';";
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,ingroup_recording_override,ingroup_rec_filename FROM vicidial_inbound_groups where group_id = '$channel_group';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -669,7 +670,8 @@ if ($sthArows > 0)
$eht_minimum_prompt_no_block = $aryA[64];
$eht_minimum_prompt_seconds = $aryA[65];
$on_hook_ring_time = $aryA[66];
$ingroup_recording_override = $aryA[67];
$campaign_rec_filename = $aryA[68];
$custom_call_id='';
if ($uniqueid_status_display =~ /ENABLED/)
{$custom_call_id = "$uniqueid";}
@@ -2392,6 +2394,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
### BEGIN REMOTE AGENT SECTION
if ( ($VDADextension =~ /^R\//) && (length($AGENTextension) < 2) )
{
$extension_campaign_id='';
### set the callerid to the ACQS value(calleridname)
## use these two lines for Asterisk 1.2 tree
$newcallerid = "\"$callerid <$phone_number>\"";
@@ -2408,7 +2411,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
if (length($ra_user) > 0)
{
$extension_group='';
$stmtA = "SELECT extension_group,extension_group_order FROM vicidial_remote_agents where user_start='$ra_user';";
$stmtA = "SELECT extension_group,extension_group_order,campaign_id FROM vicidial_remote_agents where user_start='$ra_user';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -2418,6 +2421,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
@aryA = $sthA->fetchrow_array;
$extension_group = $aryA[0];
$extension_group_order = $aryA[1];
$extension_campaign_id = $aryA[2];
}
$sthA->finish();
if ( (length($extension_group) > 0) and ($extension_group !~ /^NONE/) )
@@ -2466,6 +2470,72 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$RALaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01138'; $MEL_aff_rows=$RALaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE EXTEN LOG : |$RALaffected_rows|CID changed: \"$callerid\" \<$phone_number\>\n|$stmtA|"; &agi_output;}
if ( (length($extension_campaign_id) > 0) && ($ingroup_recording_override =~ /DISABLED/) )
{
$stmtA = "SELECT campaign_recording,campaign_rec_filename FROM vicidial_campaigns where campaign_id='$extension_campaign_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='01134'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$ingroup_recording_override = $aryA[0];
$campaign_rec_filename = $aryA[1];
}
$sthA->finish();
}
### if recording is enabled then start recording on this call before sending to a remote agent
if ($ingroup_recording_override =~ /ALLCALLS|ALLFORCE/)
{
$stmtA = "SELECT vendor_lead_code FROM vicidial_list where lead_id='$insert_lead_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$vendor_lead_code = $aryA[0];
}
$sthA->finish();
# get date/time
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$Tyear = ($year - 2000);
$mon++;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
if ($hour < 10) {$hour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
$now_date_epoch = time();
$now_date = "$year-$mon-$mday $hour:$min:$sec";
$recdate = "$year$mon$mday-$hour$min$sec";
$tinydate = "$Tyear$mon$mday$hour$min$sec";
$campaign_rec_filename =~ s/CAMPAIGN/$VDADcampaign/gi;
$campaign_rec_filename =~ s/CUSTPHONE/$phone_number/gi;
$campaign_rec_filename =~ s/FULLDATE/$recdate/gi;
$campaign_rec_filename =~ s/TINYDATE/$tinydate/gi;
$campaign_rec_filename =~ s/EPOCH/$now_date_epoch/gi;
$campaign_rec_filename =~ s/AGENT/$VDADuser/gi;
$campaign_rec_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$campaign_rec_filename =~ s/LEADID/$insert_lead_id/gi;
$campaign_rec_filename =~ s/\"|\'//gi;
$AGI->exec("Monitor wav|/var/spool/asterisk/monitor/MIX/$campaign_rec_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','$phone_number','$now_date','$now_date_epoch','0','$campaign_rec_filename','$insert_lead_id','$VDADuser','$campaign_rec_filename','$uniqueid');";
$RLRAaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$RLRAaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE RECORDING STARTED : |$RLRAaffected_rows|$campaign_rec_filename|$stmtA|"; &agi_output;}
}
}
### END REMOTE AGENT SECTION
else
+109 -3
View File
@@ -82,6 +82,7 @@
# 110213-0008 - Added scheduled callbacks custom statuses compatibility
# 110224-1733 - Added compatibility with QM phone environment logging
# 110303-2316 - Added condition that would not allow calls to be sent to agent with ringing inbound call
# 110324-2326 - Added recording of remote agent calls, per in-group and campaign recording settings
#
$script = 'agi-VDAD_ALL_outbound.agi';
@@ -98,6 +99,7 @@ $US='_';
# get date/time
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$Tyear = ($year - 2000);
$mon++;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
@@ -113,6 +115,8 @@ $start_time=$now_date;
$CIDdate = "$mon$mday$hour$min$sec";
$tsSQLdate = "$year$mon$mday$hour$min$sec";
$filedate = "$US$year-$mon-$mday$US$hour$min$sec";
$recdate = "$year$mon$mday-$hour$min$sec";
$tinydate = "$Tyear$mon$mday$hour$min$sec";
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
$SQLdateBEGIN = $SQLdate;
@@ -374,8 +378,8 @@ if ($dialplan_duplicate_count > 0)
### Grab call parameters from vicidial_auto_calls table
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE',stage='LIVE-0' where callerid='$callerid' order by call_time desc limit 1;";
$VDACaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01004'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
$dbhP=$dbhA; $mysql_count='01004'; $MEL_aff_rows=$VDACaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDAD : |$VDACaffected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
if ($VDACaffected_rows < 1)
{
if ($AGILOG) {$agi_string = "-- NO VDAC FOUND!!!!!: $callerid"; &agi_output;}
@@ -471,7 +475,7 @@ if ($VDACaffected_rows > 0)
$sthA->finish();
### Grab campaign values from the database
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc,cpd_amd_action,am_message_exten,three_way_call_cid,campaign_cid,survey_first_audio_file,survey_opt_in_audio_file,survey_ni_audio_file,survey_third_audio_file,survey_fourth_audio_file,extension_appended_cidname,queue_priority,closer_campaigns,queuemetrics_phone_environment FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc,cpd_amd_action,am_message_exten,three_way_call_cid,campaign_cid,survey_first_audio_file,survey_opt_in_audio_file,survey_ni_audio_file,survey_third_audio_file,survey_fourth_audio_file,extension_appended_cidname,queue_priority,closer_campaigns,queuemetrics_phone_environment,campaign_recording,campaign_rec_filename FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -504,6 +508,8 @@ if ($VDACaffected_rows > 0)
$VDADqueue_priority = $aryA[19];
$closer_campaigns = $aryA[20];
$queuemetrics_phone_environment = $aryA[21];
$campaign_recording = $aryA[22];
$campaign_rec_filename = $aryA[23];
if (length($closer_campaigns) > 2)
{
$closer_campaigns =~ s/^ | -$//gi;
@@ -1751,6 +1757,56 @@ while ($drop_timer <= $DROP_TIME)
$RALaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01064'; $MEL_aff_rows=$RALaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE EXTEN LOG : |$RALaffected_rows|CID changed: \"$callerid\" \<$VDADphone\>\n|$stmtA|"; &agi_output;}
### if recording is enabled then start recording on this call before sending to a remote agent
if ($campaign_recording =~ /ALLCALLS|ALLFORCE/)
{
$stmtA = "SELECT vendor_lead_code FROM vicidial_list where lead_id='$CIDlead_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$vendor_lead_code = $aryA[0];
}
$sthA->finish();
# get date/time
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$Tyear = ($year - 2000);
$mon++;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
if ($hour < 10) {$hour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
$now_date_epoch = time();
$now_date = "$year-$mon-$mday $hour:$min:$sec";
$recdate = "$year$mon$mday-$hour$min$sec";
$tinydate = "$Tyear$mon$mday$hour$min$sec";
$campaign_rec_filename =~ s/CAMPAIGN/$VDADcampaign/gi;
$campaign_rec_filename =~ s/CUSTPHONE/$VDADphone/gi;
$campaign_rec_filename =~ s/FULLDATE/$recdate/gi;
$campaign_rec_filename =~ s/TINYDATE/$tinydate/gi;
$campaign_rec_filename =~ s/EPOCH/$now_date_epoch/gi;
$campaign_rec_filename =~ s/AGENT/$VDADuser/gi;
$campaign_rec_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$campaign_rec_filename =~ s/LEADID/$CIDlead_id/gi;
$campaign_rec_filename =~ s/\"|\'//gi;
$AGI->exec("Monitor wav|/var/spool/asterisk/monitor/MIX/$campaign_rec_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','$VDADphone','$now_date','$now_date_epoch','0','$campaign_rec_filename','$CIDlead_id','$VDADuser','$campaign_rec_filename','$uniqueid');";
$RLRAaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$RLRAaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE RECORDING STARTED : |$RLRAaffected_rows|$campaign_rec_filename|$stmtA|"; &agi_output;}
}
}
### END REMOTE AGENT SECTION
else
@@ -2140,6 +2196,56 @@ while ($drop_timer <= $DROP_TIME)
$RALaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01065'; $MEL_aff_rows=$RALaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE EXTEN LOG : |$RALaffected_rows|CID changed: \"$callerid\" \<$VDADphone\>\n|$stmtA|"; &agi_output;}
### if recording is enabled then start recording on this call before sending to a remote agent
if ($campaign_recording =~ /ALLCALLS|ALLFORCE/)
{
$stmtA = "SELECT vendor_lead_code FROM vicidial_list where lead_id='$CIDlead_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$vendor_lead_code = $aryA[0];
}
$sthA->finish();
# get date/time
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$Tyear = ($year - 2000);
$mon++;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
if ($hour < 10) {$hour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
$now_date_epoch = time();
$now_date = "$year-$mon-$mday $hour:$min:$sec";
$recdate = "$year$mon$mday-$hour$min$sec";
$tinydate = "$Tyear$mon$mday$hour$min$sec";
$campaign_rec_filename =~ s/CAMPAIGN/$VDADcampaign/gi;
$campaign_rec_filename =~ s/CUSTPHONE/$VDADphone/gi;
$campaign_rec_filename =~ s/FULLDATE/$recdate/gi;
$campaign_rec_filename =~ s/TINYDATE/$tinydate/gi;
$campaign_rec_filename =~ s/EPOCH/$now_date_epoch/gi;
$campaign_rec_filename =~ s/AGENT/$VDADuser/gi;
$campaign_rec_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$campaign_rec_filename =~ s/LEADID/$CIDlead_id/gi;
$campaign_rec_filename =~ s/\"|\'//gi;
$AGI->exec("Monitor wav|/var/spool/asterisk/monitor/MIX/$campaign_rec_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','$VDADphone','$now_date','$now_date_epoch','0','$campaign_rec_filename','$CIDlead_id','$VDADuser','$campaign_rec_filename','$uniqueid');";
$RLRAaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$RLRAaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE RECORDING STARTED : |$RLRAaffected_rows|$campaign_rec_filename|$stmtA|"; &agi_output;}
}
}
### END REMOTE AGENT SECTION
else
+64 -1
View File
@@ -16,6 +16,7 @@
#
# changes:
# 110303-2325 - First build
# 110324-2328 - Added recording of remote agent calls, per in-group and campaign recording settings
#
$script = 'agi-VDAD_RINGALL.agi';
@@ -247,7 +248,6 @@ if ($NAGcount > 0)
$AVCaffected_rows = $dbhA->do($stmtA);
if ($AVCaffected_rows)
{
$stmtA="SELECT conf_exten from vicidial_conferences where server_ip='$VLAserver_ip' and extension='3WAY_$dial_user' and leave_3way_datetime='$now_date' and conf_exten != '$VLAconf_exten';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -258,6 +258,69 @@ if ($NAGcount > 0)
$VLAconf_exten = $aryA[0];
$sthA->finish();
if ($AGILOG) {$agi_string = "-- AVC Session Reserved: |$callerid|$auto_call_id|$dial_user|3WAY_$dial_user|$now_date|$VLAconf_exten|"; &agi_output;}
if (length($VLAcampaign_id) > 0)
{
$stmtA = "SELECT campaign_recording,campaign_rec_filename FROM vicidial_campaigns where campaign_id='$VLAcampaign_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$VCRcount=$sthA->rows;
if ($VCRcount > 0)
{
@aryA = $sthA->fetchrow_array;
$campaign_recording = $aryA[0];
$campaign_rec_filename = $aryA[1];
}
$sthA->finish();
}
### if recording is enabled then start recording on this call before sending to a remote agent
if ($campaign_recording =~ /ALLCALLS|ALLFORCE/)
{
$stmtA = "SELECT vendor_lead_code FROM vicidial_list where lead_id='$VAC_lead_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$vendor_lead_code = $aryA[0];
}
$sthA->finish();
# get date/time
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$Tyear = ($year - 2000);
$mon++;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
if ($hour < 10) {$hour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
$now_date_epoch = time();
$now_date = "$year-$mon-$mday $hour:$min:$sec";
$recdate = "$year$mon$mday-$hour$min$sec";
$tinydate = "$Tyear$mon$mday$hour$min$sec";
$campaign_rec_filename =~ s/CAMPAIGN/$VLAcampaign_id/gi;
$campaign_rec_filename =~ s/CUSTPHONE/$VAC_phone_number/gi;
$campaign_rec_filename =~ s/FULLDATE/$recdate/gi;
$campaign_rec_filename =~ s/TINYDATE/$tinydate/gi;
$campaign_rec_filename =~ s/EPOCH/$now_date_epoch/gi;
$campaign_rec_filename =~ s/AGENT/$dial_user/gi;
$campaign_rec_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$campaign_rec_filename =~ s/LEADID/$VAC_lead_id/gi;
$campaign_rec_filename =~ s/\"|\'//gi;
$AGI->exec("Monitor wav|/var/spool/asterisk/monitor/MIX/$campaign_rec_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','$VAC_phone_number','$now_date','$now_date_epoch','0','$campaign_rec_filename','$VAC_lead_id','$dial_user','$campaign_rec_filename','$uniqueid');";
$RLRAaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- REMOTE RECORDING STARTED : |$RLRAaffected_rows|$campaign_rec_filename|$stmtA|"; &agi_output;}
}
}
else
{
+17 -1
View File
@@ -589,12 +589,28 @@ while($one_day_interval > 0)
$result =~ s/Result: |\s*$//gi;
if (length($result)>0)
{
# 2011-03-22 13:22:12.123 (1277187888 123 456)
# ALTER TABLE vicidial_cpd_log ADD hires_time VARCHAR(26) default '';
# ($s_hires, $usec) = gettimeofday(); # get seconds and microseconds since the epoch
# $usec = sprintf("%06s", $usec);
# $HRmsec = substr($usec, -6);
# ($HRsec,$HRmin,$HRhour,$HRmday,$HRmon,$HRyear,$HRwday,$HRyday,$HRisdst) = localtime($s_hires);
# $HRyear = ($HRyear + 1900);
# $HRmon++;
# if ($HRmon < 10) {$HRmon = "0$HRmon";}
# if ($HRmday < 10) {$HRmday = "0$HRmday";}
# if ($HRhour < 10) {$HRFhour = "0$HRhour";}
# if ($HRmin < 10) {$HRmin = "0$HRmin";}
# if ($HRsec < 10) {$HRsec = "0$HRsec";}
# $HRnow_date = "$HRyear-$HRmon-$HRmday $HRhour:$HRmin:$HRsec.$HRmsec";
$lead_id = substr($callid, 10, 10);
$lead_id = ($lead_id + 0);
# $stmtA = "INSERT INTO vicidial_cpd_log set channel='$channel', uniqueid='$uniqueid', callerid='$callid', server_ip='$server_ip', lead_id='$lead_id', event_date='$now_date', result='$result', hires_time='$HRnow_date';";
$stmtA = "INSERT INTO vicidial_cpd_log set channel='$channel', uniqueid='$uniqueid', callerid='$callid', server_ip='$server_ip', lead_id='$lead_id', event_date='$now_date', result='$result';";
print STDERR "|$stmtA|\n";
my $affected_rows = $dbhA->do($stmtA);
if($DB){print "|$affected_rows CPD_log inserted|\n";}
if($DB){print "|$affected_rows CPD_log inserted|$HRnow_date|$s_hires|$usec|\n";}
}
}
}
+105 -12
View File
@@ -60,6 +60,7 @@
# 101123-0443 - Fixed minor parked call manual dial bug
# 110224-1854 - Added compatibility with QM phone environment logging
# 110304-0005 - Small changes for CPD and on-hook agent features
# 110324-2336 - Changes to CPD logging of calls and addition of the PDROP status
#
# defaults for PreFork
@@ -158,6 +159,7 @@ use Asterisk::AGI;
use vars qw(@ISA);
use Net::Server::PreFork; # any personality will do
@ISA = qw(Net::Server::PreFork);
use Time::HiRes ('gettimeofday','usleep','sleep'); # necessary to have perl sleep command of less than one second
@@ -776,13 +778,28 @@ sub process_request
# V2251502010052435563
if ($callerid =~ /^V\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/)
{
# ($s_hires, $usec) = gettimeofday(); # get seconds and microseconds since the epoch
# $usec = sprintf("%06s", $usec);
# $HRmsec = substr($usec, -6);
# ($HRsec,$HRmin,$HRhour,$HRmday,$HRmon,$HRyear,$HRwday,$HRyday,$HRisdst) = localtime($s_hires);
# $HRyear = ($HRyear + 1900);
# $HRmon++;
# if ($HRmon < 10) {$HRmon = "0$HRmon";}
# if ($HRmday < 10) {$HRmday = "0$HRmday";}
# if ($HRhour < 10) {$HRFhour = "0$HRhour";}
# if ($HRmin < 10) {$HRmin = "0$HRmin";}
# if ($HRsec < 10) {$HRsec = "0$HRsec";}
# $HRnow_date = "$HRyear-$HRmon-$HRmday $HRhour:$HRmin:$HRsec.$HRmsec";
#
# if ($AGILOG) {$agi_string = "HiRes Time: $callerid|$channel|$priority|$CIDlead_id|$uniqueid|$HRnow_date|$now_date"; &agi_output;}
##############################################################
### BEGIN - CPD Look for result for B/DC calls
##############################################################
sleep(1);
$stmtA = "SELECT result FROM vicidial_cpd_log where callerid='$callerid' and result NOT IN('Voice','Unknown','???','') order by cpd_id desc limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -808,6 +825,7 @@ sub process_request
if ($cpd_result =~ /Answering-Machine/i) {$VDL_status='AA'; $VDAC_status='AMD'; $CPDfound++;}
}
$sthA->finish();
if ($AGILOG) {$agi_string = "$sthArows|$cpd_result|$stmtA|"; &agi_output;}
##############################################################
### END - CPD Look for result for B/DC calls
##############################################################
@@ -836,6 +854,66 @@ sub process_request
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$VDLaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log update: |$VDLaffected_rows|$uniqueid|$VDACuniqueid|"; &agi_output;}
if ($VDLaffected_rows < 1)
{
$VD_alt_dial = 'NONE';
$stmtA = "SELECT lead_id,callerid,campaign_id,alt_dial,stage,UNIX_TIMESTAMP(call_time),uniqueid,status,call_time,phone_code,phone_number,queue_position FROM vicidial_auto_calls where uniqueid = '$uniqueid' or callerid = '$callerid' limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_countCUSTDATA=0;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$VD_lead_id = $aryA[0];
$VD_callerid = $aryA[1];
$VD_campaign_id = $aryA[2];
$VD_alt_dial = $aryA[3];
$VD_stage = $aryA[4];
$VD_start_epoch = $aryA[5];
$VD_uniqueid = $aryA[6];
$VD_status = $aryA[7];
$VD_call_time = $aryA[8];
$VD_phone_code = $aryA[9];
$VD_phone_number = $aryA[10];
$VD_queue_position = $aryA[11];
$rec_countCUSTDATA++;
}
$sthA->finish();
if ($sthArows > 0)
{
$stmtA = "SELECT list_id FROM vicidial_list where lead_id='$VD_lead_id' limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsVLd=$sthA->rows;
if ($sthArowsVLd > 0)
{
@aryA = $sthA->fetchrow_array;
$VD_list_id = $aryA[0];
}
$sthA->finish();
$stmtA = "INSERT INTO vicidial_log SET uniqueid='$uniqueid',lead_id='$VD_lead_id',list_id='$VD_list_id',status='$VDL_status',campaign_id='$VD_campaign_id',call_date='$VD_call_time',start_epoch='$VD_start_epoch',phone_code='$VD_phone_code',phone_number='$VD_phone_number',user='VDAD',processed='N',length_in_sec='0',end_epoch='$VD_start_epoch',alt_dial='$VD_alt_dial';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$VDLIaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log insert: |$VDLIaffected_rows|$uniqueid|$CIDlead_id|$VDL_status|"; &agi_output;}
$stmtA="INSERT IGNORE INTO vicidial_log_extended SET uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$VD_call_time',lead_id='$VD_lead_id',caller_code='$VD_callerid',custom_call_id='' ON DUPLICATE KEY UPDATE server_ip='$VARserver_ip',call_date='$VD_call_time',lead_id='$VD_lead_id',caller_code='$VD_callerid';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$VDLXaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_extended_log insert: |$VDLXaffected_rows|$uniqueid|$CIDlead_id|$VDL_status|"; &agi_output;}
}
}
if ( ($CPDfound > 0) && ($VDL_status !~ /AA/) )
{
$stmtA = "DELETE FROM vicidial_auto_calls where callerid = '$callerid';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$VDACDELaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- CPD VDAC deleted: |$VDACDELaffected_rows|$callerid"; &agi_output;}
}
}
else
{
@@ -1096,19 +1174,34 @@ sub process_request
{
if ($AGILOG) {$agi_string = "no VDL or VDCL record found: $uniqueid $calleridname $VD_lead_id $uniqueid $VD_uniqueid |$VACaffected_rows|$VD_callerid|"; &agi_output;}
# uncomment for some special circumstances
# $VD_status = 'NA';
# if (length($VDL_status) > 0)
# {$VD_status = $VDL_status;}
### BEGIN if call answers but has not reached routing AGI, then log as a PDROP
if ( ($callerid =~ /^V\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) && ($VD_status =~ /SENT/) )
{
$stmtA = "SELECT list_id FROM vicidial_list where lead_id='$VD_lead_id' limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsVLd=$sthA->rows;
if ($sthArowsVLd > 0)
{
@aryA = $sthA->fetchrow_array;
$VD_list_id = $aryA[0];
}
$sthA->finish();
# if ( ($VACaffected_rows > 0) && ($VD_callerid =~ /^V/) )
# {
# $stmtA = "INSERT INTO vicidial_log SET uniqueid='$uniqueid',lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',call_date='$VD_call_time',start_epoch='$VD_start_epoch',status='$VD_status',phone_code='$VD_phone_code',phone_number='$VD_phone_number',user='VDAD',processed='N',length_in_sec='0',end_epoch='$VD_start_epoch',alt_dial='$VD_alt_dial';";
# $affected_rows = $dbhA->do($stmtA);
$stmtA = "UPDATE vicidial_list SET status='PDROP' where lead_id='$VD_lead_id';";
$VLPDaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- PDROP vicidial_list update: |$VLPDaffected_rows|$uniqueid|$CIDlead_id|$VDL_status|"; &agi_output;}
# $agi_string = "| NO VDL add to vicidial_log $VD_uniqueid|$VD_lead_id|$VD_phone_number|$VD_status|$affected_rows|$VACaffected_rows|$affected_rows|$stmtA|";
# &agi_output;
# }
$stmtA = "INSERT INTO vicidial_log SET uniqueid='$uniqueid',lead_id='$VD_lead_id',list_id='$VD_list_id',status='PDROP',campaign_id='$VD_campaign_id',call_date='$VD_call_time',start_epoch='$VD_start_epoch',phone_code='$VD_phone_code',phone_number='$VD_phone_number',user='VDAD',processed='N',length_in_sec='0',end_epoch='$VD_start_epoch',alt_dial='$VD_alt_dial';";
$VDLPDaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- PDROP vicidial_log insert: |$VDLPDaffected_rows|$uniqueid|$CIDlead_id|$VDL_status|"; &agi_output;}
$stmtA="INSERT IGNORE INTO vicidial_log_extended SET uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$VD_call_time',lead_id='$VD_lead_id',caller_code='$VD_callerid',custom_call_id='' ON DUPLICATE KEY UPDATE server_ip='$VARserver_ip',call_date='$VD_call_time',lead_id='$VD_lead_id',caller_code='$VD_callerid';";
$VDLXPDaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- PDROP vicidial_extended_log insert: |$VDLXPDaffected_rows|$uniqueid|$CIDlead_id|$VDL_status|"; &agi_output;}
}
### END if call answers but has not reached routing AGI, then log as a PDROP
}
else
{
+1
View File
@@ -56,3 +56,4 @@ RAXFER - Remote Agent API transfer
ALTNUM - Agent manual Dial Alternate number dialing, number dialed before final disposition
DISPO - Agent in disposition screen when they closed their web browser wiithout selecting dispisition
WAITTO - Wait time option call termination on inbound call
PDROP - Pre-routing dropped call, call hung up the instant the Answer signal is received
@@ -673,7 +673,7 @@ adaptive_latest_server_time VARCHAR(4) default '2100',
adaptive_intensity VARCHAR(6) default '0',
adaptive_dl_diff_target SMALLINT(3) default '0',
concurrent_transfers ENUM('AUTO','1','2','3','4','5','6','7','8','9','10','15','20','25','30','40','50','60','80','100') default 'AUTO',
auto_alt_dial ENUM('NONE','ALT_ONLY','ADDR3_ONLY','ALT_AND_ADDR3','ALT_AND_EXTENDED','ALT_AND_ADDR3_AND_EXTENDED','EXTENDED_ONLY') default 'NONE',
auto_alt_dial ENUM('NONE','ALT_ONLY','ADDR3_ONLY','ALT_AND_ADDR3','ALT_AND_EXTENDED','ALT_AND_ADDR3_AND_EXTENDED','EXTENDED_ONLY','MULTI_LEAD') default 'NONE',
auto_alt_dial_statuses VARCHAR(255) default ' B N NA DC -',
agent_pause_codes_active ENUM('Y','N','FORCE') default 'N',
campaign_description VARCHAR(255),
@@ -2453,7 +2453,7 @@ ALTER TABLE vicidial_call_notes_archive MODIFY notesid INT(9) UNSIGNED NOT NULL;
CREATE TABLE vicidial_lead_search_log_archive LIKE vicidial_lead_search_log;
ALTER TABLE vicidial_lead_search_log_archive MODIFY search_log_id INT(9) UNSIGNED NOT NULL;
UPDATE system_settings SET db_schema_version='1267',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1268',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
@@ -355,3 +355,4 @@ INSERT INTO vicidial_statuses values('RQXFER','Re-Queue','N','Y','UNDEFINED','N'
INSERT INTO vicidial_statuses values('TIMEOT','Inbound Queue Timeout Drop','N','Y','UNDEFINED','N','N','N','N','N','N');
INSERT INTO vicidial_statuses values('AFTHRS','Inbound After Hours Drop','N','Y','UNDEFINED','N','N','N','N','N','N');
INSERT INTO vicidial_statuses values('NANQUE','Inbound No Agent No Queue Drop','N','Y','UNDEFINED','N','N','N','N','N','N');
INSERT INTO vicidial_statuses values('PDROP','Outbound Pre-Routing Drop','N','Y','UNDEFINED','N','N','N','N','N','N');
+3
View File
@@ -728,3 +728,6 @@ ALTER TABLE vicidial_phone_codes MODIFY GMT_offset VARCHAR(6) default '';
UPDATE system_settings SET db_schema_version='1267',db_schema_update_date=NOW();
ALTER TABLE vicidial_campaigns MODIFY auto_alt_dial ENUM('NONE','ALT_ONLY','ADDR3_ONLY','ALT_AND_ADDR3','ALT_AND_EXTENDED','ALT_AND_ADDR3_AND_EXTENDED','EXTENDED_ONLY','MULTI_LEAD') default 'NONE';
UPDATE system_settings SET db_schema_version='1268',db_schema_update_date=NOW();
@@ -604,6 +604,8 @@ Callback Comments||
To see information on one of the callbacks below, click on the INFO link. To call the customer back now, click on the DIAL link. If you click on a record below to dial it, it will be removed from the list||
rings all available agents until one picks up the phone||
No calls for this lead||
ADMINISTRATION: Campaign Multi-Alt-Leads||
Multi-Lead Auto Alt Dialing Settings Form||
############################################################ MANAGER Manual
+2 -1
View File
@@ -29,6 +29,7 @@
# 101022-1323 - Added IGU_selectall function
# 101107-1133 - Added auto-refresh code
# 110215-1720 - Added the Add a new lead link
# 110322-1228 - Added user ID logged in as next to Logout link
#
@@ -1375,7 +1376,7 @@ $SScustom_fields_enabled = $row[3];
</span>
<TABLE BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0 WIDTH=<?php echo $page_width ?> HEIGHT=15>
<TR BGCOLOR=#015B91><TD ALIGN=LEFT BGCOLOR=#015B91><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><a href="<?php echo $admin_home_url_LU ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>HOME</a> | <A HREF="../agc/timeclock.php?referrer=admin"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1> Timeclock</A> | <a href="<?php echo $ADMIN ?>?force_logout=1"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>Logout</a></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><?php echo date("l F j, Y G:i:s A") ?> &nbsp; </B></TD></TR>
<TR BGCOLOR=#015B91><TD ALIGN=LEFT BGCOLOR=#015B91><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><a href="<?php echo $admin_home_url_LU ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>HOME</a> | <A HREF="../agc/timeclock.php?referrer=admin"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1> Timeclock</A> | <a href="<?php echo $ADMIN ?>?force_logout=1"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>Logout</a> <FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>(<?php echo $PHP_AUTH_USER ?>)</FONT></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><?php echo date("l F j, Y G:i:s A") ?> &nbsp; </B></TD></TR>
<TR BGCOLOR=#015B91>