Changed HIDE alter phone setting to hide all references to phone numbers in logs and info displays in agent interface

Fixed issue when dial timeout and drop call seconds are too high in outbound campaign
Changed cid on outbound routing to call menus

git-svn-id: svn://192.168.202.10@1699 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2011-07-24 03:38:46 +00:00
parent 35cb3a2d3d
commit 4f360c6b22
4 changed files with 102 additions and 25 deletions
+12 -1
View File
@@ -87,6 +87,7 @@
# 110525-1530 - Added AUDIO and CALLMENU drop options
# 110528-2326 - Added CALLMENU survey method
# 110626-2342 - Added queuemetrics_pe_phone_append
# 110723-2330 - Set CID to customer phone number and caller code when transferring to CALLMENU
#
$script = 'agi-VDAD_ALL_outbound.agi';
@@ -1227,12 +1228,17 @@ if ($call_handle_method =~ /SURVEY/)
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: \"$calleridname\" \<$VDADphone\>"; &agi_output;}
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
}
}
}
if ($survey_method =~ /CALLMENU/)
{
$newcallerid = "\"$callerid <$VDADphone>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
$survey_status='SVYCLM';
if (length($survey_menu_id)>0)
{
@@ -2526,6 +2532,11 @@ if ($drop_timer > $DROP_TIME)
}
if ($drop_action =~ /CALLMENU/)
{
$newcallerid = "\"$callerid <$VDADphone>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
$DROPexten = 's';
$ext_context = $safe_harbor_menu_id;
if (length($ext_context)<1)
+59 -17
View File
@@ -102,6 +102,7 @@
# 110513-1745 - Added double-check for dial level difference target, and dial level and avail-only-tally features
# 110525-1940 - Allow for auto-dial IVR transfers
# 110602-0953 - Added dl_diff_target_method option
# 110723-1256 - Added extra debug for vac deletes and fix for long ring/drop time
#
@@ -1182,7 +1183,7 @@ while($one_day_interval > 0)
&event_logger;
### insert a SENT record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type,alt_dial,queue_priority) values('$DBIPaddress[$user_CIPct]','$DBIPcampaign[$user_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUT','$alt_dial','$DBIPqueue_priority[$user_CIPct]')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type,alt_dial,queue_priority,last_update_time) values('$DBIPaddress[$user_CIPct]','$DBIPcampaign[$user_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUT','$alt_dial','$DBIPqueue_priority[$user_CIPct]','$SQLdate')";
$affected_rows = $dbhA->do($stmtA);
### sleep for a five hundredths of a second to not flood the server with new calls
@@ -1214,9 +1215,12 @@ while($one_day_interval > 0)
@KLcallerid = @MT;
@KLserver_ip = @MT;
@KLchannel = @MT;
@KLuniqueid = @MT;
@KLstatus = @MT;
@KLcalltime = @MT;
$kill_vac=0;
$stmtA = "SELECT callerid,server_ip,channel,uniqueid,status FROM vicidial_auto_calls where server_ip='$server_ip' order by call_time;";
$stmtA = "SELECT callerid,server_ip,channel,uniqueid,status,call_time FROM vicidial_auto_calls where server_ip='$server_ip' order by call_time;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -1231,6 +1235,7 @@ while($one_day_interval > 0)
$KLchannel[$kill_vac] = $aryA[2];
$KLuniqueid[$kill_vac] = $aryA[3];
$KLstatus[$kill_vac] = $aryA[4];
$KLcalltime[$kill_vac] = $aryA[5];
$kill_vac++;
$rec_count++;
}
@@ -1367,6 +1372,10 @@ while($one_day_interval > 0)
if ($dialtime_catch > 100000) {$dialtime_catch=0;}
$call_timeout = ($CLdial_timeout + $CLdrop_call_seconds);
if ($CLstage =~ /SURVEY|REMIND/) {$call_timeout = ($call_timeout + 120);}
if ( ($CLstage =~ /SENT/) && ($call_timeout > 110) ) {$call_timeout = 110;}
# $event_string = "| vac test: |$auto_call_id|$CLstatus|$KLcalltime[$kill_vac]|$CLlead_id|$KLcallerid[$kill_vac]|$end_epoch|$KLchannel[$kill_vac]|$CLcall_type|$CLdial_timeout|$CLdrop_call_seconds|$call_timeout|$dialtime_log|$dialtime_catch|$PARKchannel|";
# &event_logger;
if ( ( ($dialtime_log >= $call_timeout) || ($dialtime_catch >= $call_timeout) || ($CLstatus =~ /BUSY|DISCONNECT|XFER|CLOSER/) ) && ($PARKchannel < 1) )
{
@@ -1380,7 +1389,7 @@ while($one_day_interval > 0)
$stmtA = "UPDATE vicidial_live_agents set ring_callerid='' where ring_callerid='$KLcallerid[$kill_vac]';";
$affected_rowsX = $dbhA->do($stmtA);
$event_string = "| dead call vac deleted|$auto_call_id|$CLlead_id|$KLcallerid[$kill_vac]|$end_epoch|$affected_rows|$KLchannel[$kill_vac]|$CLcall_type|$CLdial_timeout|$CLdrop_call_seconds|$call_timeout|$dialtime_log|$dialtime_catch|$affected_rowsX|";
$event_string = "| dead call vac deleted|$auto_call_id|$CLstatus|$CLlead_id|$KLcallerid[$kill_vac]|$end_epoch|$affected_rows|$KLchannel[$kill_vac]|$CLcall_type|$CLdial_timeout|$CLdrop_call_seconds|$call_timeout|$dialtime_log|$dialtime_catch|$affected_rowsX|";
&event_logger;
$CLstage =~ s/LIVE|-//gi;
@@ -2151,22 +2160,37 @@ while($one_day_interval > 0)
}
### delete call records that are SENT for over 2 minutes
$stmtA = "DELETE FROM vicidial_auto_calls where server_ip='$server_ip' and call_time < '$XDSQLdate' and status NOT IN('XFER','CLOSER','LIVE','IVR')";
$VACaffected_rows = $dbhA->do($stmtA);
if ($VACaffected_rows > 0)
### display and delete call records that are SENT for over 2 minutes
$stmtA = "SELECT status,lead_id,last_update_time FROM vicidial_auto_calls where server_ip='$server_ip' and call_time < '$XDSQLdate' and status NOT IN('XFER','CLOSER','LIVE','IVR');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dead_delete_string='';
$dead_delete_ct=0;
while ($sthArows > $dead_delete_ct)
{
$event_string = "| lagged call vac agent DELETED $VACaffected_rows|$XDSQLdate|";
&event_logger;
@aryA = $sthA->fetchrow_array;
$dead_delete_string .= "$dead_delete_ct-$aryA[0]-$aryA[1]-$aryA[2]|";
$dead_delete_ct++;
}
$sthA->finish();
if ($dead_delete_ct > 0)
{
$stmtA = "DELETE FROM vicidial_auto_calls where server_ip='$server_ip' and call_time < '$XDSQLdate' and status NOT IN('XFER','CLOSER','LIVE','IVR');";
$VACaffected_rows = $dbhA->do($stmtA);
if ($VACaffected_rows > 0)
{
$event_string = "| lagged call vac 2-minutes DELETED $VACaffected_rows|$XDSQLdate|$dead_delete_string";
&event_logger;
}
}
### For debugging purposes, try to grab Jammed calls and log them to jam logfile
if ($useJAMdebugFILE)
{
$stmtA = "SELECT auto_call_id,server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage,last_update_time,alt_dial,queue_priority,agent_only,agent_grab FROM vicidial_auto_calls where server_ip='$server_ip' and last_update_time < '$BDtsSQLdate' and status IN('LIVE')";
$stmtA = "SELECT auto_call_id,server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage,last_update_time,alt_dial,queue_priority,agent_only,agent_grab FROM vicidial_auto_calls where server_ip='$server_ip' and last_update_time < '$BDtsSQLdate' and status IN('LIVE');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -2381,12 +2405,30 @@ while($one_day_interval > 0)
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
### delete call records that are LIVE for over 100 minutes
$stmtA = "DELETE FROM vicidial_auto_calls where server_ip='$server_ip' and call_time < '$TDSQLdate' and status NOT IN('XFER','CLOSER')";
$affected_rows = $dbhA->do($stmtA);
### display and delete call records that are LIVE but not updated for over 100 minutes
$stmtA = "SELECT status,lead_id,call_time FROM vicidial_auto_calls where server_ip='$server_ip' and call_time < '$TDSQLdate' and status NOT IN('XFER','CLOSER');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dead_delete_string='';
$dead_delete_ct=0;
while ($sthArows > $dead_delete_ct)
{
@aryA = $sthA->fetchrow_array;
$dead_delete_string .= "$dead_delete_ct-$aryA[0]-$aryA[1]-$aryA[2]|";
$dead_delete_ct++;
}
$sthA->finish();
$event_string = "| lagged call vac agent DELETED $affected_rows|$TDSQLdate|LIVE|";
&event_logger;
if ($dead_delete_ct > 0)
{
### delete call records that are LIVE but not updated for over 100 minutes
$stmtA = "DELETE FROM vicidial_auto_calls where server_ip='$server_ip' and call_time < '$TDSQLdate' and status NOT IN('XFER','CLOSER');";
$affected_rows = $dbhA->do($stmtA);
$event_string = "| lagged call vac 100-minutes DELETED $affected_rows|$TDSQLdate|LIVE|$dead_delete_string";
&event_logger;
}
### Grab Server values from the database in case they've changed
$stmtA = "SELECT max_vicidial_trunks,answer_transfer_agent,local_gmt,ext_context FROM servers where server_ip = '$server_ip';";
+13 -2
View File
@@ -90,6 +90,7 @@
# - $date - ('2010-02-19')
# - $custom_field_names - ('|start_date|finish_date|favorite_color|')
# - $call_notes
# - $disable_alter_custphone = ('N','Y','HIDE')
#
# CHANGELOG:
# 50629-1044 - First build of script
@@ -286,6 +287,7 @@
# 110625-0814 - Added screen_labels and label hide functions
# 110626-0127 - Added queuemetrics_pe_phone_append
# 110718-1158 - Added logging of skipped leads
# 110723-2256 - Added disable_alter_custphone HIDE option for call logs display
#
$version = '2.4-191';
@@ -490,6 +492,8 @@ if (isset($_GET["sub_status"])) {$sub_status=$_GET["sub_status"];}
elseif (isset($_POST["sub_status"])) {$sub_status=$_POST["sub_status"];}
if (isset($_GET["qm_extension"])) {$qm_extension=$_GET["qm_extension"];}
elseif (isset($_POST["qm_extension"])) {$qm_extension=$_POST["qm_extension"];}
if (isset($_GET["disable_alter_custphone"])) {$disable_alter_custphone=$_GET["disable_alter_custphone"];}
elseif (isset($_POST["disable_alter_custphone"])) {$disable_alter_custphone=$_POST["disable_alter_custphone"];}
header ("Content-type: text/html; charset=utf-8");
@@ -8345,13 +8349,16 @@ if ($ACTION == 'CALLLOGview')
else
{$bgcolor='bgcolor="#9BB9FB"';}
$phone_number_display = $ALLphone_number[$i];
if ($disable_alter_custphone == 'HIDE')
{$phone_number_display = 'XXXXXXXXXX';}
$u++;
echo "<tr $bgcolor>";
echo "<td><font size=1>$u</td>";
echo "<td align=right><font size=2>$ALLcall_date[$i]</td>";
echo "<td align=right><font size=2> $ALLlength_in_sec[$i]</td>\n";
echo "<td align=right><font size=2> $ALLstatus[$i]</td>\n";
echo "<td align=right><font size=2> $ALLphone_code[$i] $ALLphone_number[$i] </td>\n";
echo "<td align=right><font size=2> $ALLphone_code[$i] $phone_number_display </td>\n";
echo "<td align=right><font size=2> $Allfirst_name[$i] $Alllast_name[$i] </td>\n";
echo "<td align=right><font size=2> $ALLcampaign_id[$i] </td>\n";
echo "<td align=right><font size=2> $ALLin_out[$i] </td>\n";
@@ -9195,6 +9202,10 @@ if ($ACTION == 'LEADINFOview')
else
{$bgcolor='bgcolor="#9BB9FB"';}
$phone_number_display = $ALLphone_number[$i];
if ($disable_alter_custphone == 'HIDE')
{$phone_number_display = 'XXXXXXXXXX';}
$u++;
$NOTESout .= "<tr $bgcolor>";
$NOTESout .= "<td><font size=1>$u</td>";
@@ -9202,7 +9213,7 @@ if ($ACTION == 'LEADINFOview')
$NOTESout .= "<td align=right><font size=2> $ALLuser[$i]</td>\n";
$NOTESout .= "<td align=right><font size=2> $ALLlength_in_sec[$i]</td>\n";
$NOTESout .= "<td align=right><font size=2> $ALLstatus[$i]</td>\n";
$NOTESout .= "<td align=right><font size=2> $ALLphone_code[$i] $ALLphone_number[$i] </td>\n";
$NOTESout .= "<td align=right><font size=2> $ALLphone_code[$i] $phone_number_display </td>\n";
$NOTESout .= "<td align=right><font size=2> $ALLcampaign_id[$i] </td>\n";
$NOTESout .= "<td align=right><font size=2> $ALLin_out[$i] </td>\n";
$NOTESout .= "<td align=right><font size=2> $ALLalt_dial[$i] </td>\n";
+18 -5
View File
@@ -360,10 +360,11 @@
# 110713-0048 - Allow for full hiding of the phone number field label
# 110718-1159 - Added logging of skipped leads
# 110719-0854 - Removed debug output and small display alignment changes
# 110723-2308 - Complete hiding of phone numbers in logs when alter phone is set to HIDE
#
$version = '2.4-337c';
$build = '110719-0854';
$version = '2.4-338c';
$build = '110723-2308';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=73;
$one_mysql_log=0;
@@ -4795,6 +4796,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
var consultativexfer_checked = 0;
if (document.vicidial_form.consultativexfer.checked==true)
{consultativexfer_checked = 1;}
if (taskvar == 'XfeRLOCAL')
{consultativexfer_checked = 0;}
// conf_dialed=1;
if (auto_dial_level == 0) {RedirecTxFEr = 1;}
@@ -5625,8 +5628,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
hideDiv('LeaDInfOBox');
document.vicidial_form.MDDiaLCodE.value = TVphone_code;
document.vicidial_form.MDPhonENumbeR.value = TVphone_number;
document.vicidial_form.MDPhonENumbeRHiddeN = TVphone_number;
document.vicidial_form.MDLeadID.value = TVlead_id;
document.vicidial_form.MDType.value = TVtype;
if (disable_alter_custphone == 'HIDE')
{document.vicidial_form.MDPhonENumbeR.value = 'XXXXXXXXXX';}
}
if (TVfast=='LEADSEARCH')
{
@@ -5682,6 +5688,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
if (document.vicidial_form.LeadLookuP.checked==true)
{MDLookuPLeaD = 'lookup';}
if (MDPhonENumbeRform == 'XXXXXXXXXX')
{MDPhonENumbeRform = document.vicidial_form.MDPhonENumbeRHiddeN.value;}
if (MDDiaLCodEform.length < 1)
{MDDiaLCodEform = document.vicidial_form.phone_code.value;}
@@ -5724,6 +5733,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
document.vicidial_form.MDDiaLOverridE.value = '';
document.vicidial_form.MDLeadID.value = '';
document.vicidial_form.MDType.value = '';
document.vicidial_form.MDPhonENumbeRHiddeN = '';
}
}
@@ -8857,6 +8867,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
document.vicidial_form.MDDiaLOverridE.value = '';
document.vicidial_form.MDLeadID.value = '';
document.vicidial_form.MDType.value = '';
document.vicidial_form.MDPhonENumbeRHiddeN = '';
if (post_phone_time_diff_alert_message.length > 10)
{
@@ -10777,7 +10788,7 @@ function phone_number_format(formatphone) {
}
if (xmlhttp)
{
RAview_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=LEADINFOview&format=text&user=" + user + "&pass=" + pass + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&lead_id=" + VLI_lead_id + "&campaign=" + campaign + "&callback_id=" + VLI_cb_id + "&stage=<?php echo $HCwidth ?>";
RAview_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=LEADINFOview&format=text&user=" + user + "&pass=" + pass + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&lead_id=" + VLI_lead_id + "&disable_alter_custphone=" + disable_alter_custphone + "&campaign=" + campaign + "&callback_id=" + VLI_cb_id + "&stage=<?php echo $HCwidth ?>";
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(RAview_query);
@@ -10840,7 +10851,7 @@ function phone_number_format(formatphone) {
}
if (xmlhttp)
{
RAview_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=CALLLOGview&format=text&user=" + user + "&pass=" + pass + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&date=" + logdate + "&campaign=" + campaign + "&stage=<?php echo $HCwidth ?>";
RAview_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=CALLLOGview&format=text&user=" + user + "&pass=" + pass + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&date=" + logdate + "&disable_alter_custphone=" + disable_alter_custphone +"&campaign=" + campaign + "&stage=<?php echo $HCwidth ?>";
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(RAview_query);
@@ -10948,6 +10959,7 @@ function phone_number_format(formatphone) {
document.vicidial_form.MDDiaLOverridE.value = '';
document.vicidial_form.MDLeadID.value = '';
document.vicidial_form.MDType.value = '';
document.vicidial_form.MDPhonENumbeRHiddeN = '';
}
@@ -13190,8 +13202,9 @@ Available Agents Transfer: <span id="AgentXferViewSelect"></span></center></font
<td align="right"><font class="body_text"> Phone Number: </font></td>
<td align="left"><font class="body_text">
<input type="text" size="14" maxlength="18" name="MDPhonENumbeR" id="MDPhonENumbeR" class="cust_form" value="" />&nbsp; (digits only)</font>
<input type="hidden" name="MDPhonENumbeRHiddeN" id="MDPhonENumbeRHiddeN" value="" />
<input type="hidden" name="MDLeadID" id="MDLeadID" value="" />
<input type="hidden" name="MDType" id="MDLeadID" value="" />
<input type="hidden" name="MDType" id="MDType" value="" />
</td>
</tr><tr>
<td align="right"><font class="body_text"> Search Existing Leads: </font></td>