Added list expiration date feature
Added Other Campaign DNC List campaign option git-svn-id: svn://192.168.202.10@1881 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -122,6 +122,10 @@ OTHER CHANGES:
|
|||||||
|
|
||||||
27. Added inbound call time holiday functions.
|
27. Added inbound call time holiday functions.
|
||||||
|
|
||||||
|
28. Added list expiration date feature
|
||||||
|
|
||||||
|
29. Added Other Campaign DNC List campaign option
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -97,12 +97,13 @@
|
|||||||
# 120621-0726 - Changed survey opt-in non-agent qm logging to log connection to VDAD agent
|
# 120621-0726 - Changed survey opt-in non-agent qm logging to log connection to VDAD agent
|
||||||
# 121009-1458 - Changed survey method HANGUP to not wait for digits, added LRERR Local channel logging
|
# 121009-1458 - Changed survey method HANGUP to not wait for digits, added LRERR Local channel logging
|
||||||
# 121120-0922 - Added QM socket-send functionality
|
# 121120-0922 - Added QM socket-send functionality
|
||||||
|
# 121125-0035 - Added Other Campaign DNC option
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'agi-VDAD_ALL_outbound.agi';
|
$script = 'agi-VDAD_ALL_outbound.agi';
|
||||||
$AGILOG = '0';
|
$AGILOG = '0';
|
||||||
$mel=1; # Mysql Error Log enabled = 1
|
$mel=1; # Mysql Error Log enabled = 1
|
||||||
$mysql_log_count=105;
|
$mysql_log_count=108;
|
||||||
$one_mysql_log=0;
|
$one_mysql_log=0;
|
||||||
|
|
||||||
|
|
||||||
@@ -607,7 +608,7 @@ if ($VDACaffected_rows > 0)
|
|||||||
##### END - Max call stats
|
##### END - Max call stats
|
||||||
|
|
||||||
### Grab campaign values from the database
|
### Grab campaign values from the database
|
||||||
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc,cpd_amd_action,am_message_exten,three_way_call_cid,campaign_cid,survey_first_audio_file,survey_opt_in_audio_file,survey_ni_audio_file,survey_third_audio_file,survey_fourth_audio_file,extension_appended_cidname,queue_priority,closer_campaigns,queuemetrics_phone_environment,campaign_recording,campaign_rec_filename,safe_harbor_audio,safe_harbor_menu_id,survey_recording,safe_harbor_audio_field FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
|
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc,cpd_amd_action,am_message_exten,three_way_call_cid,campaign_cid,survey_first_audio_file,survey_opt_in_audio_file,survey_ni_audio_file,survey_third_audio_file,survey_fourth_audio_file,extension_appended_cidname,queue_priority,closer_campaigns,queuemetrics_phone_environment,campaign_recording,campaign_rec_filename,safe_harbor_audio,safe_harbor_menu_id,survey_recording,safe_harbor_audio_field,use_other_campaign_dnc FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
$sthArows=$sthA->rows;
|
$sthArows=$sthA->rows;
|
||||||
@@ -646,6 +647,7 @@ if ($VDACaffected_rows > 0)
|
|||||||
$safe_harbor_menu_id = $aryA[25];
|
$safe_harbor_menu_id = $aryA[25];
|
||||||
$survey_recording = $aryA[26];
|
$survey_recording = $aryA[26];
|
||||||
$safe_harbor_audio_field = $aryA[27];
|
$safe_harbor_audio_field = $aryA[27];
|
||||||
|
$use_other_campaign_dnc = $aryA[28];
|
||||||
if (length($closer_campaigns) > 2)
|
if (length($closer_campaigns) > 2)
|
||||||
{
|
{
|
||||||
$closer_campaigns =~ s/^ | -$//gi;
|
$closer_campaigns =~ s/^ | -$//gi;
|
||||||
@@ -1255,7 +1257,7 @@ if ($call_handle_method =~ /SURVEY/)
|
|||||||
&agi_output;
|
&agi_output;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($use_internal_dnc =~ /Y/) && ($survey_ni_status eq "DNC"))
|
if (($use_internal_dnc =~ /Y|AREACODE/) && ($survey_ni_status eq "DNC"))
|
||||||
{
|
{
|
||||||
$stmtA = "INSERT INTO vicidial_dnc set phone_number='$VDADphone';";
|
$stmtA = "INSERT INTO vicidial_dnc set phone_number='$VDADphone';";
|
||||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||||
@@ -1267,15 +1269,30 @@ if ($call_handle_method =~ /SURVEY/)
|
|||||||
&agi_output;
|
&agi_output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (($use_campaign_dnc =~ /Y/) && ($survey_ni_status eq "DNC"))
|
if (($use_campaign_dnc =~ /Y|AREACODE/) && ($survey_ni_status eq "DNC"))
|
||||||
{
|
{
|
||||||
$stmtA = "INSERT INTO vicidial_campaign_dnc set phone_number='$VDADphone', campaign_id='$VDADcampaign';";
|
$stmtA = "SELECT use_other_campaign_dnc FROM vicidial_campaigns where campaign_id='$VDADcampaign';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01106'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$use_other_campaign_dnc = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
$temp_campaign_id = $VDADcampaign;
|
||||||
|
if (length($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
|
||||||
|
|
||||||
|
$stmtA = "INSERT INTO vicidial_campaign_dnc set phone_number='$VDADphone', campaign_id='$temp_campaign_id';";
|
||||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
$affected_rows = $dbhA->do($stmtA);
|
||||||
$dbhP=$dbhA; $mysql_count='01021'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
$dbhP=$dbhA; $mysql_count='01021'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||||
if ($AGILOG)
|
if ($AGILOG)
|
||||||
{
|
{
|
||||||
$agi_string = "-- VDAD vicidial_campaign_dnc insert: $affected_rows|$VDADphone|$VDADcampaign";
|
$agi_string = "-- VDAD vicidial_campaign_dnc insert: $affected_rows|$VDADphone|$VDADcampaign|$temp_campaign_id";
|
||||||
&agi_output;
|
&agi_output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1340,7 +1357,7 @@ if ($call_handle_method =~ /SURVEY/)
|
|||||||
&agi_output;
|
&agi_output;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($use_internal_dnc =~ /Y/) && ($survey_third_status eq "DNC"))
|
if (($use_internal_dnc =~ /Y|AREACODE/) && ($survey_third_status eq "DNC"))
|
||||||
{
|
{
|
||||||
$stmtA = "INSERT INTO vicidial_dnc set phone_number='$VDADphone';";
|
$stmtA = "INSERT INTO vicidial_dnc set phone_number='$VDADphone';";
|
||||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||||
@@ -1352,15 +1369,30 @@ if ($call_handle_method =~ /SURVEY/)
|
|||||||
&agi_output;
|
&agi_output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (($use_campaign_dnc =~ /Y/) && ($survey_third_status eq "DNC"))
|
if (($use_campaign_dnc =~ /Y|AREACODE/) && ($survey_third_status eq "DNC"))
|
||||||
{
|
{
|
||||||
$stmtA = "INSERT INTO vicidial_campaign_dnc set phone_number='$VDADphone', campaign_id='$VDADcampaign';";
|
$stmtA = "SELECT use_other_campaign_dnc FROM vicidial_campaigns where campaign_id='$VDADcampaign';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01107'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$use_other_campaign_dnc = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
$temp_campaign_id = $VDADcampaign;
|
||||||
|
if (length($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
|
||||||
|
|
||||||
|
$stmtA = "INSERT INTO vicidial_campaign_dnc set phone_number='$VDADphone', campaign_id='$temp_campaign_id';";
|
||||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
$affected_rows = $dbhA->do($stmtA);
|
||||||
$dbhP=$dbhA; $mysql_count='01021'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
$dbhP=$dbhA; $mysql_count='01021'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||||
if ($AGILOG)
|
if ($AGILOG)
|
||||||
{
|
{
|
||||||
$agi_string = "-- VDAD vicidial_campaign_dnc insert: $affected_rows|$VDADphone|$VDADcampaign";
|
$agi_string = "-- VDAD vicidial_campaign_dnc insert: $affected_rows|$VDADphone|$VDADcampaign|$temp_campaign_id";
|
||||||
&agi_output;
|
&agi_output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1437,7 +1469,7 @@ if ($call_handle_method =~ /SURVEY/)
|
|||||||
&agi_output;
|
&agi_output;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($use_internal_dnc =~ /Y/) && ($survey_fourth_status eq "DNC"))
|
if (($use_internal_dnc =~ /Y|AREACODE/) && ($survey_fourth_status eq "DNC"))
|
||||||
{
|
{
|
||||||
$stmtA = "INSERT INTO vicidial_dnc set phone_number='$VDADphone';";
|
$stmtA = "INSERT INTO vicidial_dnc set phone_number='$VDADphone';";
|
||||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||||
@@ -1449,15 +1481,30 @@ if ($call_handle_method =~ /SURVEY/)
|
|||||||
&agi_output;
|
&agi_output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (($use_campaign_dnc =~ /Y/) && ($survey_fourth_status eq "DNC"))
|
if (($use_campaign_dnc =~ /Y|AREACODE/) && ($survey_fourth_status eq "DNC"))
|
||||||
{
|
{
|
||||||
$stmtA = "INSERT INTO vicidial_campaign_dnc set phone_number='$VDADphone', campaign_id='$VDADcampaign';";
|
$stmtA = "SELECT use_other_campaign_dnc FROM vicidial_campaigns where campaign_id='$VDADcampaign';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01108'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$use_other_campaign_dnc = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
$temp_campaign_id = $VDADcampaign;
|
||||||
|
if (length($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
|
||||||
|
|
||||||
|
$stmtA = "INSERT INTO vicidial_campaign_dnc set phone_number='$VDADphone', campaign_id='$temp_campaign_id';";
|
||||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
$affected_rows = $dbhA->do($stmtA);
|
||||||
$dbhP=$dbhA; $mysql_count='01021'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
$dbhP=$dbhA; $mysql_count='01021'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||||
if ($AGILOG)
|
if ($AGILOG)
|
||||||
{
|
{
|
||||||
$agi_string = "-- VDAD vicidial_campaign_dnc insert: $affected_rows|$VDADphone|$VDADcampaign";
|
$agi_string = "-- VDAD vicidial_campaign_dnc insert: $affected_rows|$VDADphone|$VDADcampaign|$temp_campaign_id";
|
||||||
&agi_output;
|
&agi_output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-7
@@ -109,6 +109,7 @@
|
|||||||
# 110922-1202 - Added logging of last calltime to campaign
|
# 110922-1202 - Added logging of last calltime to campaign
|
||||||
# 120403-1839 - Changed auto-alt-dial multi-lead processing to use server max recording time value for time
|
# 120403-1839 - Changed auto-alt-dial multi-lead processing to use server max recording time value for time
|
||||||
# 120831-1503 - Added vicidial_dial_log outbound call logging
|
# 120831-1503 - Added vicidial_dial_log outbound call logging
|
||||||
|
# 121124-2249 - Added Other Campaign DNC option
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@@ -1653,7 +1654,7 @@ while($one_day_interval > 0)
|
|||||||
### check to see if campaign has alt_dial enabled
|
### check to see if campaign has alt_dial enabled
|
||||||
$VD_auto_alt_dial = 'NONE';
|
$VD_auto_alt_dial = 'NONE';
|
||||||
$VD_auto_alt_dial_statuses='';
|
$VD_auto_alt_dial_statuses='';
|
||||||
$stmtA="SELECT auto_alt_dial,auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc FROM vicidial_campaigns where campaign_id='$CLcampaign_id';";
|
$stmtA="SELECT auto_alt_dial,auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc FROM vicidial_campaigns where campaign_id='$CLcampaign_id';";
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
$sthArows=$sthA->rows;
|
$sthArows=$sthA->rows;
|
||||||
@@ -1664,6 +1665,7 @@ while($one_day_interval > 0)
|
|||||||
$VD_auto_alt_dial_statuses = $aryA[1];
|
$VD_auto_alt_dial_statuses = $aryA[1];
|
||||||
$VD_use_internal_dnc = $aryA[2];
|
$VD_use_internal_dnc = $aryA[2];
|
||||||
$VD_use_campaign_dnc = $aryA[3];
|
$VD_use_campaign_dnc = $aryA[3];
|
||||||
|
$VD_use_other_campaign_dnc = $aryA[4];
|
||||||
}
|
}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
$event_string = "|$stmtA|$VD_auto_alt_dial|$VD_auto_alt_dial_statuses|$CLnew_status|$CLlead_id|$CLalt_dial"; &event_logger;
|
$event_string = "|$stmtA|$VD_auto_alt_dial|$VD_auto_alt_dial_statuses|$CLnew_status|$CLlead_id|$CLalt_dial"; &event_logger;
|
||||||
@@ -1714,14 +1716,16 @@ while($one_day_interval > 0)
|
|||||||
$event_string = "|$stmtA|$VD_alt_dnc_count|"; &event_logger;
|
$event_string = "|$stmtA|$VD_alt_dnc_count|"; &event_logger;
|
||||||
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
||||||
{
|
{
|
||||||
|
$temp_campaign_id = $CLcampaign_id;
|
||||||
|
if (length($VD_use_other_campaign_dnc) > 0) {$temp_campaign_id = $VD_use_other_campaign_dnc;}
|
||||||
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
||||||
{
|
{
|
||||||
$alt_areacode = substr($VD_alt_phone, 0, 3);
|
$alt_areacode = substr($VD_alt_phone, 0, 3);
|
||||||
$alt_areacode .= "XXXXXXX";
|
$alt_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_alt_phone','$alt_areacode') and campaign_id='$CLcampaign_id';";
|
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_alt_phone','$alt_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_alt_phone' and campaign_id='$CLcampaign_id';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_alt_phone' and campaign_id='$temp_campaign_id';";}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
$sthArows=$sthA->rows;
|
$sthArows=$sthA->rows;
|
||||||
@@ -1792,14 +1796,16 @@ while($one_day_interval > 0)
|
|||||||
$event_string = "|$stmtA|$VD_alt_dnc_count|"; &event_logger;
|
$event_string = "|$stmtA|$VD_alt_dnc_count|"; &event_logger;
|
||||||
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
||||||
{
|
{
|
||||||
|
$temp_campaign_id = $CLcampaign_id;
|
||||||
|
if (length($VD_use_other_campaign_dnc) > 0) {$temp_campaign_id = $VD_use_other_campaign_dnc;}
|
||||||
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
||||||
{
|
{
|
||||||
$addr3_areacode = substr($VD_address3, 0, 3);
|
$addr3_areacode = substr($VD_address3, 0, 3);
|
||||||
$addr3_areacode .= "XXXXXXX";
|
$addr3_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_address3','$addr3_areacode') and campaign_id='$CLcampaign_id';";
|
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_address3','$addr3_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_address3' and campaign_id='$CLcampaign_id';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_address3' and campaign_id='$temp_campaign_id';";}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
$sthArows=$sthA->rows;
|
$sthArows=$sthA->rows;
|
||||||
@@ -1907,14 +1913,16 @@ while($one_day_interval > 0)
|
|||||||
else {$VD_alt_dnc_count=0;}
|
else {$VD_alt_dnc_count=0;}
|
||||||
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
||||||
{
|
{
|
||||||
|
$temp_campaign_id = $CLcampaign_id;
|
||||||
|
if (length($VD_use_other_campaign_dnc) > 0) {$temp_campaign_id = $VD_use_other_campaign_dnc;}
|
||||||
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
||||||
{
|
{
|
||||||
$ad_areacode = substr($VD_altdial_phone, 0, 3);
|
$ad_areacode = substr($VD_altdial_phone, 0, 3);
|
||||||
$ad_areacode .= "XXXXXXX";
|
$ad_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_altdial_phone','$ad_areacode') and campaign_id='$CLcampaign_id';";
|
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_altdial_phone','$ad_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_altdial_phone' and campaign_id='$CLcampaign_id';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_altdial_phone' and campaign_id='$temp_campaign_id';";}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
$sthArows=$sthA->rows;
|
$sthArows=$sthA->rows;
|
||||||
|
|||||||
+28
-16
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
#
|
||||||
# AST_VDhopper.pl version 2.4
|
# AST_VDhopper.pl version 2.6
|
||||||
#
|
#
|
||||||
# DESCRIPTION:
|
# DESCRIPTION:
|
||||||
# Updates the VICIDIAL leads hopper for the streamlined
|
# Updates the VICIDIAL leads hopper for the streamlined
|
||||||
@@ -71,6 +71,7 @@
|
|||||||
# 120109-1510 - Fixed list mix bug
|
# 120109-1510 - Fixed list mix bug
|
||||||
# 120210-1735 - Added vendor_lead_code duplication check per campaign option
|
# 120210-1735 - Added vendor_lead_code duplication check per campaign option
|
||||||
# 120402-2211 - Fixed call count limit bug
|
# 120402-2211 - Fixed call count limit bug
|
||||||
|
# 121124-2052 - Added List Expiration Date and Other Campaign DNC options
|
||||||
#
|
#
|
||||||
|
|
||||||
# constants
|
# constants
|
||||||
@@ -335,7 +336,7 @@ if ($wipe_hopper_clean)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
### Delete leads from inactive lists if there are any
|
### Delete leads from inactive lists if there are any
|
||||||
$stmtA = "SELECT list_id FROM vicidial_lists where active='N';";
|
$stmtA = "SELECT list_id FROM vicidial_lists where ( (active='N') or ( (active='Y') and (expiration_date < \"$file_date\") ) );";
|
||||||
if ($DB) {print $stmtA;}
|
if ($DB) {print $stmtA;}
|
||||||
$inactive_lists='';
|
$inactive_lists='';
|
||||||
$inactive_lists_count=0;
|
$inactive_lists_count=0;
|
||||||
@@ -359,7 +360,7 @@ if ($inactive_lists_count > 0)
|
|||||||
{
|
{
|
||||||
$stmtA = "DELETE from $vicidial_hopper where list_id IN($inactive_lists);";
|
$stmtA = "DELETE from $vicidial_hopper where list_id IN($inactive_lists);";
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
$affected_rows = $dbhA->do($stmtA);
|
||||||
if ($DB) {print "Inactive List Leads Deleted: $affected_rows |$stmtA|\n";}
|
if ($DB) {print "Inactive and Expired List Leads Deleted: $affected_rows |$stmtA|\n";}
|
||||||
$event_string = "|INACTIVE LIST DEL|$affected_rows|";
|
$event_string = "|INACTIVE LIST DEL|$affected_rows|";
|
||||||
&event_logger;
|
&event_logger;
|
||||||
}
|
}
|
||||||
@@ -483,20 +484,22 @@ if ($hopper_dnc_count > 0)
|
|||||||
$VD_auto_alt_dial='';
|
$VD_auto_alt_dial='';
|
||||||
$VD_use_internal_dnc='';
|
$VD_use_internal_dnc='';
|
||||||
$VD_use_campaign_dnc='';
|
$VD_use_campaign_dnc='';
|
||||||
|
$VD_use_other_campaign_dnc='';
|
||||||
$VD_alt_dial = $AAD_alt_dial[$aad];
|
$VD_alt_dial = $AAD_alt_dial[$aad];
|
||||||
$VD_campaign_id = $AAD_campaign_id[$aad];
|
$VD_campaign_id = $AAD_campaign_id[$aad];
|
||||||
$VD_lead_id = $AAD_lead_id[$aad];
|
$VD_lead_id = $AAD_lead_id[$aad];
|
||||||
### look up auto-alt-dial settings for campaign
|
### look up auto-alt-dial settings for campaign
|
||||||
$stmtA = "SELECT auto_alt_dial,use_internal_dnc,use_campaign_dnc FROM vicidial_campaigns where campaign_id='$AAD_campaign_id[$aad]';";
|
$stmtA = "SELECT auto_alt_dial,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc FROM vicidial_campaigns where campaign_id='$AAD_campaign_id[$aad]';";
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
$sthArows=$sthA->rows;
|
$sthArows=$sthA->rows;
|
||||||
if ($sthArows > 0)
|
if ($sthArows > 0)
|
||||||
{
|
{
|
||||||
@aryA = $sthA->fetchrow_array;
|
@aryA = $sthA->fetchrow_array;
|
||||||
$VD_auto_alt_dial = $aryA[0];
|
$VD_auto_alt_dial = $aryA[0];
|
||||||
$VD_use_internal_dnc = $aryA[1];
|
$VD_use_internal_dnc = $aryA[1];
|
||||||
$VD_use_campaign_dnc = $aryA[2];
|
$VD_use_campaign_dnc = $aryA[2];
|
||||||
|
$VD_use_other_campaign_dnc = $aryA[3];
|
||||||
}
|
}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
|
|
||||||
@@ -548,14 +551,16 @@ if ($hopper_dnc_count > 0)
|
|||||||
else {$VD_alt_dnc_count=0;}
|
else {$VD_alt_dnc_count=0;}
|
||||||
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
||||||
{
|
{
|
||||||
|
$temp_VD_campaign_id = $VD_campaign_id;
|
||||||
|
if (length($VD_use_other_campaign_dnc) > 0) {$temp_VD_campaign_id = $VD_use_other_campaign_dnc;}
|
||||||
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
||||||
{
|
{
|
||||||
$alt_areacode = substr($VD_alt_phone, 0, 3);
|
$alt_areacode = substr($VD_alt_phone, 0, 3);
|
||||||
$alt_areacode .= "XXXXXXX";
|
$alt_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_alt_phone','$alt_areacode') and campaign_id='$VD_campaign_id';";
|
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_alt_phone','$alt_areacode') and campaign_id='$temp_VD_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_alt_phone' and campaign_id='$VD_campaign_id';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_alt_phone' and campaign_id='$temp_VD_campaign_id';";}
|
||||||
if ($DB) {$event_string = "|$stmtA|"; &event_logger;}
|
if ($DB) {$event_string = "|$stmtA|"; &event_logger;}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
@@ -626,14 +631,16 @@ if ($hopper_dnc_count > 0)
|
|||||||
else {$VD_alt_dnc_count=0;}
|
else {$VD_alt_dnc_count=0;}
|
||||||
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
||||||
{
|
{
|
||||||
|
$temp_VD_campaign_id = $VD_campaign_id;
|
||||||
|
if (length($VD_use_other_campaign_dnc) > 0) {$temp_VD_campaign_id = $VD_use_other_campaign_dnc;}
|
||||||
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
||||||
{
|
{
|
||||||
$addr3_areacode = substr($VD_address3, 0, 3);
|
$addr3_areacode = substr($VD_address3, 0, 3);
|
||||||
$addr3_areacode .= "XXXXXXX";
|
$addr3_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_address3','$addr3_areacode') and campaign_id='$VD_campaign_id';";
|
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_address3','$addr3_areacode') and campaign_id='$temp_VD_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_address3' and campaign_id='$VD_campaign_id';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_address3' and campaign_id='$temp_VD_campaign_id';";}
|
||||||
if ($DB) {$event_string = "|$stmtA|"; &event_logger;}
|
if ($DB) {$event_string = "|$stmtA|"; &event_logger;}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
@@ -746,14 +753,16 @@ if ($hopper_dnc_count > 0)
|
|||||||
else {$VD_alt_dnc_count=0;}
|
else {$VD_alt_dnc_count=0;}
|
||||||
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
||||||
{
|
{
|
||||||
|
$temp_VD_campaign_id = $VD_campaign_id;
|
||||||
|
if (length($VD_use_other_campaign_dnc) > 0) {$temp_VD_campaign_id = $VD_use_other_campaign_dnc;}
|
||||||
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
||||||
{
|
{
|
||||||
$ad_areacode = substr($VD_altdial_phone, 0, 3);
|
$ad_areacode = substr($VD_altdial_phone, 0, 3);
|
||||||
$ad_areacode .= "XXXXXXX";
|
$ad_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_altdial_phone','$ad_areacode') and campaign_id='$VD_campaign_id';";
|
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_altdial_phone','$ad_areacode') and campaign_id='$temp_VD_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_altdial_phone' and campaign_id='$VD_campaign_id';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_altdial_phone' and campaign_id='$temp_VD_campaign_id';";}
|
||||||
if ($DB) {$event_string = "|$stmtA|"; &event_logger;}
|
if ($DB) {$event_string = "|$stmtA|"; &event_logger;}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
@@ -847,6 +856,7 @@ while ($sthArows > $rec_count)
|
|||||||
$lead_order_secondary[$rec_count] = $aryA[22];
|
$lead_order_secondary[$rec_count] = $aryA[22];
|
||||||
$call_count_limit[$rec_count] = $aryA[23];
|
$call_count_limit[$rec_count] = $aryA[23];
|
||||||
$hopper_vlc_dup_check[$rec_count] = $aryA[24];
|
$hopper_vlc_dup_check[$rec_count] = $aryA[24];
|
||||||
|
$use_other_campaign_dnc[$rec_count] = $aryA[25];
|
||||||
|
|
||||||
if ($hopper_vlc_dup_check[$rec_count] =~ /Y/)
|
if ($hopper_vlc_dup_check[$rec_count] =~ /Y/)
|
||||||
{$ANY_hopper_vlc_dup_check = 'Y';}
|
{$ANY_hopper_vlc_dup_check = 'Y';}
|
||||||
@@ -1696,7 +1706,7 @@ foreach(@campaign_id)
|
|||||||
{$active_listSQL = '';}
|
{$active_listSQL = '';}
|
||||||
|
|
||||||
### Get list of the lists in the campaign ###
|
### Get list of the lists in the campaign ###
|
||||||
$stmtA = "SELECT list_id FROM vicidial_lists where campaign_id='$campaign_id[$i]' $active_listSQL;";
|
$stmtA = "SELECT list_id FROM vicidial_lists where campaign_id='$campaign_id[$i]' and expiration_date >= \"$file_date\" $active_listSQL;";
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
$sthArows=$sthA->rows;
|
$sthArows=$sthA->rows;
|
||||||
@@ -2311,14 +2321,16 @@ foreach(@campaign_id)
|
|||||||
}
|
}
|
||||||
if ( ( ($use_campaign_dnc[$i] =~ /Y/) || ($use_campaign_dnc[$i] =~ /AREACODE/) ) && ($DNClead == '0') )
|
if ( ( ($use_campaign_dnc[$i] =~ /Y/) || ($use_campaign_dnc[$i] =~ /AREACODE/) ) && ($DNClead == '0') )
|
||||||
{
|
{
|
||||||
|
$temp_campaign_id = $campaign_id[$i];
|
||||||
|
if (length($use_other_campaign_dnc[$i]) > 0) {$temp_campaign_id = $use_other_campaign_dnc[$i];}
|
||||||
if ($use_campaign_dnc[$i] =~ /AREACODE/)
|
if ($use_campaign_dnc[$i] =~ /AREACODE/)
|
||||||
{
|
{
|
||||||
$pth_areacode = substr($phone_to_hopper[$h], 0, 3);
|
$pth_areacode = substr($phone_to_hopper[$h], 0, 3);
|
||||||
$pth_areacode .= "XXXXXXX";
|
$pth_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$phone_to_hopper[$h]','$pth_areacode') and campaign_id='$campaign_id[$i]';";
|
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$phone_to_hopper[$h]','$pth_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$phone_to_hopper[$h]' and campaign_id='$campaign_id[$i]';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$phone_to_hopper[$h]' and campaign_id='$temp_campaign_id';";}
|
||||||
if ($DB) {print "Doing CAMP DNC Check: $phone_to_hopper[$h] - $use_campaign_dnc[$i]\n";}
|
if ($DB) {print "Doing CAMP DNC Check: $phone_to_hopper[$h] - $use_campaign_dnc[$i]\n";}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
|||||||
+15
-7
@@ -62,6 +62,7 @@
|
|||||||
# 110304-0005 - Small changes for CPD and on-hook agent features
|
# 110304-0005 - Small changes for CPD and on-hook agent features
|
||||||
# 110324-2336 - Changes to CPD logging of calls and addition of the PDROP status
|
# 110324-2336 - Changes to CPD logging of calls and addition of the PDROP status
|
||||||
# 121120-0922 - Added QM socket-send functionality
|
# 121120-0922 - Added QM socket-send functionality
|
||||||
|
# 121124-2303 - Added Other Campaign DNC option
|
||||||
#
|
#
|
||||||
|
|
||||||
# defaults for PreFork
|
# defaults for PreFork
|
||||||
@@ -1322,7 +1323,7 @@ sub process_request
|
|||||||
### check to see if campaign has alt_dial enabled
|
### check to see if campaign has alt_dial enabled
|
||||||
$VD_auto_alt_dial = 'NONE';
|
$VD_auto_alt_dial = 'NONE';
|
||||||
$VD_auto_alt_dial_statuses='';
|
$VD_auto_alt_dial_statuses='';
|
||||||
$stmtA="SELECT auto_alt_dial,auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc FROM vicidial_campaigns where campaign_id='$VD_campaign_id';";
|
$stmtA="SELECT auto_alt_dial,auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc FROM vicidial_campaigns where campaign_id='$VD_campaign_id';";
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
@@ -1335,6 +1336,7 @@ sub process_request
|
|||||||
$VD_auto_alt_dial_statuses = $aryA[1];
|
$VD_auto_alt_dial_statuses = $aryA[1];
|
||||||
$VD_use_internal_dnc = $aryA[2];
|
$VD_use_internal_dnc = $aryA[2];
|
||||||
$VD_use_campaign_dnc = $aryA[3];
|
$VD_use_campaign_dnc = $aryA[3];
|
||||||
|
$VD_use_other_campaign_dnc = $aryA[4];
|
||||||
$epc_countCAMPDATA++;
|
$epc_countCAMPDATA++;
|
||||||
}
|
}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
@@ -1387,14 +1389,16 @@ sub process_request
|
|||||||
else {$VD_alt_dnc_count=0;}
|
else {$VD_alt_dnc_count=0;}
|
||||||
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
||||||
{
|
{
|
||||||
|
$temp_campaign_id = $VD_campaign_id;
|
||||||
|
if (length($VD_use_other_campaign_dnc) > 0) {$temp_campaign_id = $VD_use_other_campaign_dnc;}
|
||||||
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
||||||
{
|
{
|
||||||
$alt_areacode = substr($VD_alt_phone, 0, 3);
|
$alt_areacode = substr($VD_alt_phone, 0, 3);
|
||||||
$alt_areacode .= "XXXXXXX";
|
$alt_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_alt_phone','$alt_areacode') and campaign_id='$VD_campaign_id';";
|
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_alt_phone','$alt_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_alt_phone' and campaign_id='$VD_campaign_id';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_alt_phone' and campaign_id='$temp_campaign_id';";}
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
@@ -1467,14 +1471,16 @@ sub process_request
|
|||||||
else {$VD_alt_dnc_count=0;}
|
else {$VD_alt_dnc_count=0;}
|
||||||
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
||||||
{
|
{
|
||||||
|
$temp_campaign_id = $VD_campaign_id;
|
||||||
|
if (length($VD_use_other_campaign_dnc) > 0) {$temp_campaign_id = $VD_use_other_campaign_dnc;}
|
||||||
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
||||||
{
|
{
|
||||||
$addr3_areacode = substr($VD_address3, 0, 3);
|
$addr3_areacode = substr($VD_address3, 0, 3);
|
||||||
$addr3_areacode .= "XXXXXXX";
|
$addr3_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_address3','$alt_areacode') and campaign_id='$VD_campaign_id';";
|
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_address3','$alt_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_address3' and campaign_id='$VD_campaign_id';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_address3' and campaign_id='$temp_campaign_id';";}
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
@@ -1585,14 +1591,16 @@ sub process_request
|
|||||||
else {$VD_alt_dnc_count=0;}
|
else {$VD_alt_dnc_count=0;}
|
||||||
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
if ( ($VD_use_campaign_dnc =~ /Y/) || ($VD_use_campaign_dnc =~ /AREACODE/) )
|
||||||
{
|
{
|
||||||
|
$temp_campaign_id = $VD_campaign_id;
|
||||||
|
if (length($VD_use_other_campaign_dnc) > 0) {$temp_campaign_id = $VD_use_other_campaign_dnc;}
|
||||||
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
if ($VD_use_campaign_dnc =~ /AREACODE/)
|
||||||
{
|
{
|
||||||
$ap_areacode = substr($VD_altdial_phone, 0, 3);
|
$ap_areacode = substr($VD_altdial_phone, 0, 3);
|
||||||
$ap_areacode .= "XXXXXXX";
|
$ap_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_altdial_phone','$ap_areacode') and campaign_id='$VD_campaign_id';";
|
$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number IN('$VD_altdial_phone','$ap_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_altdial_phone' and campaign_id='$VD_campaign_id';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_altdial_phone' and campaign_id='$temp_campaign_id';";}
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2012-11-16
|
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2012-11-25
|
||||||
|
|
||||||
This document describes the functions of an API(Application Programming
|
This document describes the functions of an API(Application Programming
|
||||||
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
|
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
|
||||||
@@ -77,6 +77,7 @@ Changes:
|
|||||||
120912-2042 - Added user_group_status and in_group_status functions
|
120912-2042 - Added user_group_status and in_group_status functions
|
||||||
120913-1255 - Added update_log_entry function
|
120913-1255 - Added update_log_entry function
|
||||||
121116-1938 - Added state call time restrictions to add_lead hopper insert function
|
121116-1938 - Added state call time restrictions to add_lead hopper insert function
|
||||||
|
121125-2210 - Added Other Campaign DNC option and list expiration date option
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -924,6 +925,7 @@ drop_inbound_group - 1-10 characters, must be a valid in-group
|
|||||||
web_form_address - 6-100 characters
|
web_form_address - 6-100 characters
|
||||||
web_form_address_two - 6-100 characters
|
web_form_address_two - 6-100 characters
|
||||||
reset_time - 4-100 characters, must be in valid 4-digit groups of 24-hour time (i.e. 0900-1700-2359)
|
reset_time - 4-100 characters, must be in valid 4-digit groups of 24-hour time (i.e. 0900-1700-2359)
|
||||||
|
expiration_date - 10 characters, must be in valid date format YYYY-MM-DD (i.e. 2012-11-25)
|
||||||
|
|
||||||
|
|
||||||
Example URL strings for API calls:
|
Example URL strings for API calls:
|
||||||
@@ -938,6 +940,7 @@ ERROR: add_list LIST ALREADY EXISTS - 6666|1101
|
|||||||
ERROR: add_list SCRIPT DOES NOT EXIST, THIS IS AN OPTIONAL FIELD - 6666|TESTSCRIPT
|
ERROR: add_list SCRIPT DOES NOT EXIST, THIS IS AN OPTIONAL FIELD - 6666|TESTSCRIPT
|
||||||
ERROR: add_list IN-GROUP DOES NOT EXIST, THIS IS AN OPTIONAL FIELD - 6666|TEST_IN8
|
ERROR: add_list IN-GROUP DOES NOT EXIST, THIS IS AN OPTIONAL FIELD - 6666|TEST_IN8
|
||||||
ERROR: add_list RESET TIME IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
|
ERROR: add_list RESET TIME IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
|
||||||
|
ERROR: add_list EXPIRATION DATE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
|
||||||
SUCCESS: add_list LIST HAS BEEN ADDED - 6666|1101|TESTCAMP
|
SUCCESS: add_list LIST HAS BEEN ADDED - 6666|1101|TESTCAMP
|
||||||
|
|
||||||
|
|
||||||
@@ -971,6 +974,7 @@ drop_inbound_group - 1-10 characters, must be a valid in-group
|
|||||||
web_form_address - 6-100 characters
|
web_form_address - 6-100 characters
|
||||||
web_form_address_two - 6-100 characters
|
web_form_address_two - 6-100 characters
|
||||||
reset_time - 4-100 characters, must be in valid 4-digit groups of 24-hour time (i.e. 0900-1700-2359)
|
reset_time - 4-100 characters, must be in valid 4-digit groups of 24-hour time (i.e. 0900-1700-2359)
|
||||||
|
expiration_date - 10 characters, must be in valid date format YYYY-MM-DD (i.e. 2012-11-25)
|
||||||
NOTES:
|
NOTES:
|
||||||
- in order to set a field to empty('') set it equal to --BLANK--, i.e. "&drop_inbound_group=--BLANK--"
|
- in order to set a field to empty('') set it equal to --BLANK--, i.e. "&drop_inbound_group=--BLANK--"
|
||||||
- please use no special characters like apostrophes, quotes or amphersands
|
- please use no special characters like apostrophes, quotes or amphersands
|
||||||
@@ -997,6 +1001,7 @@ ERROR: update_list ACTIVE MUST BE Y OR N, THIS IS AN OPTIONAL FIELD - 6666|U
|
|||||||
ERROR: update_list OUTBOUND CID MUST BE FROM 6 TO 18 DIGITS, THIS IS AN OPTIONAL FIELD - 6666|12345
|
ERROR: update_list OUTBOUND CID MUST BE FROM 6 TO 18 DIGITS, THIS IS AN OPTIONAL FIELD - 6666|12345
|
||||||
ERROR: update_list ANSWERING MACHINE MESSAGE MUST LESS THAN 101 DIGITS, THIS IS AN OPTIONAL FIELD - 6666|123...
|
ERROR: update_list ANSWERING MACHINE MESSAGE MUST LESS THAN 101 DIGITS, THIS IS AN OPTIONAL FIELD - 6666|123...
|
||||||
ERROR: update_list RESET TIME IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
|
ERROR: update_list RESET TIME IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
|
||||||
|
ERROR: update_list EXPIRATION DATE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
|
||||||
NOTICE: update_list NO UPDATES DEFINED - 6666|
|
NOTICE: update_list NO UPDATES DEFINED - 6666|
|
||||||
SUCCESS: update_list LIST HAS BEEN UPDATED - 6666|1101
|
SUCCESS: update_list LIST HAS BEEN UPDATED - 6666|1101
|
||||||
NOTICE: update_list LEADS IN LIST HAVE BEEN RESET - 6666|1101|324
|
NOTICE: update_list LEADS IN LIST HAVE BEEN RESET - 6666|1101|324
|
||||||
|
|||||||
@@ -859,7 +859,8 @@ in_group_dial ENUM('DISABLED','MANUAL_DIAL','NO_DIAL','BOTH') default 'DISABLED'
|
|||||||
in_group_dial_select ENUM('AGENT_SELECTED','CAMPAIGN_SELECTED','ALL_USER_GROUP') default 'CAMPAIGN_SELECTED',
|
in_group_dial_select ENUM('AGENT_SELECTED','CAMPAIGN_SELECTED','ALL_USER_GROUP') default 'CAMPAIGN_SELECTED',
|
||||||
safe_harbor_audio_field VARCHAR(30) default 'DISABLED',
|
safe_harbor_audio_field VARCHAR(30) default 'DISABLED',
|
||||||
pause_after_next_call ENUM('ENABLED','DISABLED') default 'DISABLED',
|
pause_after_next_call ENUM('ENABLED','DISABLED') default 'DISABLED',
|
||||||
owner_populate ENUM('ENABLED','DISABLED') default 'DISABLED'
|
owner_populate ENUM('ENABLED','DISABLED') default 'DISABLED',
|
||||||
|
use_other_campaign_dnc VARCHAR(8) default ''
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE vicidial_lists (
|
CREATE TABLE vicidial_lists (
|
||||||
@@ -883,7 +884,8 @@ xferconf_e_number VARCHAR(50) default '',
|
|||||||
web_form_address TEXT,
|
web_form_address TEXT,
|
||||||
web_form_address_two TEXT,
|
web_form_address_two TEXT,
|
||||||
time_zone_setting ENUM('COUNTRY_AND_AREA_CODE','POSTAL_CODE','NANPA_PREFIX','OWNER_TIME_ZONE_CODE') default 'COUNTRY_AND_AREA_CODE',
|
time_zone_setting ENUM('COUNTRY_AND_AREA_CODE','POSTAL_CODE','NANPA_PREFIX','OWNER_TIME_ZONE_CODE') default 'COUNTRY_AND_AREA_CODE',
|
||||||
inventory_report ENUM('Y','N') default 'Y'
|
inventory_report ENUM('Y','N') default 'Y',
|
||||||
|
expiration_date DATE default '2099-12-31'
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE vicidial_statuses (
|
CREATE TABLE vicidial_statuses (
|
||||||
@@ -3000,4 +3002,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
|
|||||||
|
|
||||||
UPDATE system_settings set vdc_agent_api_active='1';
|
UPDATE system_settings set vdc_agent_api_active='1';
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1333',db_schema_update_date=NOW();
|
UPDATE system_settings SET db_schema_version='1334',db_schema_update_date=NOW();
|
||||||
|
|||||||
@@ -183,3 +183,9 @@ ALTER TABLE vicidial_call_times ADD ct_holidays TEXT default '';
|
|||||||
UPDATE vicidial_call_times SET ct_holidays='' where ct_holidays is NULL;
|
UPDATE vicidial_call_times SET ct_holidays='' where ct_holidays is NULL;
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1333',db_schema_update_date=NOW() where db_schema_version < 1333;
|
UPDATE system_settings SET db_schema_version='1333',db_schema_update_date=NOW() where db_schema_version < 1333;
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_lists ADD expiration_date DATE default '2099-12-31';
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_campaigns ADD use_other_campaign_dnc VARCHAR(8) default '';
|
||||||
|
|
||||||
|
UPDATE system_settings SET db_schema_version='1334',db_schema_update_date=NOW() where db_schema_version < 1334;
|
||||||
|
|||||||
@@ -72,6 +72,11 @@ Add inbound holiday rule||
|
|||||||
Holiday Rule Added||
|
Holiday Rule Added||
|
||||||
Holiday Rule Removed||
|
Holiday Rule Removed||
|
||||||
Click here to see Admin changes to this holiday||
|
Click here to see Admin changes to this holiday||
|
||||||
|
Expiration Date||
|
||||||
|
This option allows you to set the date after which leads in this list will not be allowed to be auto-dialed or manual-list-dialed by the system. Default is 2099-12-31||
|
||||||
|
Other Campaign DNC||
|
||||||
|
If the option Use Campaign DNC List is enabled, this option can allow you to use a different campaign DNC list, just put the Campaign ID of the other campaign in this field. If you use this option, the original campaign DNC list will no longer be checked, only the OTHER campaign DNC list will be used. This does not affect use of the Internal System DNC list. Default is EMPTY||
|
||||||
|
LIST EXPIRED AND SET TO ACTIVE||
|
||||||
|
|
||||||
|
|
||||||
############################################################ CLIENT
|
############################################################ CLIENT
|
||||||
|
|||||||
+12
-4
@@ -63,10 +63,11 @@
|
|||||||
# 120819-1758 - Added webphone_url and call_agent functions
|
# 120819-1758 - Added webphone_url and call_agent functions
|
||||||
# 120913-2039 - Added group_alias to transfer_conference function
|
# 120913-2039 - Added group_alias to transfer_conference function
|
||||||
# 121120-0855 - Added QM socket-send functionality
|
# 121120-0855 - Added QM socket-send functionality
|
||||||
|
# 121124-2354 - Added Other Campaign DNC option
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.6-29';
|
$version = '2.6-30';
|
||||||
$build = '121120-0855';
|
$build = '121124-2354';
|
||||||
|
|
||||||
$startMS = microtime();
|
$startMS = microtime();
|
||||||
|
|
||||||
@@ -1485,9 +1486,16 @@ if ($function == 'external_add_lead')
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Campaign DNC Check
|
# Campaign DNC Check
|
||||||
if ($campaign_dnc_check == 'YES' or $campaign_dnc_check=='Y')
|
if ( ($campaign_dnc_check=='YES') or ($campaign_dnc_check=='Y') )
|
||||||
{
|
{
|
||||||
$stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number='$value' and campaign_id='$campaign_id';";
|
$stmt="SELECT use_other_campaign_dnc from vicidial_campaigns where campaign_id='$campaign_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$use_other_campaign_dnc = $row[0];
|
||||||
|
$temp_campaign_id = $campaign_id;
|
||||||
|
if (strlen($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
|
||||||
|
|
||||||
|
$stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number='$value' and campaign_id='$temp_campaign_id';";
|
||||||
if ($DB) {echo "|$stmt|\n";}
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
$row=mysql_fetch_row($rslt);
|
$row=mysql_fetch_row($rslt);
|
||||||
|
|||||||
+75
-45
@@ -317,12 +317,13 @@
|
|||||||
# 121114-1749 - Fixed manual dial lead preview script variable issue
|
# 121114-1749 - Fixed manual dial lead preview script variable issue
|
||||||
# 121116-1409 - Added QC functionality
|
# 121116-1409 - Added QC functionality
|
||||||
# 121120-0838 - Added QM socket-send functionality
|
# 121120-0838 - Added QM socket-send functionality
|
||||||
|
# 121124-2357 - Added Other Campaign DNC option
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.6-215';
|
$version = '2.6-216';
|
||||||
$build = '121120-0838';
|
$build = '121124-2357';
|
||||||
$mel=1; # Mysql Error Log enabled = 1
|
$mel=1; # Mysql Error Log enabled = 1
|
||||||
$mysql_log_count=443;
|
$mysql_log_count=446;
|
||||||
$one_mysql_log=0;
|
$one_mysql_log=0;
|
||||||
|
|
||||||
require("dbconnect.php");
|
require("dbconnect.php");
|
||||||
@@ -1450,35 +1451,46 @@ if ($ACTION == 'manDiaLnextCaLL')
|
|||||||
echo "DNC NUMBER\n";
|
echo "DNC NUMBER\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if (ereg("AREACODE",$use_campaign_dnc))
|
if ( (ereg("Y",$use_campaign_dnc)) or (ereg("AREACODE",$use_campaign_dnc)) )
|
||||||
{
|
{
|
||||||
$phone_number_areacode = substr($phone_number, 0, 3);
|
$stmt="SELECT use_other_campaign_dnc from vicidial_campaigns where campaign_id='$campaign';";
|
||||||
$phone_number_areacode .= "XXXXXXX";
|
|
||||||
$stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$phone_number','$phone_number_areacode') and campaign_id='$campaign';";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{$stmt="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$phone_number' and campaign_id='$campaign';";}
|
|
||||||
$rslt=mysql_query($stmt, $link);
|
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00018',$user,$server_ip,$session_name,$one_mysql_log);}
|
|
||||||
if ($DB) {echo "$stmt\n";}
|
|
||||||
$row=mysql_fetch_row($rslt);
|
|
||||||
if ($row[0] > 0)
|
|
||||||
{
|
|
||||||
### insert a new lead in the system with this phone number
|
|
||||||
$stmt = "DELETE from vicidial_manual_dial_queue where phone_number='$phone_number' and user='$user';";
|
|
||||||
if ($DB) {echo "$stmt\n";}
|
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00358',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00445',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
$VMDQaffected_rows = mysql_affected_rows($link);
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$use_other_campaign_dnc = $row[0];
|
||||||
|
$temp_campaign_id = $campaign;
|
||||||
|
if (strlen($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
|
||||||
|
|
||||||
$stmt = "UPDATE vicidial_live_agents set external_dial='' where user='$user';";
|
if (ereg("AREACODE",$use_campaign_dnc))
|
||||||
if ($DB) {echo "$stmt\n";}
|
{
|
||||||
|
$phone_number_areacode = substr($phone_number, 0, 3);
|
||||||
|
$phone_number_areacode .= "XXXXXXX";
|
||||||
|
$stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$phone_number','$phone_number_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{$stmt="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$phone_number' and campaign_id='$temp_campaign_id';";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00359',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00018',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
$VLAEDaffected_rows = mysql_affected_rows($link);
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
if ($row[0] > 0)
|
||||||
|
{
|
||||||
|
### insert a new lead in the system with this phone number
|
||||||
|
$stmt = "DELETE from vicidial_manual_dial_queue where phone_number='$phone_number' and user='$user';";
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00358',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
|
$VMDQaffected_rows = mysql_affected_rows($link);
|
||||||
|
|
||||||
echo "DNC NUMBER\n";
|
$stmt = "UPDATE vicidial_live_agents set external_dial='' where user='$user';";
|
||||||
exit;
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00359',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
|
$VLAEDaffected_rows = mysql_affected_rows($link);
|
||||||
|
|
||||||
|
echo "DNC NUMBER\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ereg("CAMPLISTS",$manual_dial_filter))
|
if (ereg("CAMPLISTS",$manual_dial_filter))
|
||||||
@@ -3788,7 +3800,7 @@ if ($stage == "end")
|
|||||||
if ($auto_dial_level > 0)
|
if ($auto_dial_level > 0)
|
||||||
{
|
{
|
||||||
### check to see if campaign has alt_dial enabled
|
### check to see if campaign has alt_dial enabled
|
||||||
$stmt="SELECT auto_alt_dial,use_internal_dnc,use_campaign_dnc FROM vicidial_campaigns where campaign_id='$campaign';";
|
$stmt="SELECT auto_alt_dial,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc FROM vicidial_campaigns where campaign_id='$campaign';";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00064',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00064',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
@@ -3796,9 +3808,10 @@ if ($stage == "end")
|
|||||||
if ($VAC_mancall_ct > 0)
|
if ($VAC_mancall_ct > 0)
|
||||||
{
|
{
|
||||||
$row=mysql_fetch_row($rslt);
|
$row=mysql_fetch_row($rslt);
|
||||||
$auto_alt_dial = $row[0];
|
$auto_alt_dial = $row[0];
|
||||||
$use_internal_dnc = $row[1];
|
$use_internal_dnc = $row[1];
|
||||||
$use_campaign_dnc = $row[2];
|
$use_campaign_dnc = $row[2];
|
||||||
|
$use_other_campaign_dnc = $row[3];
|
||||||
}
|
}
|
||||||
else {$auto_alt_dial = 'NONE';}
|
else {$auto_alt_dial = 'NONE';}
|
||||||
if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3|ALT_AND_EXTENDED|ALT_AND_ADDR3_AND_EXTENDED|EXTENDED_ONLY)",$auto_alt_dial))
|
if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3|ALT_AND_EXTENDED|ALT_AND_ADDR3_AND_EXTENDED|EXTENDED_ONLY)",$auto_alt_dial))
|
||||||
@@ -3866,14 +3879,16 @@ if ($stage == "end")
|
|||||||
else {$VD_alt_dnc_count=0;}
|
else {$VD_alt_dnc_count=0;}
|
||||||
if ( (ereg("Y",$use_campaign_dnc)) or (ereg("AREACODE",$use_campaign_dnc)) )
|
if ( (ereg("Y",$use_campaign_dnc)) or (ereg("AREACODE",$use_campaign_dnc)) )
|
||||||
{
|
{
|
||||||
|
$temp_campaign_id = $campaign;
|
||||||
|
if (strlen($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
|
||||||
if (ereg("AREACODE",$use_campaign_dnc))
|
if (ereg("AREACODE",$use_campaign_dnc))
|
||||||
{
|
{
|
||||||
$alt_phone_areacode = substr($alt_phone, 0, 3);
|
$alt_phone_areacode = substr($alt_phone, 0, 3);
|
||||||
$alt_phone_areacode .= "XXXXXXX";
|
$alt_phone_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$alt_phone','$alt_phone_areacode') and campaign_id='$campaign';";
|
$stmtA="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$alt_phone','$alt_phone_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$alt_phone' and campaign_id='$campaign';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$alt_phone' and campaign_id='$temp_campaign_id';";}
|
||||||
$rslt=mysql_query($stmtA, $link);
|
$rslt=mysql_query($stmtA, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'00067',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'00067',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
@@ -3944,14 +3959,16 @@ if ($stage == "end")
|
|||||||
else {$VD_alt_dnc_count=0;}
|
else {$VD_alt_dnc_count=0;}
|
||||||
if ( (ereg("Y",$use_campaign_dnc)) or (ereg("AREACODE",$use_campaign_dnc)) )
|
if ( (ereg("Y",$use_campaign_dnc)) or (ereg("AREACODE",$use_campaign_dnc)) )
|
||||||
{
|
{
|
||||||
|
$temp_campaign_id = $campaign;
|
||||||
|
if (strlen($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
|
||||||
if (ereg("AREACODE",$use_campaign_dnc))
|
if (ereg("AREACODE",$use_campaign_dnc))
|
||||||
{
|
{
|
||||||
$addr3_phone_areacode = substr($address3, 0, 3);
|
$addr3_phone_areacode = substr($address3, 0, 3);
|
||||||
$addr3_phone_areacode .= "XXXXXXX";
|
$addr3_phone_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$address3','$addr3_phone_areacode') and campaign_id='$campaign';";
|
$stmtA="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$address3','$addr3_phone_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$address3' and campaign_id='$campaign';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$address3' and campaign_id='$temp_campaign_id';";}
|
||||||
$rslt=mysql_query($stmtA, $link);
|
$rslt=mysql_query($stmtA, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'00071',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'00071',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
@@ -4060,14 +4077,16 @@ if ($stage == "end")
|
|||||||
else {$VD_alt_dnc_count=0;}
|
else {$VD_alt_dnc_count=0;}
|
||||||
if ( (ereg("Y",$use_campaign_dnc)) or (ereg("AREACODE",$use_campaign_dnc)) )
|
if ( (ereg("Y",$use_campaign_dnc)) or (ereg("AREACODE",$use_campaign_dnc)) )
|
||||||
{
|
{
|
||||||
|
$temp_campaign_id = $campaign;
|
||||||
|
if (strlen($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
|
||||||
if (ereg("AREACODE",$use_campaign_dnc))
|
if (ereg("AREACODE",$use_campaign_dnc))
|
||||||
{
|
{
|
||||||
$vdap_phone_areacode = substr($VD_altdial_phone, 0, 3);
|
$vdap_phone_areacode = substr($VD_altdial_phone, 0, 3);
|
||||||
$vdap_phone_areacode .= "XXXXXXX";
|
$vdap_phone_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$VD_altdial_phone','$vdap_phone_areacode') and campaign_id='$campaign';";
|
$stmtA="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$VD_altdial_phone','$vdap_phone_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_altdial_phone' and campaign_id='$campaign';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$VD_altdial_phone' and campaign_id='$temp_campaign_id';";}
|
||||||
$rslt=mysql_query($stmtA, $link);
|
$rslt=mysql_query($stmtA, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'00077',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'00077',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
@@ -4990,7 +5009,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
}
|
}
|
||||||
$stmt="SELECT owner_populate FROM vicidial_campaigns where campaign_id='$campaign';";
|
$stmt="SELECT owner_populate FROM vicidial_campaigns where campaign_id='$campaign';";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00444',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$camp_op_ct = mysql_num_rows($rslt);
|
$camp_op_ct = mysql_num_rows($rslt);
|
||||||
if ($camp_op_ct > 0)
|
if ($camp_op_ct > 0)
|
||||||
@@ -6496,7 +6515,7 @@ if ($ACTION == 'updateDISPO')
|
|||||||
}
|
}
|
||||||
|
|
||||||
### find all DNC-type statuses in the system
|
### find all DNC-type statuses in the system
|
||||||
if ( ($use_internal_dnc=='Y') or ($use_campaign_dnc=='Y') )
|
if ( ($use_internal_dnc=='Y') or ($use_campaign_dnc=='Y') or ($use_internal_dnc=='AREACODE') or ($use_campaign_dnc=='AREACODE') )
|
||||||
{
|
{
|
||||||
$DNC_string_check = '|';
|
$DNC_string_check = '|';
|
||||||
$stmt = "SELECT status FROM vicidial_statuses where dnc='Y';";
|
$stmt = "SELECT status FROM vicidial_statuses where dnc='Y';";
|
||||||
@@ -6529,7 +6548,7 @@ if ($ACTION == 'updateDISPO')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$insert_into_dnc=0;
|
$insert_into_dnc=0;
|
||||||
if ( ($use_internal_dnc=='Y') and (eregi("\|$log_dispo_choice\|", $DNC_string_check) ) )
|
if ( ( ($use_internal_dnc=='Y') or ($use_internal_dnc=='AREACODE') ) and (eregi("\|$log_dispo_choice\|", $DNC_string_check) ) )
|
||||||
{
|
{
|
||||||
$stmt = "SELECT phone_number from vicidial_list where lead_id='$lead_id';";
|
$stmt = "SELECT phone_number from vicidial_list where lead_id='$lead_id';";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
@@ -6542,14 +6561,22 @@ if ($ACTION == 'updateDISPO')
|
|||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$insert_into_dnc++;
|
$insert_into_dnc++;
|
||||||
}
|
}
|
||||||
if ( ($use_campaign_dnc=='Y') and (eregi("\|$log_dispo_choice\|", $DNC_string_check) ) )
|
if ( ( ($use_campaign_dnc=='Y') or ($use_campaign_dnc=='AREACODE') ) and (eregi("\|$log_dispo_choice\|", $DNC_string_check) ) )
|
||||||
{
|
{
|
||||||
|
$stmt="SELECT use_other_campaign_dnc from vicidial_campaigns where campaign_id='$campaign';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00446',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$use_other_campaign_dnc = $row[0];
|
||||||
|
$temp_campaign_id = $campaign;
|
||||||
|
if (strlen($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
|
||||||
|
|
||||||
$stmt = "SELECT phone_number from vicidial_list where lead_id='$lead_id';";
|
$stmt = "SELECT phone_number from vicidial_list where lead_id='$lead_id';";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00148',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00148',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
$row=mysql_fetch_row($rslt);
|
$row=mysql_fetch_row($rslt);
|
||||||
$stmt="INSERT IGNORE INTO vicidial_campaign_dnc (phone_number,campaign_id) values('$row[0]','$campaign');";
|
$stmt="INSERT IGNORE INTO vicidial_campaign_dnc (phone_number,campaign_id) values('$row[0]','$temp_campaign_id');";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00149',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00149',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
@@ -6677,7 +6704,7 @@ if ($ACTION == 'updateDISPO')
|
|||||||
}
|
}
|
||||||
### END Call Notes Logging ###
|
### END Call Notes Logging ###
|
||||||
|
|
||||||
$stmt="SELECT auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc,api_manual_dial from vicidial_campaigns where campaign_id='$campaign';";
|
$stmt="SELECT auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc,api_manual_dial,use_other_campaign_dnc from vicidial_campaigns where campaign_id='$campaign';";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00155',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00155',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
$row=mysql_fetch_row($rslt);
|
$row=mysql_fetch_row($rslt);
|
||||||
@@ -6685,6 +6712,7 @@ if ($ACTION == 'updateDISPO')
|
|||||||
$use_internal_dnc = $row[1];
|
$use_internal_dnc = $row[1];
|
||||||
$use_campaign_dnc = $row[2];
|
$use_campaign_dnc = $row[2];
|
||||||
$api_manual_dial = $row[3];
|
$api_manual_dial = $row[3];
|
||||||
|
$use_other_campaign_dnc = $row[4];
|
||||||
|
|
||||||
if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$VC_auto_alt_dial_statuses)) )
|
if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$VC_auto_alt_dial_statuses)) )
|
||||||
{
|
{
|
||||||
@@ -6734,14 +6762,16 @@ if ($ACTION == 'updateDISPO')
|
|||||||
|
|
||||||
if ( (ereg("Y",$use_campaign_dnc)) or (ereg("AREACODE",$use_campaign_dnc)) )
|
if ( (ereg("Y",$use_campaign_dnc)) or (ereg("AREACODE",$use_campaign_dnc)) )
|
||||||
{
|
{
|
||||||
|
$temp_campaign_id = $campaign;
|
||||||
|
if (strlen($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
|
||||||
if (ereg("AREACODE",$use_campaign_dnc))
|
if (ereg("AREACODE",$use_campaign_dnc))
|
||||||
{
|
{
|
||||||
$vhp_phone_areacode = substr($vh_phone, 0, 3);
|
$vhp_phone_areacode = substr($vh_phone, 0, 3);
|
||||||
$vhp_phone_areacode .= "XXXXXXX";
|
$vhp_phone_areacode .= "XXXXXXX";
|
||||||
$stmtA="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$vh_phone','$vhp_phone_areacode') and campaign_id='$campaign';";
|
$stmtA="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$vh_phone','$vhp_phone_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$vh_phone' and campaign_id='$campaign';";}
|
{$stmtA="SELECT count(*) FROM vicidial_campaign_dnc where phone_number='$vh_phone' and campaign_id='$temp_campaign_id';";}
|
||||||
$rslt=mysql_query($stmtA, $link);
|
$rslt=mysql_query($stmtA, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'00269',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'00269',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
|||||||
+108
-23
File diff suppressed because one or more lines are too long
@@ -70,10 +70,11 @@
|
|||||||
# 120912-2042 - Added user_group_status and in_group_status functions
|
# 120912-2042 - Added user_group_status and in_group_status functions
|
||||||
# 120913-1255 - Added update_log_entry function
|
# 120913-1255 - Added update_log_entry function
|
||||||
# 121116-1938 - Added state call time restrictions to add_lead hopper insert function
|
# 121116-1938 - Added state call time restrictions to add_lead hopper insert function
|
||||||
|
# 121125-2210 - Added Other Campaign DNC option and list expiration date option
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.6-48';
|
$version = '2.6-49';
|
||||||
$build = '121116-1938';
|
$build = '121125-2210';
|
||||||
$api_url_log = 0;
|
$api_url_log = 0;
|
||||||
|
|
||||||
$startMS = microtime();
|
$startMS = microtime();
|
||||||
@@ -319,6 +320,8 @@ if (isset($_GET["call_id"])) {$call_id=$_GET["call_id"];}
|
|||||||
elseif (isset($_POST["call_id"])) {$call_id=$_POST["call_id"];}
|
elseif (isset($_POST["call_id"])) {$call_id=$_POST["call_id"];}
|
||||||
if (isset($_GET["group"])) {$group=$_GET["group"];}
|
if (isset($_GET["group"])) {$group=$_GET["group"];}
|
||||||
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
|
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
|
||||||
|
if (isset($_GET["expiration_date"])) {$expiration_date=$_GET["expiration_date"];}
|
||||||
|
elseif (isset($_POST["expiration_date"])) {$expiration_date=$_POST["expiration_date"];}
|
||||||
|
|
||||||
|
|
||||||
header ("Content-type: text/html; charset=utf-8");
|
header ("Content-type: text/html; charset=utf-8");
|
||||||
@@ -471,6 +474,7 @@ if ($non_latin < 1)
|
|||||||
$in_groups = ereg_replace("[^-\|\_0-9a-zA-Z]","",$in_groups);
|
$in_groups = ereg_replace("[^-\|\_0-9a-zA-Z]","",$in_groups);
|
||||||
$call_id = ereg_replace("[^0-9a-zA-Z]","",$call_id);
|
$call_id = ereg_replace("[^0-9a-zA-Z]","",$call_id);
|
||||||
$group = ereg_replace("[^-\|\_0-9a-zA-Z]","",$group);
|
$group = ereg_replace("[^-\|\_0-9a-zA-Z]","",$group);
|
||||||
|
$expiration_date = ereg_replace("[^-_0-9a-zA-Z]","",$expiration_date);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2734,6 +2738,7 @@ if ($function == 'update_list')
|
|||||||
$webformSQL='';
|
$webformSQL='';
|
||||||
$webformtwoSQL='';
|
$webformtwoSQL='';
|
||||||
$resettimeSQL='';
|
$resettimeSQL='';
|
||||||
|
$expiration_dateSQL='';
|
||||||
if (strlen($campaign_id) > 0)
|
if (strlen($campaign_id) > 0)
|
||||||
{
|
{
|
||||||
$stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';";
|
$stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';";
|
||||||
@@ -2883,6 +2888,25 @@ if ($function == 'update_list')
|
|||||||
{$resettimeSQL = " ,reset_time='$reset_time'";}
|
{$resettimeSQL = " ,reset_time='$reset_time'";}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (strlen($expiration_date) > 9)
|
||||||
|
{
|
||||||
|
if ($expiration_date == '--BLANK--')
|
||||||
|
{$expiration_dateSQL = " ,expiration_date='2099-12-31'";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (strlen($expiration_date) < 10)
|
||||||
|
{
|
||||||
|
$result = 'ERROR';
|
||||||
|
$result_reason = "update_list EXPIRATION DATE IS NOT VALID, THIS IS AN OPTIONAL FIELD";
|
||||||
|
$data = "$expiration_date";
|
||||||
|
echo "$result: $result_reason: |$user|$data\n";
|
||||||
|
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{$resettimeSQL = " ,expiration_date='$expiration_date'";}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (strlen($web_form_address) > 0)
|
if (strlen($web_form_address) > 0)
|
||||||
{
|
{
|
||||||
if ($web_form_address == '--BLANK--')
|
if ($web_form_address == '--BLANK--')
|
||||||
@@ -2898,7 +2922,7 @@ if ($function == 'update_list')
|
|||||||
{$webformtwoSQL = " ,web_form_address_two='$web_form_address_two'";}
|
{$webformtwoSQL = " ,web_form_address_two='$web_form_address_two'";}
|
||||||
}
|
}
|
||||||
|
|
||||||
$updateSQL = "$webformtwoSQL$webformSQL$ammessageSQL$outboundcidSQL$activeSQL$listnameSQL$campaignSQL$scriptSQL$dropingroupSQL$resettimeSQL";
|
$updateSQL = "$webformtwoSQL$webformSQL$ammessageSQL$outboundcidSQL$activeSQL$listnameSQL$campaignSQL$scriptSQL$dropingroupSQL$resettimeSQL$expiration_dateSQL";
|
||||||
|
|
||||||
if (strlen($updateSQL)< 3)
|
if (strlen($updateSQL)< 3)
|
||||||
{
|
{
|
||||||
@@ -3211,8 +3235,9 @@ if ($function == 'add_list')
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if (strlen($active)<1) {$active='N';}
|
if (strlen($active)<1) {$active='N';}
|
||||||
|
if (strlen($expiration_date)<10) {$expiration_date='2099-12-31';}
|
||||||
|
|
||||||
$stmt="INSERT INTO vicidial_lists SET list_id='$list_id', list_name='$list_name', campaign_id='$campaign_id', active='$active', campaign_cid_override='$outbound_cid', agent_script_override='$script', am_message_exten_override='$am_message', drop_inbound_group_override='$drop_inbound_group', web_form_address='$web_form_address', web_form_address_two='$web_form_address_two', reset_time='$reset_time';";
|
$stmt="INSERT INTO vicidial_lists SET list_id='$list_id', list_name='$list_name', campaign_id='$campaign_id', active='$active', campaign_cid_override='$outbound_cid', agent_script_override='$script', am_message_exten_override='$am_message', drop_inbound_group_override='$drop_inbound_group', web_form_address='$web_form_address', web_form_address_two='$web_form_address_two', reset_time='$reset_time', expiration_date='$expiration_date';";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($DB) {echo "|$stmt|\n";}
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
|
||||||
@@ -4458,14 +4483,22 @@ if ($function == 'add_lead')
|
|||||||
if ( ($campaign_dnc_check == 'Y') or ($campaign_dnc_check == 'AREACODE') )
|
if ( ($campaign_dnc_check == 'Y') or ($campaign_dnc_check == 'AREACODE') )
|
||||||
{
|
{
|
||||||
if ($DB>0) {echo "DEBUG: Checking for campaign DNC\n";}
|
if ($DB>0) {echo "DEBUG: Checking for campaign DNC\n";}
|
||||||
|
|
||||||
|
$stmt="SELECT use_other_campaign_dnc from vicidial_campaigns where campaign_id='$campaign_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$use_other_campaign_dnc = $row[0];
|
||||||
|
$temp_campaign_id = $campaign_id;
|
||||||
|
if (strlen($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
|
||||||
|
|
||||||
if ($campaign_dnc_check == 'AREACODE')
|
if ($campaign_dnc_check == 'AREACODE')
|
||||||
{
|
{
|
||||||
$phone_areacode = substr($phone_number, 0, 3);
|
$phone_areacode = substr($phone_number, 0, 3);
|
||||||
$phone_areacode .= "XXXXXXX";
|
$phone_areacode .= "XXXXXXX";
|
||||||
$stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$phone_number','$phone_areacode') and campaign_id='$campaign_id';";
|
$stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number IN('$phone_number','$phone_areacode') and campaign_id='$temp_campaign_id';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number='$phone_number' and campaign_id='$campaign_id';";}
|
{$stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number='$phone_number' and campaign_id='$temp_campaign_id';";}
|
||||||
if ($DB>0) {echo "DEBUG: add_lead query - $stmt\n";}
|
if ($DB>0) {echo "DEBUG: add_lead query - $stmt\n";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
$row=mysql_fetch_row($rslt);
|
$row=mysql_fetch_row($rslt);
|
||||||
|
|||||||
Reference in New Issue
Block a user