Added List CID Group Override to the List Modification admin screen.
Added new vicidial_dial_cid_log database call logging git-svn-id: svn://192.168.202.10@3589 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -714,6 +714,8 @@ OTHER CHANGES:
|
||||
variable on the web screens for troubleshooting issues.
|
||||
It is disabled by default.
|
||||
|
||||
200. Added List CID Group Override to the List Modification admin screen.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
# 210819-0826 - Added vicidial_inbound_caller_codes archiving
|
||||
# 210912-1546 - Added --api-log-days=X and --api-only flags
|
||||
# 220309-2246 - Added --api-archive-days=X and --api-archive-only flags
|
||||
# 220312-0859 - Added vicidial_dial_cid_log table archiving, same as vicidial_dial_log
|
||||
#
|
||||
|
||||
$CALC_TEST=0;
|
||||
@@ -672,6 +673,35 @@ if (!$T)
|
||||
}
|
||||
##### END vicidial_dial_log_archive trim processing #####
|
||||
|
||||
##### BEGIN vicidial_dial_cid_log_archive trim processing #####
|
||||
$stmtA = "SELECT count(*) from vicidial_dial_cid_log_archive;";
|
||||
$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;
|
||||
$vicidial_dial_cid_log_archive_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if (!$Q) {print "Trimming vicidial_dial_cid_log_archive table... ($vicidial_dial_cid_log_archive_count)\n";}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
$stmtA = "DELETE FROM vicidial_dial_cid_log_archive WHERE call_date < '$del_time';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows deleted from vicidial_dial_cid_log_archive table \n";}
|
||||
|
||||
$stmtA = "optimize table vicidial_dial_cid_log_archive;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
}
|
||||
##### END vicidial_dial_cid_log_archive trim processing #####
|
||||
|
||||
|
||||
if ($only_trim_archive > 1)
|
||||
{
|
||||
@@ -1223,6 +1253,53 @@ if (!$T)
|
||||
##### END vicidial_dial_log DAILY processing #####
|
||||
|
||||
|
||||
##### BEGIN vicidial_dial_cid_log DAILY processing #####
|
||||
$stmtA = "SELECT count(*) from vicidial_dial_cid_log;";
|
||||
$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;
|
||||
$vicidial_dial_cid_log_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT count(*) from vicidial_dial_cid_log_archive;";
|
||||
$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;
|
||||
$vicidial_dial_cid_log_archive_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if (!$Q) {print "\nProcessing vicidial_dial_cid_log table... ($vicidial_dial_cid_log_count|$vicidial_dial_cid_log_archive_count)\n";}
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_dial_cid_log_archive SELECT * from vicidial_dial_cid_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows inserted into vicidial_dial_cid_log_archive table \n";}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
$stmtA = "DELETE FROM vicidial_dial_cid_log WHERE call_date < '$del_time';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows deleted from vicidial_dial_cid_log table \n";}
|
||||
|
||||
$stmtA = "optimize table vicidial_dial_cid_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
}
|
||||
##### END vicidial_dial_cid_log DAILY processing #####
|
||||
|
||||
|
||||
##### BEGIN vicidial_api_log DAILY processing #####
|
||||
$stmtA = "SELECT count(*) from vicidial_api_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
@@ -2225,6 +2302,58 @@ if (!$T)
|
||||
}
|
||||
|
||||
|
||||
##### vicidial_dial_cid_log
|
||||
$stmtA = "SELECT count(*) from vicidial_dial_cid_log;";
|
||||
$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;
|
||||
$vicidial_dial_cid_log_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT count(*) from vicidial_dial_cid_log_archive;";
|
||||
$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;
|
||||
$vicidial_dial_cid_log_archive_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if (!$Q) {print "\nProcessing vicidial_dial_cid_log table... ($vicidial_dial_cid_log_count|$vicidial_dial_cid_log_archive_count)\n";}
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_dial_cid_log_archive SELECT * from vicidial_dial_cid_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows inserted into vicidial_dial_cid_log_archive table \n";}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
if ($wipe_all > 0)
|
||||
{$stmtA = "DELETE FROM vicidial_dial_cid_log;";}
|
||||
else
|
||||
{$stmtA = "DELETE FROM vicidial_dial_cid_log WHERE call_date < '$del_time';";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows deleted from vicidial_dial_cid_log table \n";}
|
||||
|
||||
$stmtA = "optimize table vicidial_dial_cid_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$stmtA = "optimize table vicidial_dial_cid_log_archive;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
}
|
||||
|
||||
|
||||
##### vicidial_api_log
|
||||
$stmtA = "SELECT count(*) from vicidial_api_log;";
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
# - Auto reset lists at defined times
|
||||
# - Auto restarts Asterisk process if enabled in servers settings
|
||||
#
|
||||
# Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 61011-1348 - First build
|
||||
@@ -154,9 +154,10 @@
|
||||
# 210827-0939 - Added PJSIP compatibility
|
||||
# 210924-2333 - Fix for calls_today issue at timeclock-end-of-day
|
||||
# 220310-0959 - Added purging of vicidial_sync_log table
|
||||
# 220312-0819 - Added CID Group Auto-Rotate to check for List use
|
||||
#
|
||||
|
||||
$build = '220310-0959';
|
||||
$build = '220312-0819';
|
||||
|
||||
$DB=0; # Debug flag
|
||||
$teodDB=0; # flag to log Timeclock End of Day processes to log file
|
||||
@@ -5009,6 +5010,13 @@ if ( ($active_voicemail_server =~ /$server_ip/) && ((length($active_voicemail_se
|
||||
$i=0;
|
||||
while ($sthArows > $i)
|
||||
{
|
||||
$Rcampaign_calldate='';
|
||||
$Rcampaign_id='';
|
||||
$Rcampaign_calldate_epoch=0;
|
||||
$Lcampaign_calldate='';
|
||||
$Llist_id='';
|
||||
$Lcampaign_calldate_epoch=0;
|
||||
|
||||
$stmtA = "SELECT campaign_calldate,campaign_id,UNIX_TIMESTAMP(campaign_calldate) from vicidial_campaigns where cid_group_id='$cid_group_id[$i]' order by campaign_calldate desc limit 1;";
|
||||
if ($DBX) {print "$stmtA\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
@@ -5023,13 +5031,27 @@ if ( ($active_voicemail_server =~ /$server_ip/) && ((length($active_voicemail_se
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ( ($Rcampaign_calldate_epoch < $FMtarget) && (length($cid_auto_rotate_cid[$i]) >= 6 ) )
|
||||
$stmtA = "SELECT list_lastcalldate,list_id,UNIX_TIMESTAMP(list_lastcalldate) from vicidial_lists where cid_group_id='$cid_group_id[$i]' order by list_lastcalldate desc limit 1;";
|
||||
if ($DBX) {print "$stmtA\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArowsX=$sthA->rows;
|
||||
if ($sthArowsX > 0)
|
||||
{
|
||||
if ($DB) {print " skip CID Group rotate, no recent campaign calls: $cid_group_id[$i]|$Rcampaign_id|$Rcampaign_calldate| ($Rcampaign_calldate_epoch <> $FMtarget)\n";}
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$Lcampaign_calldate = $aryA[0];
|
||||
$Llist_id = $aryA[1];
|
||||
$Lcampaign_calldate_epoch = $aryA[2];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ( ( ($Rcampaign_calldate_epoch < $FMtarget) && ($Lcampaign_calldate_epoch < $FMtarget) ) && (length($cid_auto_rotate_cid[$i]) >= 6 ) )
|
||||
{
|
||||
if ($DB) {print " skip CID Group rotate, no recent campaign/list calls: $cid_group_id[$i]|$Rcampaign_id|$Rcampaign_calldate| ($Rcampaign_calldate_epoch <> $FMtarget)|$Llist_id|$Lcampaign_calldate|($Lcampaign_calldate_epoch < $FMtarget)\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($DBX) {print " DEBUG: CID Group rotate, recent campaign calls: $cid_group_id[$i]|$Rcampaign_id|$Rcampaign_calldate| ($Rcampaign_calldate_epoch <> $FMtarget)\n";}
|
||||
if ($DBX) {print " DEBUG: CID Group rotate, recent campaign/list calls: $cid_group_id[$i]|$Rcampaign_id|$Rcampaign_calldate| ($Rcampaign_calldate_epoch <> $FMtarget)|$Llist_id|$Lcampaign_calldate|($Lcampaign_calldate_epoch < $FMtarget)\n";}
|
||||
$rotate_run_minutes = (($secX - $cid_last_auto_rotate_epoch[$i]) / 60);
|
||||
if ($rotate_run_minutes < $cid_auto_rotate_minutes[$i])
|
||||
{
|
||||
|
||||
@@ -148,9 +148,10 @@
|
||||
# 211022-1637 - Added incall_tally_threshold_seconds campaign feature
|
||||
# 220118-0938 - Added $ADB auto-alt-dial extra debug output option, fix for extended auto-alt-dial issue #1337
|
||||
# 220118-2206 - Added auto_alt_threshold campaign & list settings
|
||||
# 220311-1920 - Added List CID Group Override option
|
||||
#
|
||||
|
||||
$build='220118-2206';
|
||||
$build='220311-1920';
|
||||
$script='AST_VDauto_dial';
|
||||
### begin parsing run-time options ###
|
||||
if (length($ARGV[0])>1)
|
||||
@@ -1819,9 +1820,10 @@ while($one_day_interval > 0)
|
||||
if ($rec_countCUSTDATA)
|
||||
{
|
||||
$campaign_cid_override='';
|
||||
$LIST_cid_group_override='';
|
||||
$auto_alt_threshold=-1;
|
||||
### gather list_id overrides
|
||||
$stmtA = "SELECT campaign_cid_override,auto_alt_threshold FROM vicidial_lists where list_id='$list_id';";
|
||||
$stmtA = "SELECT campaign_cid_override,auto_alt_threshold,cid_group_id FROM vicidial_lists where list_id='$list_id';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArowsL=$sthA->rows;
|
||||
@@ -1830,6 +1832,7 @@ while($one_day_interval > 0)
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$campaign_cid_override = $aryA[0];
|
||||
$auto_alt_threshold = $aryA[1];
|
||||
$LIST_cid_group_override = $aryA[2];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
@@ -2068,7 +2071,74 @@ while($one_day_interval > 0)
|
||||
$VDAD_dial_exten = $routing_prefix . $VDAD_dial_exten;
|
||||
}
|
||||
|
||||
if (length($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
$temp_CID='';
|
||||
if ( (length($LIST_cid_group_override) > 0) && ($LIST_cid_group_override !~ /\-\-\-DISABLED\-\-\-/) )
|
||||
{
|
||||
$stmtA = "SELECT cid_group_type FROM vicidial_cid_groups where cid_group_id='$LIST_cid_group_override';";
|
||||
$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;
|
||||
$cid_group_type = $aryA[0];
|
||||
$temp_CID='';
|
||||
$temp_vcca='';
|
||||
$temp_ac='';
|
||||
|
||||
if ($cid_group_type =~ /AREACODE/)
|
||||
{
|
||||
$temp_ac_two = substr("$phone_number", 0, 2);
|
||||
$temp_ac_three = substr("$phone_number", 0, 3);
|
||||
$temp_ac_four = substr("$phone_number", 0, 4);
|
||||
$temp_ac_five = substr("$phone_number", 0, 5);
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and areacode IN('$temp_ac_two','$temp_ac_three','$temp_ac_four','$temp_ac_five') and active='Y' order by CAST(areacode as SIGNED INTEGER) asc, call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type =~ /STATE/)
|
||||
{
|
||||
$temp_state = $state;
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and areacode IN('$temp_state') and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type =~ /NONE/)
|
||||
{
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$act=0;
|
||||
while ($sthArows > $act)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$temp_vcca = $aryA[0];
|
||||
$temp_ac = $aryA[1];
|
||||
$act++;
|
||||
}
|
||||
if ($act > 0)
|
||||
{
|
||||
$sthA->finish();
|
||||
$stmtA="UPDATE vicidial_campaign_cid_areacodes set call_count_today=(call_count_today + 1) where campaign_id='$LIST_cid_group_override' and areacode='$temp_ac' and outbound_cid='$temp_vcca';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
if ($cid_group_type =~ /NONE/)
|
||||
{
|
||||
$stmtA="UPDATE vicidial_cid_groups set cid_auto_rotate_calls=(cid_auto_rotate_calls + 1) where cid_group_id='$LIST_cid_group_override';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{$sthA->finish();}
|
||||
$temp_CID = $temp_vcca;
|
||||
$temp_CID =~ s/\D//gi;
|
||||
}
|
||||
}
|
||||
if ( (length($campaign_cid_override) > 6) || (length($temp_CID) > 6) )
|
||||
{
|
||||
if (length($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='LIST_CID_GROUP';}
|
||||
else
|
||||
{$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (length($DBIPcampaigncid[$user_CIPct]) > 6) {$CCID = "$DBIPcampaigncid[$user_CIPct]"; $CCID_on++; $CCIDtype='CAMPAIGN_CID';}
|
||||
@@ -2298,7 +2368,11 @@ while($one_day_interval > 0)
|
||||
$stmtD = "INSERT INTO vicidial_lead_24hour_calls SET lead_id='$lead_id',list_id='$list_id',call_date=NOW(),phone_number='$phone_number',phone_code='$phone_code',state='$TFhourSTATE',call_type='AUTO';";
|
||||
$affected_rowsD = $dbhA->do($stmtD);
|
||||
|
||||
$event_string = "| number call dialed|$DBIPcampaign[$user_CIPct]|$VqueryCID|$affected_rowsA|$stmtA|$gmt_offset_now|$alt_dial|$affected_rowsB|$affected_rowsC|$affected_rowsD|$CCIDtype|";
|
||||
### insert log record into vicidial_dial_cid_log table
|
||||
$stmtE = "INSERT INTO vicidial_dial_cid_log SET caller_code='$VqueryCID',call_date=NOW(),call_type='OUT',call_alt='$alt_dial',outbound_cid='$CCID',outbound_cid_type='$CCIDtype';";
|
||||
$affected_rowsE = $dbhA->do($stmtE);
|
||||
|
||||
$event_string = "| number call dialed|$DBIPcampaign[$user_CIPct]|$VqueryCID|$affected_rowsA|$stmtA|$gmt_offset_now|$alt_dial|$affected_rowsB|$affected_rowsC|$affected_rowsD|$affected_rowsE|$CCIDtype|";
|
||||
&event_logger;
|
||||
|
||||
### sleep for a five hundredths of a second to not flood the server with new calls
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#
|
||||
# Should only be run on one server in a multi-server Asterisk/VICIDIAL cluster
|
||||
#
|
||||
# Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGELOG:
|
||||
# 61115-1246 - First build, framework setup, non-functional
|
||||
@@ -50,6 +50,7 @@
|
||||
# 201220-1034 - Changes for shared agent campaigns
|
||||
# 210715-1335 - Added call_limit_24hour feature support, also fix for variable issue
|
||||
# 210731-0951 - Added cid_group_id_two campaign option
|
||||
# 220311-1922 - Added List CID Group Override option
|
||||
#
|
||||
|
||||
### begin parsing run-time options ###
|
||||
@@ -836,8 +837,9 @@ while($one_day_interval > 0)
|
||||
### END check for Dial Timeout Lead override for this lead ###
|
||||
|
||||
$campaign_cid_override='';
|
||||
$LIST_cid_group_override='';
|
||||
### gather list_id overrides
|
||||
$stmtA = "SELECT campaign_cid_override FROM vicidial_lists where list_id='$list_id';";
|
||||
$stmtA = "SELECT campaign_cid_override,cid_group_id FROM vicidial_lists where list_id='$list_id';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArowsL=$sthA->rows;
|
||||
@@ -845,6 +847,7 @@ while($one_day_interval > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$campaign_cid_override = $aryA[0];
|
||||
$LIST_cid_group_override = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
@@ -975,8 +978,77 @@ while($one_day_interval > 0)
|
||||
if (length($DBIPvdadexten[$camp_CIPct]) > 0) {$VDAD_dial_exten = "$DBIPvdadexten[$camp_CIPct]";}
|
||||
else {$VDAD_dial_exten = "$answer_transfer_agent";}
|
||||
|
||||
if (length($DBIPcampaigncid[$camp_CIPct]) > 6) {$CCID = "$DBIPcampaigncid[$camp_CIPct]"; $CCID_on++; $CCIDtype='CAMPAIGN_CID';}
|
||||
if (length($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
if (length($DBIPcampaigncid[$camp_CIPct]) > 6)
|
||||
{$CCID = "$DBIPcampaigncid[$camp_CIPct]"; $CCID_on++; $CCIDtype='CAMPAIGN_CID';}
|
||||
|
||||
$temp_CID='';
|
||||
if ( (length($LIST_cid_group_override) > 0) && ($LIST_cid_group_override !~ /\-\-\-DISABLED\-\-\-/) )
|
||||
{
|
||||
$stmtA = "SELECT cid_group_type FROM vicidial_cid_groups where cid_group_id='$LIST_cid_group_override';";
|
||||
$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;
|
||||
$cid_group_type = $aryA[0];
|
||||
$temp_CID='';
|
||||
$temp_vcca='';
|
||||
$temp_ac='';
|
||||
|
||||
if ($cid_group_type =~ /AREACODE/)
|
||||
{
|
||||
$temp_ac_two = substr("$phone_number", 0, 2);
|
||||
$temp_ac_three = substr("$phone_number", 0, 3);
|
||||
$temp_ac_four = substr("$phone_number", 0, 4);
|
||||
$temp_ac_five = substr("$phone_number", 0, 5);
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and areacode IN('$temp_ac_two','$temp_ac_three','$temp_ac_four','$temp_ac_five') and active='Y' order by CAST(areacode as SIGNED INTEGER) asc, call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type =~ /STATE/)
|
||||
{
|
||||
$temp_state = $state;
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and areacode IN('$temp_state') and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type =~ /NONE/)
|
||||
{
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$act=0;
|
||||
while ($sthArows > $act)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$temp_vcca = $aryA[0];
|
||||
$temp_ac = $aryA[1];
|
||||
$act++;
|
||||
}
|
||||
if ($act > 0)
|
||||
{
|
||||
$sthA->finish();
|
||||
$stmtA="UPDATE vicidial_campaign_cid_areacodes set call_count_today=(call_count_today + 1) where campaign_id='$LIST_cid_group_override' and areacode='$temp_ac' and outbound_cid='$temp_vcca';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
if ($cid_group_type =~ /NONE/)
|
||||
{
|
||||
$stmtA="UPDATE vicidial_cid_groups set cid_auto_rotate_calls=(cid_auto_rotate_calls + 1) where cid_group_id='$LIST_cid_group_override';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{$sthA->finish();}
|
||||
$temp_CID = $temp_vcca;
|
||||
$temp_CID =~ s/\D//gi;
|
||||
}
|
||||
}
|
||||
if ( (length($campaign_cid_override) > 6) || (length($temp_CID) > 6) )
|
||||
{
|
||||
if (length($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='LIST_CID_GROUP';}
|
||||
else
|
||||
{$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($DBIPuse_custom_cid[$camp_CIPct] =~ /Y/)
|
||||
@@ -1218,6 +1290,10 @@ while($one_day_interval > 0)
|
||||
### insert log record into vicidial_lead_24hour_calls table
|
||||
$stmtD = "INSERT INTO vicidial_lead_24hour_calls SET lead_id='$lead_id',list_id='$list_id',call_date=NOW(),phone_number='$phone_number',phone_code='$phone_code',state='$TFhourSTATE',call_type='AUTO';";
|
||||
$affected_rowsD = $dbhA->do($stmtD);
|
||||
|
||||
### insert log record into vicidial_dial_cid_log table
|
||||
$stmtE = "INSERT INTO vicidial_dial_cid_log SET caller_code='$VqueryCID',call_date='$SQLdate',call_type='OUTBALANCE',call_alt='$alt_dial',outbound_cid='$CCID',outbound_cid_type='$CCIDtype';";
|
||||
$affected_rowsE = $dbhA->do($stmtE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1232,6 +1308,8 @@ while($one_day_interval > 0)
|
||||
|
||||
$vltfh_inserts[$staggered_ct] = "INSERT INTO vicidial_lead_24hour_calls SET lead_id='$lead_id',list_id='$list_id',call_date=NOW(),phone_number='$phone_number',phone_code='$phone_code',state='$TFhourSTATE',call_type='AUTO';";
|
||||
|
||||
$vdcl_inserts[$staggered_ct] = "INSERT INTO vicidial_dial_cid_log SET caller_code='$VqueryCID',call_date='$SQLdate',call_type='OUTBALANCE',call_alt='$alt_dial',outbound_cid='$CCID',outbound_cid_type='$CCIDtype';";
|
||||
|
||||
$DB_camp_servers_calls_placed++;
|
||||
$calls_placed++;
|
||||
$staggered_ct++;
|
||||
@@ -1331,6 +1409,7 @@ while($one_day_interval > 0)
|
||||
$TEMP_st_logged = '';
|
||||
$TEMP_vddl_inserts = '';
|
||||
$TEMP_vltfh_inserts = '';
|
||||
$TEMP_vdcl_inserts = '';
|
||||
$TEMP_vm_insert = '';
|
||||
$TEMP_vac_insert = '';
|
||||
$TEMP_vddl_inserts = '';
|
||||
@@ -1348,6 +1427,7 @@ while($one_day_interval > 0)
|
||||
$TEMP_st_logged = $st_logged[$staggered_fill];
|
||||
$TEMP_vddl_inserts = $vddl_inserts[$staggered_fill];
|
||||
$TEMP_vltfh_inserts = $vltfh_inserts[$staggered_fill];
|
||||
$TEMP_vdcl_inserts = $vdcl_inserts[$staggered_fill];
|
||||
|
||||
$TEMP_vm_insert =~ s/XXXXXXXXXXXXXXX/$TEMP_server_ip/gi;
|
||||
$TEMP_vac_insert =~ s/XXXXXXXXXXXXXXX/$TEMP_server_ip/gi;
|
||||
@@ -1366,6 +1446,7 @@ while($one_day_interval > 0)
|
||||
$affected_rows_vac = $dbhA->do($TEMP_vac_insert);
|
||||
$affected_rows_vddl = $dbhA->do($TEMP_vddl_inserts);
|
||||
$affected_rows_vltfh = $dbhA->do($TEMP_vltfh_inserts);
|
||||
$affected_rows_vdcl = $dbhA->do($TEMP_vdcl_inserts);
|
||||
|
||||
if ($DB) {print "LEAD UPDATE: $affected_rows_vl|$TEMP_vl_update|\n";}
|
||||
if ($DB) {print "LEAD CALL COUNT UPDATE: $affected_rows_vdc|$TEMP_vdc_update|\n";}
|
||||
@@ -1373,9 +1454,10 @@ while($one_day_interval > 0)
|
||||
if ($DB) {print "VICIDIAL_AUTO_CALLS INSERT: $affected_rows_vac|$TEMP_vac_insert|\n";}
|
||||
if ($DB) {print "VICIDIAL_DIAL_LOG INSERT: $affected_rows_vddl|$TEMP_vddl_inserts|\n";}
|
||||
if ($DB) {print "VICIDIAL_LEAD_24HOUR_CALLS INSERT: $affected_rows_vltfh|$TEMP_vltfh_inserts|\n";}
|
||||
if ($DB) {print "VICIDIAL_DIAL_CID_LOG INSERT: $affected_rows_vdcl|$TEMP_vdcl_inserts|\n";}
|
||||
}
|
||||
|
||||
$event_string = "| number call stagger dialed|$TEMP_vm_insert|$TEMP_server_ip|$staggered_fill|$staggered_ct|$affected_rows_vm|$affected_rows_vac|$affected_rows_vl|$affected_rows_vddl $TEMP_st_logged";
|
||||
$event_string = "| number call stagger dialed|$TEMP_vm_insert|$TEMP_server_ip|$staggered_fill|$staggered_ct|$affected_rows_vm|$affected_rows_vac|$affected_rows_vl|$affected_rows_vddl|$affected_rows_vltfh|$affected_rows_vdcl $TEMP_st_logged";
|
||||
&event_logger;
|
||||
|
||||
### sleep for 2.5 hundredths of a second to not flood the server with new calls
|
||||
|
||||
@@ -1131,7 +1131,8 @@ inbound_after_hours_voicemail VARCHAR(20),
|
||||
qc_scorecard_id VARCHAR(20) DEFAULT '',
|
||||
qc_statuses_id VARCHAR(20) DEFAULT '',
|
||||
qc_web_form_address VARCHAR(255) DEFAULT '',
|
||||
auto_alt_threshold TINYINT(3) default '-1'
|
||||
auto_alt_threshold TINYINT(3) default '-1',
|
||||
cid_group_id VARCHAR(20) default '---DISABLED---'
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_statuses (
|
||||
@@ -4719,6 +4720,17 @@ user_group VARCHAR(20) default '---ALL---',
|
||||
active ENUM('Y','N')
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_dial_cid_log (
|
||||
caller_code VARCHAR(30) NOT NULL,
|
||||
call_date DATETIME,
|
||||
call_type ENUM('OUT','OUTBALANCE','MANUAL','OVERRIDE','3WAY') default 'OUT',
|
||||
call_alt VARCHAR(20) default '',
|
||||
outbound_cid VARCHAR(20) default '',
|
||||
outbound_cid_type VARCHAR(20) default '',
|
||||
index (caller_code),
|
||||
index (call_date)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
|
||||
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
|
||||
|
||||
@@ -4979,6 +4991,9 @@ ALTER TABLE vicidial_peer_event_log_archive MODIFY peer_event_id INT(9) UNSIGNED
|
||||
|
||||
CREATE TABLE vicidial_inbound_caller_codes_archive LIKE vicidial_inbound_caller_codes;
|
||||
|
||||
CREATE TABLE vicidial_dial_cid_log_archive LIKE vicidial_dial_cid_log;
|
||||
CREATE UNIQUE INDEX caller_code_date on vicidial_dial_cid_log_archive (caller_code,call_date);
|
||||
|
||||
GRANT RELOAD ON *.* TO cron@'%';
|
||||
GRANT RELOAD ON *.* TO cron@localhost;
|
||||
|
||||
@@ -5064,4 +5079,4 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_
|
||||
|
||||
UPDATE system_settings set vdc_agent_api_active='1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1656',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1657',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -1899,3 +1899,21 @@ KEY ajax_dbtime_key (db_time)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1656',db_schema_update_date=NOW() where db_schema_version < 1656;
|
||||
|
||||
ALTER TABLE vicidial_lists ADD cid_group_id VARCHAR(20) default '---DISABLED---';
|
||||
|
||||
CREATE TABLE vicidial_dial_cid_log (
|
||||
caller_code VARCHAR(30) NOT NULL,
|
||||
call_date DATETIME,
|
||||
call_type ENUM('OUT','OUTBALANCE','MANUAL','OVERRIDE','3WAY') default 'OUT',
|
||||
call_alt VARCHAR(20) default '',
|
||||
outbound_cid VARCHAR(20) default '',
|
||||
outbound_cid_type VARCHAR(20) default '',
|
||||
index (caller_code),
|
||||
index (call_date)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_dial_cid_log_archive LIKE vicidial_dial_cid_log;
|
||||
CREATE UNIQUE INDEX caller_code_date on vicidial_dial_cid_log_archive (caller_code,call_date);
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1657',db_schema_update_date=NOW() where db_schema_version < 1657;
|
||||
|
||||
@@ -150,10 +150,11 @@
|
||||
# 210823-0916 - Fix for security issue
|
||||
# 210825-0911 - Fix for XSS security issue
|
||||
# 220220-0904 - Added allow_web_debug system setting
|
||||
# 220312-0936 - Added vicidial_dial_cid_log logging
|
||||
#
|
||||
|
||||
$version = '2.14-97';
|
||||
$build = '220220-0904';
|
||||
$version = '2.14-98';
|
||||
$build = '220312-0936';
|
||||
$php_script = 'manager_send.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=143;
|
||||
@@ -621,6 +622,12 @@ if ($ACTION=="Originate")
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02119',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
### log outbound call in the dial cid log
|
||||
$stmt = "INSERT INTO vicidial_dial_cid_log SET caller_code='$queryCID',call_date='$NOW_TIME',call_type='MANUAL',call_alt='$agent_dialed_type', outbound_cid='$outbound_cid',outbound_cid_type='AGENT';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
if ( (strlen($lead_id) > 0) and (strlen($session_id) > 0) and (preg_match("/^DC/",$queryCID)) )
|
||||
{
|
||||
$stmt="INSERT INTO vicidial_sessions_recent SET lead_id='$lead_id',server_ip='$server_ip',call_date=NOW(),user='$user',campaign_id='$campaign',conf_exten='$session_id',call_type='X';";
|
||||
|
||||
@@ -523,10 +523,11 @@
|
||||
# 220119-1014 - Added auto_alt_threshold feature
|
||||
# 220212-0919 - Added pause_max_url_trigger input
|
||||
# 220219-0134 - Added allow_web_debug system setting
|
||||
# 220311-1709 - Added List CID Group Override option
|
||||
#
|
||||
|
||||
$version = '2.14-416';
|
||||
$build = '220219-0134';
|
||||
$version = '2.14-417';
|
||||
$build = '220311-1709';
|
||||
$php_script = 'vdc_db_query.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=876;
|
||||
@@ -4419,13 +4420,14 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00788',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$campaign_cid_override='';
|
||||
$LIST_cid_group_override='';
|
||||
$LISTweb_form_address='';
|
||||
$LISTweb_form_address_two='';
|
||||
$LISTweb_form_address_three='';
|
||||
### check if there is a list_id override
|
||||
if (strlen($list_id) > 1)
|
||||
{
|
||||
$stmt = "SELECT campaign_cid_override,web_form_address,web_form_address_two,web_form_address_three,list_description,default_xfer_group FROM vicidial_lists where list_id='$list_id';";
|
||||
$stmt = "SELECT campaign_cid_override,web_form_address,web_form_address_two,web_form_address_three,list_description,default_xfer_group,cid_group_id FROM vicidial_lists where list_id='$list_id';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00245',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -4439,6 +4441,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$LISTweb_form_address_three = $row[3];
|
||||
$list_description = $row[4];
|
||||
$LISTdefault_xfer_group = $row[5];
|
||||
$LIST_cid_group_override = $row[6];
|
||||
if ( (strlen($LISTdefault_xfer_group)>0) and (!preg_match("/---NONE---/",$LISTdefault_xfer_group)) )
|
||||
{$default_xfer_group = $LISTdefault_xfer_group;}
|
||||
}
|
||||
@@ -4585,7 +4588,75 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
manual_dnc_check($agent_dialed_number, $no_hopper_dialing_used, 0);
|
||||
}
|
||||
|
||||
if (strlen($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
$temp_CID='';
|
||||
if ( (strlen($LIST_cid_group_override) > 0) and ($LIST_cid_group_override != '---DISABLED---') )
|
||||
{
|
||||
$stmt = "SELECT cid_group_type FROM vicidial_cid_groups where cid_group_id='$LIST_cid_group_override';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$cidg_ct = mysqli_num_rows($rslt);
|
||||
if ($cidg_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$cid_group_type = $row[0];
|
||||
$temp_vcca='';
|
||||
$temp_ac='';
|
||||
|
||||
if ($cid_group_type == 'AREACODE')
|
||||
{
|
||||
$temp_ac_two = substr("$agent_dialed_number", 0, 2);
|
||||
$temp_ac_three = substr("$agent_dialed_number", 0, 3);
|
||||
$temp_ac_four = substr("$agent_dialed_number", 0, 4);
|
||||
$temp_ac_five = substr("$agent_dialed_number", 0, 5);
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and areacode IN('$temp_ac_two','$temp_ac_three','$temp_ac_four','$temp_ac_five') and active='Y' order by CAST(areacode as SIGNED INTEGER) asc, call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type == 'STATE')
|
||||
{
|
||||
$temp_state = $state;
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and areacode IN('$temp_state') and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type == 'NONE')
|
||||
{
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$vcca_ct = mysqli_num_rows($rslt);
|
||||
$act=0;
|
||||
while ($vcca_ct > $act)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$temp_vcca = $row[0];
|
||||
$temp_ac = $row[1];
|
||||
$act++;
|
||||
}
|
||||
if ($act > 0)
|
||||
{
|
||||
$stmt="UPDATE vicidial_campaign_cid_areacodes SET call_count_today=(call_count_today + 1) where campaign_id='$LIST_cid_group_override' and areacode='$temp_ac' and outbound_cid='$temp_vcca';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
if ($cid_group_type == 'NONE')
|
||||
{
|
||||
$stmt="UPDATE vicidial_cid_groups SET cid_auto_rotate_calls=(cid_auto_rotate_calls + 1) where cid_group_id='$LIST_cid_group_override';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
}
|
||||
$temp_CID = preg_replace("/\D/",'',$temp_vcca);
|
||||
}
|
||||
if ( (strlen($campaign_cid_override) > 6) or (strlen($temp_CID) > 6) )
|
||||
{
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='LIST_CID_GROUP';}
|
||||
else
|
||||
{$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($uccid_ct > 0)
|
||||
@@ -4941,14 +5012,20 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
}
|
||||
#### END check for manual_dial_cid == 'AGENT_PHONE_OVERRIDE'
|
||||
|
||||
#### BEGIN check for API forced CID override ####
|
||||
#### BEGIN check for API forced CID or Agent-Selected Group Alias override ####
|
||||
if ( ($usegroupalias > 0) and ($account=='-FORCE-') and (strlen($campaign_cid) > 6) )
|
||||
{
|
||||
$FORCEoutbound_cid = preg_replace("/\D/",'',$campaign_cid);
|
||||
if (strlen($FORCEoutbound_cid) > 6)
|
||||
{$CCID = "$FORCEoutbound_cid"; $CCID_on++; $CCIDtype='API_CID';}
|
||||
}
|
||||
#### END check for API forced CID override ####
|
||||
if ( ($usegroupalias > 0) and (strlen($account)>0) and (strlen($campaign_cid) > 6) )
|
||||
{
|
||||
$FORCEoutbound_cid = preg_replace("/\D/",'',$campaign_cid);
|
||||
if (strlen($FORCEoutbound_cid) > 6)
|
||||
{$CCID = "$FORCEoutbound_cid"; $CCID_on++; $CCIDtype='AGENT_CHOOSE_CID';}
|
||||
}
|
||||
#### END check for API forced CID or Agent-Selected Group Alias override ####
|
||||
|
||||
if ($CCID_on) {$CIDstring = "\"$MqueryCID$EAC\" <$CCID>";}
|
||||
else {$CIDstring = "$MqueryCID$EAC";}
|
||||
@@ -4972,6 +5049,12 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00852',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
### log outbound call in the dial cid log
|
||||
$stmt = "INSERT INTO vicidial_dial_cid_log SET caller_code='$MqueryCID',call_date='$NOW_TIME',call_type='MANUAL',call_alt='$agent_dialed_type', outbound_cid='$CCID',outbound_cid_type='$CCIDtype';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$calls_todaySQL = ",calls_today='$calls_today'";
|
||||
### Skip logging and list overrides if dial in-group is used
|
||||
if (strlen($dial_ingroup) < 1)
|
||||
@@ -6325,7 +6408,7 @@ if ($ACTION == 'manDiaLonly')
|
||||
|
||||
if (strlen($list_id) > 1)
|
||||
{
|
||||
$stmt = "SELECT campaign_cid_override,web_form_address,web_form_address_two,web_form_address_three,list_description FROM vicidial_lists where list_id='$list_id';";
|
||||
$stmt = "SELECT campaign_cid_override,web_form_address,web_form_address_two,web_form_address_three,list_description,cid_group_id FROM vicidial_lists where list_id='$list_id';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00247',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -6338,12 +6421,81 @@ if ($ACTION == 'manDiaLonly')
|
||||
$LISTweb_form_address_two = $row[2];
|
||||
$LISTweb_form_address_three = $row[3];
|
||||
$list_description = $row[4];
|
||||
$LIST_cid_group_override = $row[5];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
$temp_CID='';
|
||||
if ( (strlen($LIST_cid_group_override) > 0) and ($LIST_cid_group_override != '---DISABLED---') )
|
||||
{
|
||||
$stmt = "SELECT cid_group_type FROM vicidial_cid_groups where cid_group_id='$LIST_cid_group_override';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$cidg_ct = mysqli_num_rows($rslt);
|
||||
if ($cidg_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$cid_group_type = $row[0];
|
||||
$temp_vcca='';
|
||||
$temp_ac='';
|
||||
|
||||
if ($cid_group_type == 'AREACODE')
|
||||
{
|
||||
$temp_ac_two = substr("$agent_dialed_number", 0, 2);
|
||||
$temp_ac_three = substr("$agent_dialed_number", 0, 3);
|
||||
$temp_ac_four = substr("$agent_dialed_number", 0, 4);
|
||||
$temp_ac_five = substr("$agent_dialed_number", 0, 5);
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and areacode IN('$temp_ac_two','$temp_ac_three','$temp_ac_four','$temp_ac_five') and active='Y' order by CAST(areacode as SIGNED INTEGER) asc, call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type == 'STATE')
|
||||
{
|
||||
$temp_state = $state;
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and areacode IN('$temp_state') and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type == 'NONE')
|
||||
{
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$LIST_cid_group_override' and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$vcca_ct = mysqli_num_rows($rslt);
|
||||
$act=0;
|
||||
while ($vcca_ct > $act)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$temp_vcca = $row[0];
|
||||
$temp_ac = $row[1];
|
||||
$act++;
|
||||
}
|
||||
if ($act > 0)
|
||||
{
|
||||
$stmt="UPDATE vicidial_campaign_cid_areacodes SET call_count_today=(call_count_today + 1) where campaign_id='$LIST_cid_group_override' and areacode='$temp_ac' and outbound_cid='$temp_vcca';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
if ($cid_group_type == 'NONE')
|
||||
{
|
||||
$stmt="UPDATE vicidial_cid_groups SET cid_auto_rotate_calls=(cid_auto_rotate_calls + 1) where cid_group_id='$LIST_cid_group_override';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
}
|
||||
$temp_CID = preg_replace("/\D/",'',$temp_vcca);
|
||||
}
|
||||
if ( (strlen($campaign_cid_override) > 6) or (strlen($temp_CID) > 6) )
|
||||
{
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='LIST_CID_GROUP';}
|
||||
else
|
||||
{$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
}
|
||||
else
|
||||
{
|
||||
### check for custom cid use
|
||||
@@ -6575,14 +6727,20 @@ if ($ACTION == 'manDiaLonly')
|
||||
}
|
||||
#### END check for manual_dial_cid == 'AGENT_PHONE_OVERRIDE'
|
||||
|
||||
#### BEGIN check for API forced CID override ####
|
||||
#### BEGIN check for API forced CID or Agent-Selected Group Alias override ####
|
||||
if ( ($usegroupalias > 0) and ($account=='-FORCE-') and (strlen($campaign_cid) > 6) )
|
||||
{
|
||||
$FORCEoutbound_cid = preg_replace("/\D/",'',$campaign_cid);
|
||||
if (strlen($FORCEoutbound_cid) > 6)
|
||||
{$CCID = "$FORCEoutbound_cid"; $CCID_on++; $CCIDtype='API_CID';}
|
||||
}
|
||||
#### END check for API forced CID override ####
|
||||
if ( ($usegroupalias > 0) and (strlen($account)>0) and (strlen($campaign_cid) > 6) )
|
||||
{
|
||||
$FORCEoutbound_cid = preg_replace("/\D/",'',$campaign_cid);
|
||||
if (strlen($FORCEoutbound_cid) > 6)
|
||||
{$CCID = "$FORCEoutbound_cid"; $CCID_on++; $CCIDtype='AGENT_CHOOSE_CID';}
|
||||
}
|
||||
#### END check for API forced CID or Agent-Selected Group Alias override ####
|
||||
|
||||
#### BEGIN run manual_dial_hopper_check process if enabled
|
||||
if ($manual_dial_hopper_check == 'Y')
|
||||
@@ -6688,6 +6846,12 @@ if ($ACTION == 'manDiaLonly')
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00855',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
### log outbound call in the dial cid log
|
||||
$stmt = "INSERT INTO vicidial_dial_cid_log SET caller_code='$MqueryCID',call_date='$NOW_TIME',call_type='MANUAL',call_alt='$agent_dialed_type', outbound_cid='$CCID',outbound_cid_type='$CCIDtype';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
### update the agent status to INCALL in vicidial_live_agents
|
||||
$stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL',calls_today='$calls_today',external_hangup=0,external_status='',external_pause='',external_dial='',last_state_change='$NOW_TIME',pause_code='',preview_lead_id='0' where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
|
||||
@@ -5883,12 +5883,14 @@ if ($SSscript_remove_js > 0)
|
||||
# 220218-1656 - Added allow_web_debug system setting to disable $DB output by default
|
||||
# 220307-1151 - Added 'update_presets' Non-Agent API function
|
||||
# 220310-1007 - Added STAGING option for campaign presets
|
||||
# 220311-0808 - Added List setting for Campaign CID Group Override
|
||||
# 220312-0937 - Added vicidial_dial_cid_log logging
|
||||
#
|
||||
|
||||
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
||||
|
||||
$admin_version = '2.14-850a';
|
||||
$build = '220310-1007';
|
||||
$admin_version = '2.14-852a';
|
||||
$build = '220312-0937';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -16626,7 +16628,7 @@ if ($ADD==41)
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
### gather list_id overrides
|
||||
$stmt="SELECT campaign_cid_override FROM vicidial_lists where list_id='$manual_dial_list_id' $LOGallowed_campaignsSQL;";
|
||||
$stmt="SELECT campaign_cid_override,cid_group_id FROM vicidial_lists where list_id='$manual_dial_list_id' $LOGallowed_campaignsSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$CIDor_ct = mysqli_num_rows($rslt);
|
||||
@@ -16635,6 +16637,7 @@ if ($ADD==41)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$campaign_cid_override = $row[0];
|
||||
$campaign_cid_group_override = $row[1];
|
||||
}
|
||||
|
||||
### gather server information
|
||||
@@ -16693,6 +16696,12 @@ if ($ADD==41)
|
||||
$stmtD = "INSERT INTO vicidial_dial_log SET caller_code='$VqueryCID',lead_id='$lead_id',server_ip='$old_server_ip',call_date='$SQLdate',extension='$VDAD_dial_exten',channel='$local_DEF$Ndialstring$local_AMP$ext_context',timeout='$Local_dial_timeout',outbound_cid='$CIDstring',context='$ext_context';";
|
||||
$rslt=mysql_to_mysqli($stmtD, $link);
|
||||
|
||||
### log outbound call in the dial cid log
|
||||
$stmt = "INSERT INTO vicidial_dial_cid_log SET caller_code='$VqueryCID',call_date='$SQLdate',call_type='MANUAL',call_alt='MAIN', outbound_cid='$CCID',outbound_cid_type='CAMPAIGN_TEST';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
### LOG INSERTION Admin Log Table, for campaign ###
|
||||
$SQL_log = "$stmtA|$stmtB|$stmtC|";
|
||||
$SQL_log = preg_replace('/;/', '', $SQL_log);
|
||||
@@ -17746,7 +17755,7 @@ if ($ADD==411)
|
||||
|
||||
echo "<br><B>"._QXZ("LIST MODIFIED").": $list_id</B>\n";
|
||||
|
||||
$stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active',list_description='$list_description',list_changedate='$SQLdate',reset_time='$reset_time',agent_script_override='$agent_script_override',inbound_list_script_override='$inbound_list_script_override',campaign_cid_override='$campaign_cid_override',am_message_exten_override='$am_message_exten_override',drop_inbound_group_override='$drop_inbound_group_override',xferconf_a_number='$xferconf_a_number',xferconf_b_number='$xferconf_b_number',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',web_form_address='" . mysqli_real_escape_string($link, $web_form_address) . "',web_form_address_two='" . mysqli_real_escape_string($link, $web_form_address_two) . "',time_zone_setting='$time_zone_setting',inventory_report='$inventory_report',expiration_date='$expiration_date',na_call_url='" . mysqli_real_escape_string($link, $na_call_url) . "',local_call_time='$local_call_time',web_form_address_three='" . mysqli_real_escape_string($link, $web_form_address_three) . "',status_group_id='$status_group_id',user_new_lead_limit='$user_new_lead_limit',default_xfer_group='$default_xfer_group',qc_scorecard_id='$qc_scorecard_id' $daily_reset_limitSQL,auto_active_list_rank='$auto_active_list_rank',qc_statuses_id='$qc_statuses_id',qc_web_form_address='" . mysqli_real_escape_string($link, $qc_web_form_address) . "',inbound_drop_voicemail='$inbound_drop_voicemail',inbound_after_hours_voicemail='$inbound_after_hours_voicemail',auto_alt_threshold='$auto_alt_threshold' where list_id='$list_id';";
|
||||
$stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active',list_description='$list_description',list_changedate='$SQLdate',reset_time='$reset_time',agent_script_override='$agent_script_override',inbound_list_script_override='$inbound_list_script_override',campaign_cid_override='$campaign_cid_override',am_message_exten_override='$am_message_exten_override',drop_inbound_group_override='$drop_inbound_group_override',xferconf_a_number='$xferconf_a_number',xferconf_b_number='$xferconf_b_number',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',web_form_address='" . mysqli_real_escape_string($link, $web_form_address) . "',web_form_address_two='" . mysqli_real_escape_string($link, $web_form_address_two) . "',time_zone_setting='$time_zone_setting',inventory_report='$inventory_report',expiration_date='$expiration_date',na_call_url='" . mysqli_real_escape_string($link, $na_call_url) . "',local_call_time='$local_call_time',web_form_address_three='" . mysqli_real_escape_string($link, $web_form_address_three) . "',status_group_id='$status_group_id',user_new_lead_limit='$user_new_lead_limit',default_xfer_group='$default_xfer_group',qc_scorecard_id='$qc_scorecard_id' $daily_reset_limitSQL,auto_active_list_rank='$auto_active_list_rank',qc_statuses_id='$qc_statuses_id',qc_web_form_address='" . mysqli_real_escape_string($link, $qc_web_form_address) . "',inbound_drop_voicemail='$inbound_drop_voicemail',inbound_after_hours_voicemail='$inbound_after_hours_voicemail',auto_alt_threshold='$auto_alt_threshold',cid_group_id='$cid_group_id' where list_id='$list_id';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
## QC Addition for Audited Comments
|
||||
@@ -30589,7 +30598,7 @@ if ($ADD==311)
|
||||
}
|
||||
}
|
||||
|
||||
$stmt="SELECT vicidial_lists.list_id,list_name,campaign_id,active,list_description,list_changedate,list_lastcalldate,reset_time,agent_script_override,campaign_cid_override,am_message_exten_override,drop_inbound_group_override,xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number,web_form_address,web_form_address_two,time_zone_setting,inventory_report,IFNULL(audit_comments,0),expiration_date,DATE_FORMAT(expiration_date,'%Y%m%d'),na_call_url,local_call_time,web_form_address_three,status_group_id,user_new_lead_limit,inbound_list_script_override,default_xfer_group,daily_reset_limit,resets_today,auto_active_list_rank,inbound_drop_voicemail,inbound_after_hours_voicemail,qc_scorecard_id,qc_statuses_id,qc_web_form_address,auto_alt_threshold from vicidial_lists left outer join vicidial_lists_custom on vicidial_lists.list_id=vicidial_lists_custom.list_id where vicidial_lists.list_id='$list_id' $LOGallowed_campaignsSQL;";
|
||||
$stmt="SELECT vicidial_lists.list_id,list_name,campaign_id,active,list_description,list_changedate,list_lastcalldate,reset_time,agent_script_override,campaign_cid_override,am_message_exten_override,drop_inbound_group_override,xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number,web_form_address,web_form_address_two,time_zone_setting,inventory_report,IFNULL(audit_comments,0),expiration_date,DATE_FORMAT(expiration_date,'%Y%m%d'),na_call_url,local_call_time,web_form_address_three,status_group_id,user_new_lead_limit,inbound_list_script_override,default_xfer_group,daily_reset_limit,resets_today,auto_active_list_rank,inbound_drop_voicemail,inbound_after_hours_voicemail,qc_scorecard_id,qc_statuses_id,qc_web_form_address,auto_alt_threshold,cid_group_id from vicidial_lists left outer join vicidial_lists_custom on vicidial_lists.list_id=vicidial_lists_custom.list_id where vicidial_lists.list_id='$list_id' $LOGallowed_campaignsSQL;";
|
||||
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -30633,6 +30642,7 @@ if ($ADD==311)
|
||||
$qc_statuses_id = $row[37];
|
||||
$qc_web_form_address = $row[38];
|
||||
$auto_alt_threshold = $row[39];
|
||||
$cid_group_id = $row[40];
|
||||
|
||||
# grab names of global statuses and statuses in the selected campaign
|
||||
$stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_statuses order by status;";
|
||||
@@ -30828,6 +30838,43 @@ if ($ADD==311)
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>$DID_edit_link_BEGIN"._QXZ("Campaign CID Override")."$DID_edit_link_END: </td><td align=left><input type=text name=campaign_cid_override size=20 maxlength=20 value=\"$campaign_cid_override\">$NWB#lists-campaign_cid_override$NWE</td></tr>\n";
|
||||
|
||||
if ($SScampaign_cid_areacodes_enabled == '1')
|
||||
{
|
||||
##### get vicidial_cid_groups listings for dynamic pulldown list
|
||||
$stmt="SELECT cid_group_id,cid_group_type,cid_group_notes from vicidial_cid_groups $whereLOGadmin_viewable_groupsSQL order by cid_group_id;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$cid_groups_to_print = mysqli_num_rows($rslt);
|
||||
$cid_groups_menu='';
|
||||
$cid_groups_selected=0;
|
||||
$o=0;
|
||||
while ($cid_groups_to_print > $o)
|
||||
{
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
$cid_groups_menu .= "<option ";
|
||||
if ($cid_group_id == "$rowx[0]")
|
||||
{
|
||||
$cid_groups_menu .= "SELECTED ";
|
||||
$cid_groups_selected++;
|
||||
}
|
||||
$cid_groups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1] - $rowx[2]</option>\n";
|
||||
$o++;
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>";
|
||||
if ($cid_groups_selected > 0)
|
||||
{echo "<a href=\"$PHP_SELF?ADD=396111111111&cid_group_id=$cid_group_id\">"._QXZ("Campaign CID Group Override")."</a>";}
|
||||
else
|
||||
{echo _QXZ("Campaign CID Group Override");}
|
||||
echo ": </td><td align=left><select size=1 name=cid_group_id>";
|
||||
echo "<option value=\"---DISABLED---\">---"._QXZ("DISABLED")."---</option>";
|
||||
echo "$cid_groups_menu";
|
||||
echo "</select>$NWB#lists-cid_group_id$NWE</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr bgcolor=#$SSstd_row3_background><td align=right><input type=hidden name=cid_group_id value=\"$cid_group_id\"></td></tr>";
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Answering Machine Message Override").": </td><td align=left><input type=text name=am_message_exten_override id=am_message_exten_override size=50 maxlength=100 value=\"$am_message_exten_override\"> <a href=\"javascript:launch_chooser('am_message_exten_override','date');\">"._QXZ("audio chooser")."</a> $NWB#lists-am_message_exten_override$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Drop Inbound Group Override").": </td><td align=left><select size=1 name=drop_inbound_group_override>";
|
||||
@@ -41540,6 +41587,22 @@ if ($ADD==396111111111)
|
||||
$o++;
|
||||
}
|
||||
|
||||
echo "</TABLE><BR><BR>\n";
|
||||
|
||||
echo "<B>"._QXZ("LISTS USING THIS CID GROUP").":</B><BR>\n";
|
||||
echo "<TABLE>\n";
|
||||
|
||||
$stmt="SELECT list_id,list_name from vicidial_lists where cid_group_id='$cid_group_id' $LOGallowed_campaignsSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$lists_to_print = mysqli_num_rows($rslt);
|
||||
$o=0;
|
||||
while ($lists_to_print > $o)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
echo "<TR><TD><a href=\"$PHP_SELF?ADD=311&list_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
|
||||
$o++;
|
||||
}
|
||||
|
||||
echo "</TABLE><BR><center>\n";
|
||||
|
||||
if (($LOGast_admin_access==1) and ($LOGmodify_statuses==1))
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
# 210629-1545 - Added KHOMP stats display
|
||||
# 210630-0838 - Added display of vicidial_vmm_counts data, if $CIDdisplay=="Yes"
|
||||
# 220222-1454 - Added allow_web_debug system setting
|
||||
# 220312-0953 - Added vicidial_dial_cid_log data
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -1857,13 +1858,13 @@ else
|
||||
$call_log .= "<td align=right><font size=2> $row[3] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[2] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[1] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[15] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[10] </td>\n";
|
||||
$call_log .= "<td align=center><font size=2> $row[15] </td>\n";
|
||||
$call_log .= "<td align=left><font size=2> $row[10] </font><font size=1>$row[16] </td>\n";
|
||||
|
||||
if ($CIDdisplay=="Yes")
|
||||
{
|
||||
$caller_code='';
|
||||
$stmtA="SELECT caller_code,server_ip FROM vicidial_log_extended WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid='$row[0]';";
|
||||
$stmtA="SELECT caller_code,server_ip FROM vicidial_log_extended WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid='$row[0]' limit 1;";
|
||||
$rsltA=mysql_to_mysqli($stmtA, $link);
|
||||
$cc_to_print = mysqli_num_rows($rsltA);
|
||||
if ($cc_to_print > 0)
|
||||
@@ -1872,8 +1873,8 @@ else
|
||||
$caller_code = $rowA[0];
|
||||
$VLEserver_ip = $rowA[1];
|
||||
}
|
||||
$outbound_cid='';
|
||||
$stmtA="SELECT outbound_cid,server_ip FROM vicidial_dial_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and caller_code='$caller_code';";
|
||||
$outbound_cid=''; $VDLcall_date='0';
|
||||
$stmtA="SELECT outbound_cid,server_ip,call_date FROM vicidial_dial_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and caller_code='$caller_code' limit 1;";
|
||||
$rsltA=mysql_to_mysqli($stmtA, $link);
|
||||
$cid_to_print = mysqli_num_rows($rsltA);
|
||||
if ($cid_to_print > 0)
|
||||
@@ -1882,14 +1883,27 @@ else
|
||||
$outbound_cid = $rowA[0];
|
||||
$outbound_cid = preg_replace("/\".*\" /",'',$outbound_cid);
|
||||
$VDLserver_ip = $rowA[1];
|
||||
$VDLcall_date = $rowA[2];
|
||||
}
|
||||
$outbound_cid_num=''; $outbound_cid_type='';
|
||||
$stmtA="SELECT outbound_cid,outbound_cid_type FROM vicidial_dial_cid_log WHERE call_date='$VDLcall_date' and caller_code='$caller_code' limit 1;";
|
||||
$rsltA=mysql_to_mysqli($stmtA, $link);
|
||||
$vdl_to_print = mysqli_num_rows($rsltA);
|
||||
if ($vdl_to_print > 0)
|
||||
{
|
||||
$rowA=mysqli_fetch_row($rsltA);
|
||||
$outbound_cid_num = $rowA[0];
|
||||
$outbound_cid_num = preg_replace("/\".*\" /",'',$outbound_cid_num);
|
||||
$outbound_cid_type = $rowA[1];
|
||||
}
|
||||
|
||||
if ($SSsip_event_logging > 0)
|
||||
{
|
||||
$call_log .= "<td align=right nowrap><font size=2> $outbound_cid <span onClick=\"ShowCallDetail(event,'$caller_code','$SSframe_background')\"><font color=blue><u>$caller_code</u></font></span></td><td align=right><font size=2> $row[0]</td><td align=right><font size=2> $rowA[1]</td>\n";
|
||||
$call_log .= "<td align=left nowrap><font size=2> $outbound_cid <span onClick=\"ShowCallDetail(event,'$caller_code','$SSframe_background')\"><font color=blue><u>$caller_code</u></font></span> <font size=1>$outbound_cid_type</td><td align=right><font size=2> $row[0]</td><td align=right><font size=2> $VDLserver_ip</td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_log .= "<td align=right nowrap><font size=2> $outbound_cid $caller_code</td><td align=right><font size=2> $row[0]</td><td align=right><font size=2> $rowA[1]</td>\n";
|
||||
$call_log .= "<td align=left nowrap><font size=2> $outbound_cid $caller_code </font><font size=1>$outbound_cid_type</td><td align=right><font size=2> $row[0]</td><td align=right><font size=2> $VDLserver_ip</td>\n";
|
||||
}
|
||||
$AMDSTATUS=''; $AMDRESPONSE='';
|
||||
$stmtA="SELECT AMDSTATUS,AMDRESPONSE FROM vicidial_amd_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and caller_code='$caller_code';";
|
||||
@@ -2110,8 +2124,8 @@ else
|
||||
$call_log .= "<td align=right><font size=2> $row[3] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[2] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[1] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[15] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[10] </td>\n";
|
||||
$call_log .= "<td align=center><font size=2> $row[15] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[10] </font><font size=1>$row[16] </td>\n";
|
||||
|
||||
if ($CIDdisplay=="Yes")
|
||||
{
|
||||
@@ -2125,8 +2139,8 @@ else
|
||||
$caller_code = $rowA[0];
|
||||
$VLEserver_ip = $rowA[1];
|
||||
}
|
||||
$outbound_cid='';
|
||||
$stmtA="SELECT outbound_cid,server_ip FROM vicidial_dial_log_archive WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and caller_code='$caller_code';";
|
||||
$outbound_cid=''; $VDLcall_date='0';
|
||||
$stmtA="SELECT outbound_cid,server_ip,call_date FROM vicidial_dial_log_archive WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and caller_code='$caller_code' limit 1;";
|
||||
$rsltA=mysql_to_mysqli($stmtA, $link);
|
||||
$cid_to_print = mysqli_num_rows($rsltA);
|
||||
if ($cid_to_print > 0)
|
||||
@@ -2135,14 +2149,27 @@ else
|
||||
$outbound_cid = $rowA[0];
|
||||
$outbound_cid = preg_replace("/\".*\" /",'',$outbound_cid);
|
||||
$VDLserver_ip = $rowA[1];
|
||||
$VDLcall_date = $rowA[2];
|
||||
}
|
||||
$outbound_cid_num=''; $outbound_cid_type='';
|
||||
$stmtA="SELECT outbound_cid,outbound_cid_type FROM vicidial_dial_cid_log_archive WHERE call_date='$VDLcall_date' and caller_code='$caller_code' limit 1;";
|
||||
$rsltA=mysql_to_mysqli($stmtA, $link);
|
||||
$vdl_to_print = mysqli_num_rows($rsltA);
|
||||
if ($vdl_to_print > 0)
|
||||
{
|
||||
$rowA=mysqli_fetch_row($rsltA);
|
||||
$outbound_cid_num = $rowA[0];
|
||||
$outbound_cid_num = preg_replace("/\".*\" /",'',$outbound_cid_num);
|
||||
$outbound_cid_type = $rowA[1];
|
||||
}
|
||||
|
||||
if ($SSsip_event_logging > 0)
|
||||
{
|
||||
$call_log .= "<td align=right nowrap><font size=2> $outbound_cid <span onClick=\"ShowCallDetail(event,'$caller_code','$SSframe_background')\"><font color=blue><u>$caller_code</u></font></span></td><td align=right><font size=2> $row[0]</td><td align=right><font size=2> $rowA[1]</td>\n";
|
||||
$call_log .= "<td align=right nowrap><font size=2> $outbound_cid <span onClick=\"ShowCallDetail(event,'$caller_code','$SSframe_background')\"><font color=blue><u>$caller_code</u></font></span> <font size=1>$outbound_cid_type</td><td align=right><font size=2> $row[0]</td><td align=right><font size=2> $VDLserver_ip</td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_log .= "<td align=right nowrap><font size=2> $outbound_cid $caller_code</td><td align=right><font size=2> $row[0]</td><td align=right><font size=2> $rowA[1]</td>\n";
|
||||
$call_log .= "<td align=right nowrap><font size=2> $outbound_cid $caller_code </font><font size=1>$outbound_cid_type</td><td align=right><font size=2> $row[0]</td><td align=right><font size=2> $VDLserver_ip</td>\n";
|
||||
}
|
||||
}
|
||||
$call_log .= "</tr>\n";
|
||||
@@ -3099,7 +3126,7 @@ else
|
||||
$out_log_width=1300;
|
||||
if ($AMDcount > 0) {$out_log_width=1500;}
|
||||
echo "<TABLE width=$out_log_width cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("LENGTH")."</td><td align=left><font size=2> "._QXZ("STATUS")."</td><td align=left><font size=2> "._QXZ("TSR")."</td><td align=right><font size=2> "._QXZ("CAMPAIGN")."</td><td align=right><font size=2> "._QXZ("LIST")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("HANGUP REASON")."</td><td align=right><font size=2> "._QXZ("PHONE")."</td><td align=center><font size=2> <a href=\"$PHP_SELF?lead_id=$lead_id&archive_search=$archive_search&archive_log=$archive_log&CIDdisplay=$altCIDdisplay\">"._QXZ("CALLER ID")."</a></td><td align=right><font size=2> <a href=\"$PHP_SELF?lead_id=$lead_id&archive_search=$archive_search&archive_log=$archive_log&CIDdisplay=$altCIDdisplay\">"._QXZ("UNIQUEID")."</a></td><td align=right><font size=2> <a href=\"$PHP_SELF?lead_id=$lead_id&archive_search=$archive_search&archive_log=$archive_log&CIDdisplay=$altCIDdisplay\">"._QXZ("SERVER IP")."</a></td>";
|
||||
echo "<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("LENGTH")."</td><td align=left><font size=2> "._QXZ("STATUS")."</td><td align=left><font size=2> "._QXZ("TSR")."</td><td align=right><font size=2> "._QXZ("CAMPAIGN")."</td><td align=right><font size=2> "._QXZ("LIST")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("HANGUP REASON")."</td><td align=center><font size=2> "._QXZ("PHONE")."</td><td align=center><font size=2> <a href=\"$PHP_SELF?lead_id=$lead_id&archive_search=$archive_search&archive_log=$archive_log&CIDdisplay=$altCIDdisplay\">"._QXZ("CALLER ID")."</a></td><td align=right><font size=2> <a href=\"$PHP_SELF?lead_id=$lead_id&archive_search=$archive_search&archive_log=$archive_log&CIDdisplay=$altCIDdisplay\">"._QXZ("UNIQUEID")."</a></td><td align=right><font size=2> <a href=\"$PHP_SELF?lead_id=$lead_id&archive_search=$archive_search&archive_log=$archive_log&CIDdisplay=$altCIDdisplay\">"._QXZ("SERVER IP")."</a></td>";
|
||||
if ($AMDcount > 0)
|
||||
{echo "<td align=right><font size=2> "._QXZ("AMD STATUS")."</td><td align=right><font size=2> "._QXZ("AMD RESPONSE")."</td>";}
|
||||
echo "</tr>\n";
|
||||
@@ -3107,7 +3134,7 @@ else
|
||||
else
|
||||
{
|
||||
echo "<TABLE width=850 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("LENGTH")."</td><td align=left><font size=2> "._QXZ("STATUS")."</td><td align=left><font size=2> "._QXZ("TSR")."</td><td align=right><font size=2> "._QXZ("CAMPAIGN")."</td><td align=right><font size=2> "._QXZ("LIST")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("HANGUP REASON")."</td><td align=right><font size=2> "._QXZ("PHONE")."</td><td align=right><font size=2> <a href=\"$PHP_SELF?lead_id=$lead_id&archive_search=$archive_search&archive_log=$archive_log&CIDdisplay=$altCIDdisplay\">"._QXZ("CALLER ID")."</a></td></tr>\n";
|
||||
echo "<tr><td><font size=1># </td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("LENGTH")."</td><td align=left><font size=2> "._QXZ("STATUS")."</td><td align=left><font size=2> "._QXZ("TSR")."</td><td align=right><font size=2> "._QXZ("CAMPAIGN")."</td><td align=right><font size=2> "._QXZ("LIST")."</td><td align=right><font size=2> "._QXZ("LEAD")."</td><td align=right><font size=2> "._QXZ("HANGUP REASON")."</td><td align=center><font size=2> "._QXZ("PHONE")."</td><td align=right><font size=2> <a href=\"$PHP_SELF?lead_id=$lead_id&archive_search=$archive_search&archive_log=$archive_log&CIDdisplay=$altCIDdisplay\">"._QXZ("CALLER ID")."</a></td></tr>\n";
|
||||
}
|
||||
|
||||
echo "$call_log\n";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# version: 20220310084801
|
||||
# version: 20220311081801
|
||||
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
|
||||
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
|
||||
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N.</QXZ>
|
||||
@@ -243,11 +243,11 @@ campaigns-local_call_time Local Call Time <QXZ>This is where you set during whic
|
||||
campaigns-dial_prefix Dial Prefix <QXZ>This field allows for more easily changing a path of dialing to go out through a different method without doing a reload in Asterisk. Default is 9 based upon a 91NXXNXXXXXX in the dial plan - extensions.conf.</QXZ>
|
||||
campaigns-manual_dial_prefix Manual Dial Prefix <QXZ>This optional field allows you to set the dial prefix to be used only when placing manual dial calls from the agent interface, such as using the MANUAL DIAL feature, or Dial Next Number when in the MANUAL dial method, or manual alt number dialing, or scheduled user-only callbacks. Default is empty for disabled, which will use the Dial Prefix defined in the field above. This option does not interfere with the 3way Dial Prefix option.</QXZ>
|
||||
campaigns-omit_phone_code Omit Phone Code <QXZ>This field allows you to leave out the phone_code field while dialing within the system. For instance if you are dialing in the UK from the UK you would have 44 in as your phone_code field for all leads, but you just want to dial 10 digits in your dial plan extensions.conf to place calls instead of 44 then 10 digits. Default is N.</QXZ>
|
||||
campaigns-campaign_cid Campaign CallerID <QXZ>This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service -RBS- circuits. This will also work through most VOIP -SIP or IAX trunks- providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID.</QXZ><QXZ>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-use_custom_cid Custom CallerID <QXZ>When set to Y, this option allows you to use the security_phrase field in the list table as the CallerID to send out when placing for each specific lead. If this field has no CID in it then the Campaign CallerID defined above will be used instead. This option will disable the list CallerID Override if there is a CID present in the security_phrase field. Default is N. When set to AREACODE you have the ability to go into the AC-CID submenu and define multiple callerids to be used per areacode. For MANUAL and INBOUND_MAN dial methods only, and agent manual dial calls in other dial methods, you can use one of the USER_CUSTOM selections to take a CallerID number put into one of the User Custom fields in the User Modify admin screen and use that for outbound manual dial calls placed by an agent. For more information on CallerID priority, see below.<BR>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-cid_group_id CID Group <QXZ>If set to something other than ---DISABLED---, the selected CID Group will override all other campaign CID settings above and will use the state or areacode based CIDs that are defined in the CID Group. Default is ---DISABLED---. For more information on CallerID priority, see the CALLERID PRIORITY entry below.<BR>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry(CID Group Failover) <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-cid_group_id_two CID Group Failover <QXZ>If set to something other than ---DISABLED---, the selected CID Group will be used if the main CID Group set above does not have a matching areacode or state entry for the phone number being called. Default is ---DISABLED---. For more information on CallerID priority, see the CALLERID PRIORITY entry below.<BR>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry(CID Group Failover) <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-cid_priority CALLERID PRIORITY <QXZ>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry(CID Group Failover) <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-campaign_cid Campaign CallerID <QXZ>This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service -RBS- circuits. This will also work through most VOIP -SIP or IAX trunks- providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID.</QXZ><QXZ>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CID Group Override <BR>2 - List CallerID Override <BR>3 - CID Group entry(CID Group Failover) <BR>4 - AC-CID AREACODE entry <BR>5 - Custom CallerID, Security Phrase <BR>6 - USER_CUSTOM CallerID <BR>7 - Campaign CID <BR></QXZ>
|
||||
campaigns-use_custom_cid Custom CallerID <QXZ>When set to Y, this option allows you to use the security_phrase field in the list table as the CallerID to send out when placing for each specific lead. If this field has no CID in it then the Campaign CallerID defined above will be used instead. This option will disable the list CallerID Override if there is a CID present in the security_phrase field. Default is N. When set to AREACODE you have the ability to go into the AC-CID submenu and define multiple callerids to be used per areacode. For MANUAL and INBOUND_MAN dial methods only, and agent manual dial calls in other dial methods, you can use one of the USER_CUSTOM selections to take a CallerID number put into one of the User Custom fields in the User Modify admin screen and use that for outbound manual dial calls placed by an agent. For more information on CallerID priority, see below.<BR>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CID Group Override <BR>2 - List CallerID Override <BR>3 - CID Group entry(CID Group Failover) <BR>4 - AC-CID AREACODE entry <BR>5 - Custom CallerID, Security Phrase <BR>6 - USER_CUSTOM CallerID <BR>7 - Campaign CID <BR></QXZ>
|
||||
campaigns-cid_group_id CID Group <QXZ>If set to something other than ---DISABLED---, the selected CID Group will override all other campaign CID settings above and will use the state or areacode based CIDs that are defined in the CID Group. Default is ---DISABLED---. For more information on CallerID priority, see the CALLERID PRIORITY entry below.<BR>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CID Group Override <BR>2 - List CallerID Override <BR>3 - CID Group entry(CID Group Failover) <BR>4 - AC-CID AREACODE entry <BR>5 - Custom CallerID, Security Phrase <BR>6 - USER_CUSTOM CallerID <BR>7 - Campaign CID <BR></QXZ>
|
||||
campaigns-cid_group_id_two CID Group Failover <QXZ>If set to something other than ---DISABLED---, the selected CID Group will be used if the main CID Group set above does not have a matching areacode or state entry for the phone number being called. Default is ---DISABLED---. For more information on CallerID priority, see the CALLERID PRIORITY entry below.<BR>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CID Group Override <BR>2 - List CallerID Override <BR>3 - CID Group entry(CID Group Failover) <BR>4 - AC-CID AREACODE entry <BR>5 - Custom CallerID, Security Phrase <BR>6 - USER_CUSTOM CallerID <BR>7 - Campaign CID <BR></QXZ>
|
||||
campaigns-cid_priority CALLERID PRIORITY <QXZ>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CID Group Override <BR>2 - List CallerID Override <BR>3 - CID Group entry(CID Group Failover) <BR>4 - AC-CID AREACODE entry <BR>5 - Custom CallerID, Security Phrase <BR>6 - USER_CUSTOM CallerID <BR>7 - Campaign CID <BR></QXZ>
|
||||
campaigns-opensips_cid_name Campaign CID Name <QXZ>If your system is set up to send CallerID Name, you can define it here for all outbound calls placed through this campaign. Default is blank for disabled.</QXZ>
|
||||
campaigns-campaign_rec_exten Campaign Rec extension <QXZ>This field allows for a custom recording extension to be used with the system. This allows you to use different extensions depending upon how long you want to allow a maximum recording and what type of codec you want to record in. The default exten is 8309 which if you follow the SCRATCH_INSTALL examples will record in the WAV format for up to one hour. Another option included in the examples is 8310 which will record in GSM format for up to one hour. The recording time can be lengthened by raising the setting in the Server Modification screen in the Admin section.</QXZ>
|
||||
campaigns-campaign_recording Campaign Recording <QXZ>This menu allows you to choose what level of recording is allowed on this campaign. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and reduce system load.</QXZ>
|
||||
@@ -432,6 +432,7 @@ lists-inbound_list_script_override Inbound Script Override <QXZ>If this field is
|
||||
lists-inbound_drop_voicemail Inbound Drop Voicemail Override <QXZ>If an inbound call associated with this list drops while in an Inbound Group queue, this is the voicemail box the call will be sent to if the Drop Action is set to go to a voicemail box.</QXZ>
|
||||
lists-inbound_after_hours_voicemail Inbound After Hours Voicemail Override <QXZ>If an inbound call associated with this list triggers an after hours action after it has been sent to an Inbound Group queue, this is the voicemail box the call will be sent to if the After Hours Action is set to go to a voicemail box.</QXZ>
|
||||
lists-campaign_cid_override Campaign CID Override <QXZ>If this field is set, this will override the campaign CallerID that is set for calls that are placed to leads in this list. Default is not set.</QXZ>
|
||||
lists-cid_group_id Campaign CID Group Override <QXZ>If this option is set to a valid CID Group in the system, this will override all campaign CallerID Number settings for calls placed to leads within this list. Default is ---DISABLED---.</QXZ>
|
||||
lists-am_message_exten_override Answering Machine Message Override <QXZ>If this field is set, this will override the Answering Machine Message set in the campaign for customers in this list. Default is not set.</QXZ>
|
||||
lists-drop_inbound_group_override Drop Inbound Group Override <QXZ>If this field is set, this in-group will be used for outbound calls within this list that drop from the outbound campaign instead of the drop in-group set in the campaign detail screen. Default is not set.</QXZ>
|
||||
lists-status_group_id Status Group Override <QXZ>If this field is set, this Status Group will be used instead of the campaign statuses for calls handled by agents from this list. This does not affect System Statuses which will always be shown. Statuses defined within this status group will not be available with Campaign HotKeys unless they are defined in Campaign Statuses. Default is not set.</QXZ>
|
||||
|
||||
@@ -193,10 +193,11 @@
|
||||
# 220223-0838 - Added allow_web_debug system setting
|
||||
# 220307-0937 - Added 'update_presets' function
|
||||
# 220310-0825 - Added DELETE action to the 'update_presets' function
|
||||
# 220312-0944 - Added vicidial_dial_cid_log logging
|
||||
#
|
||||
|
||||
$version = '2.14-170';
|
||||
$build = '220310-0825';
|
||||
$version = '2.14-171';
|
||||
$build = '220312-0944';
|
||||
$php_script='non_agent_api.php';
|
||||
$api_url_log = 0;
|
||||
|
||||
@@ -2996,6 +2997,11 @@ if ($function == 'blind_monitor')
|
||||
$stmt = "INSERT INTO vicidial_dial_log SET caller_code='$BMquery',lead_id='0',server_ip='$monitor_server_ip',call_date='$NOW_TIME',extension='$dialplan_number',channel='Local/$monitor_dialstring$stage$session_id@default',timeout='0',outbound_cid='\"$BMquery\" <$outbound_cid>',context='default';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
### log outbound call in the dial cid log
|
||||
$stmt = "INSERT INTO vicidial_dial_cid_log SET caller_code='$BMquery',call_date='$NOW_TIME',call_type='MANUAL',call_alt='MAIN', outbound_cid='$outbound_cid',outbound_cid_type='MONITOR_AGENT';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
$stmt = "INSERT INTO vicidial_rt_monitor_log SET manager_user='$user',manager_server_ip='$monitor_server_ip',manager_phone='$phone_login',manager_ip='$ip',agent_user='$AGENTuser',agent_server_ip='$server_ip',agent_status='$AGENTstatus',agent_session='$session_id',lead_id='$AGENTlead_id',campaign_id='$AGENTcampaign',caller_code='$BMquery',monitor_start_time=NOW(),monitor_type='$monitor_type';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
# 141229-2008 - Added code for on-the-fly language translations display
|
||||
# 170409-1533 - Added IP List validation code
|
||||
# 220223-0820 - Added allow_web_debug system setting
|
||||
# 220312-0942 - Added vicidial_dial_cid_log logging
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -189,6 +190,11 @@ else
|
||||
$stmt = "INSERT INTO vicidial_dial_log SET caller_code='TESTCIDCALL098765432',lead_id='0',server_ip='$server_ip',call_date='$NOW_TIME',extension='91$receiver',channel='Local/91$sender$Local_end',timeout='$Local_dial_timeout',outbound_cid='\"$cid_number\" <$cid_number>',context='default';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
### log outbound call in the dial cid log
|
||||
$stmt = "INSERT INTO vicidial_dial_cid_log SET caller_code='TESTCIDCALL098765432',call_date='$NOW_TIME',call_type='MANUAL',call_alt='MAIN', outbound_cid='$cid_number',outbound_cid_type='SEND_CID_CALL_PAGE';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
### LOG INSERTION Admin Log Table ###
|
||||
$SQL_log = "$stmt|";
|
||||
$SQL_log = preg_replace('/;/', '', $SQL_log);
|
||||
|
||||
Reference in New Issue
Block a user