Added DID System-wide filter option to System Settings
Added DNC.COM inbound number filtering with DNCcom_inbound_filter.php git-svn-id: svn://192.168.202.10@2821 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -204,6 +204,10 @@ OTHER CHANGES:
|
||||
If you are using an older Net::Telnet version, you will need to upgrade!
|
||||
this should take just two commands: "cpan" and "install Net::Telnet"
|
||||
|
||||
50. Added DID System-wide filter option to System Settings
|
||||
|
||||
51. Added DNC.COM inbound number filtering with DNCcom_inbound_filter.php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
# 160106-0719 - Added filter option for GROUP_AREACODE
|
||||
# 161102-1035 - Fixed QM partition problem
|
||||
# 170322-1708 - Added filter phone group entry BLANK for a blank CIDnumber
|
||||
# 170923-1355 - Added system filter feature, before any other actions
|
||||
#
|
||||
|
||||
|
||||
@@ -144,7 +145,7 @@ $sthA->finish();
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM SETTINGS LOOKUP #####
|
||||
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db FROM system_settings;";
|
||||
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_system_filter FROM system_settings;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -164,6 +165,7 @@ if ($sthArows > 0)
|
||||
$alt_log_login = $aryA[10];
|
||||
$alt_log_pass = $aryA[11];
|
||||
$tables_use_alt_log_db = $aryA[12];
|
||||
$SSdid_system_filter = $aryA[13];
|
||||
}
|
||||
$sthA->finish();
|
||||
##### END SYSTEM SETTINGS LOOKUP #####
|
||||
@@ -208,6 +210,455 @@ $callerid =~ s/\'|\"|\\\\|\\\|\\|\\;|\\\;|\;|;//gi;
|
||||
$calleridname =~ s/\'|\"|\\\\|\\\|\\|\\;|\\\;|\;|;//gi;
|
||||
$extension =~ s/\'|\"|\\\\|\\\|\\|\\;|\\\;|\;|;//gi;
|
||||
|
||||
|
||||
### BEGIN did_system_filter filter process ###
|
||||
if ($SSdid_system_filter > 0)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "-- DID SYSTEM FILTER ENABLED: |$SSdid_system_filter|"; &agi_output;}
|
||||
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number,group_id,filter_dnc_campaign,filter_url_did_redirect,no_agent_ingroup_redirect,no_agent_ingroup_id,no_agent_ingroup_extension,pre_filter_phone_group_id,pre_filter_extension,max_queue_ingroup_calls,max_queue_ingroup_id,max_queue_ingroup_extension FROM vicidial_inbound_dids where did_pattern = 'did_system_filter' and did_active='Y';";
|
||||
$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;
|
||||
$did_id = $aryA[0];
|
||||
$did_pattern = $aryA[1];
|
||||
$did_description = $aryA[2];
|
||||
$did_active = $aryA[3];
|
||||
$did_route = $aryA[4];
|
||||
$did_extension = $aryA[5];
|
||||
$exten_context = $aryA[6];
|
||||
$voicemail_ext = $aryA[7];
|
||||
$phone = $aryA[8];
|
||||
$did_server_ip = $aryA[9];
|
||||
$user = $aryA[10];
|
||||
$user_unavailable_action = $aryA[11];
|
||||
$user_route_settings_ingroup = $aryA[12];
|
||||
$menu_id = $aryA[13];
|
||||
$record_call = $aryA[14];
|
||||
$filter_inbound_number = $aryA[15];
|
||||
$filter_phone_group_id = $aryA[16];
|
||||
$filter_url = $aryA[17];
|
||||
$filter_action = $aryA[18];
|
||||
$filter_extension = $aryA[19];
|
||||
$filter_exten_context = $aryA[20];
|
||||
$filter_voicemail_ext = $aryA[21];
|
||||
$filter_phone = $aryA[22];
|
||||
$filter_server_ip = $aryA[23];
|
||||
$filter_user = $aryA[24];
|
||||
$filter_user_unavailable_action = $aryA[25];
|
||||
$filter_user_route_settings_ingroup = $aryA[26];
|
||||
$filter_group_id = $aryA[27];
|
||||
$filter_call_handle_method = $aryA[28];
|
||||
$filter_agent_search_method = $aryA[29];
|
||||
$filter_list_id = $aryA[30];
|
||||
$filter_campaign_id = $aryA[31];
|
||||
$filter_phone_code = $aryA[32];
|
||||
$filter_menu_id = $aryA[33];
|
||||
$filter_clean_cid_number = $aryA[34];
|
||||
$group_id = $aryA[35];
|
||||
$filter_dnc_campaign = $aryA[36];
|
||||
$filter_url_did_redirect = $aryA[37];
|
||||
$no_agent_ingroup_redirect = $aryA[38];
|
||||
$no_agent_ingroup_id = $aryA[39];
|
||||
$no_agent_ingroup_extension = $aryA[40];
|
||||
$pre_filter_phone_group_id = $aryA[41];
|
||||
$pre_filter_extension = $aryA[42];
|
||||
$max_queue_ingroup_calls = $aryA[43];
|
||||
$max_queue_ingroup_id = $aryA[44];
|
||||
$max_queue_ingroup_extension = $aryA[45];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "-- DID SYSTEM FILTER DOES NOT EXIST: |$sthArows|"; &agi_output;}
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
if ($filter_inbound_number =~ /GROUP|URL|DNC_INTERNAL|DNC_CAMPAIGN/)
|
||||
{
|
||||
$original_callerid = $callerid;
|
||||
### BEGIN temp clean caller id number ###
|
||||
if (length($filter_clean_cid_number) > 1)
|
||||
{
|
||||
$original_callerid = $callerid;
|
||||
$filter_number_altered=0;
|
||||
if ($filter_clean_cid_number =~ /^R\d/)
|
||||
{
|
||||
@filter_rule = split(/R/,$filter_clean_cid_number);
|
||||
$filter_rule[1] =~ s/ .*//gi;
|
||||
while (length($callerid) > $filter_rule[1])
|
||||
{$callerid =~ s/^.//gi;}
|
||||
if (length($callerid) != length($original_callerid))
|
||||
{$filter_number_altered++;}
|
||||
}
|
||||
if ($filter_clean_cid_number =~ /^L\d/)
|
||||
{
|
||||
@filter_rule = split(/L/,$filter_clean_cid_number);
|
||||
$filter_rule[1] =~ s/ .*//gi;
|
||||
$filter_rule_reg = $filter_rule[1];
|
||||
$callerid =~ s/^$filter_rule_reg//gi;
|
||||
if (length($callerid) != length($original_callerid))
|
||||
{$filter_number_altered++;}
|
||||
}
|
||||
}
|
||||
### END temp clean caller id number ###
|
||||
|
||||
if ($AGILOG) {$agi_string = "SYSTEM filtering active: |$extension|$filter_inbound_number|$filter_phone_group_id|$filter_url|$filter_action|$filter_clean_cid_number|"; &agi_output;}
|
||||
if ($filter_inbound_number =~ /GROUP/)
|
||||
{
|
||||
$temp_cid_test = $callerid;
|
||||
if (length($callerid)<1) {$temp_cid_test = 'BLANK';}
|
||||
$stmtA = "SELECT count(*) FROM vicidial_filter_phone_numbers where filter_phone_group_id='$filter_phone_group_id' and phone_number='$temp_cid_test';";
|
||||
$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;
|
||||
$filter_match_found = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ( ($filter_match_found < 1) && ($filter_inbound_number =~ /AREACODE/) )
|
||||
{
|
||||
$alt_areacode = substr($callerid, 0, 3);
|
||||
$alt_areacode .= "XXXXXXX";
|
||||
$stmtB = "SELECT count(*) FROM vicidial_filter_phone_numbers where filter_phone_group_id='$filter_phone_group_id' and phone_number='$alt_areacode';";
|
||||
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$filter_match_found = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
if ($AGILOG) {$agi_string = "SYSTEM FILTER GROUP: |$filter_match_found|$stmtA|$stmtB|"; &agi_output;}
|
||||
}
|
||||
elsif ($filter_inbound_number =~ /DNC_INTERNAL/)
|
||||
{
|
||||
$alt_areacode = substr($callerid, 0, 3);
|
||||
$alt_areacode .= "XXXXXXX";
|
||||
$stmtA = "SELECT count(*) FROM vicidial_dnc where phone_number IN('$callerid','$alt_areacode');";
|
||||
$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;
|
||||
$filter_match_found = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
if ($AGILOG) {$agi_string = "SYSTEM FILTER DNC_INTERNAL: |$filter_match_found|$stmtA|"; &agi_output;}
|
||||
}
|
||||
elsif ($filter_inbound_number =~ /DNC_CAMPAIGN/)
|
||||
{
|
||||
$alt_areacode = substr($callerid, 0, 3);
|
||||
$alt_areacode .= "XXXXXXX";
|
||||
$stmtA = "SELECT count(*) FROM vicidial_campaign_dnc where campaign_id='$filter_dnc_campaign' and phone_number IN('$callerid','$alt_areacode');";
|
||||
$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;
|
||||
$filter_match_found = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
if ($AGILOG) {$agi_string = "SYSTEM FILTER DNC_CAMPAIGN: |$filter_match_found|$stmtA|"; &agi_output;}
|
||||
}
|
||||
else
|
||||
{
|
||||
### first, find curl binary
|
||||
$curlbin = '';
|
||||
if ( -e ('/bin/curl')) {$curlbin = '/bin/curl';}
|
||||
else
|
||||
{
|
||||
if ( -e ('/usr/bin/curl')) {$curlbin = '/usr/bin/curl';}
|
||||
else
|
||||
{
|
||||
if ( -e ('/usr/local/bin/curl')) {$curlbin = '/usr/local/bin/curl';}
|
||||
else
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "ERROR: cannot filter by URL, curl binary not found"; &agi_output;}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( (length($curlbin) > 4) && ($filter_url =~ /http/i) && (length($filter_url) > 8) )
|
||||
{
|
||||
$filter_url =~ s/^VAR|^ //gi;
|
||||
$filter_url =~ s/--A--phone_number--B--/$callerid/gi;
|
||||
$filter_url =~ s/--A--did_pattern--B--/$did_pattern/gi;
|
||||
$filter_url =~ s/--A--uniqueid--B--/$uniqueid/gi;
|
||||
$filter_url =~ s/--A--channel--B--/$channel/gi;
|
||||
$filter_url =~ s/--A--server_ip--B--/$VARserver_ip/gi;
|
||||
$filter_url =~ s/&/\\&/gi;
|
||||
$filter_url =~ s/ /+/gi;
|
||||
|
||||
### insert a new url log entry
|
||||
$SQL_log = "$filter_url";
|
||||
$SQL_log =~ s/;|\||\\//gi;
|
||||
$stmtA = "INSERT INTO vicidial_url_log SET uniqueid='$uniqueid',url_date=NOW(),url_type='DID_FILTER',url='$SQL_log',url_response='';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$url_id = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
my $secW = time();
|
||||
|
||||
@curl_output = `$curlbin $filter_url`;
|
||||
|
||||
my $secY = time();
|
||||
my $response_sec = ($secY - $secW);
|
||||
|
||||
$k=0;
|
||||
$full_output='';
|
||||
foreach (@curl_output)
|
||||
{
|
||||
$full_output_raw .= $curl_output[$k];
|
||||
$k++;
|
||||
}
|
||||
$full_output = $full_output_raw;
|
||||
$full_output =~ s/\D//gi;
|
||||
if ($full_output > 0)
|
||||
{
|
||||
$filter_match_found = $full_output;
|
||||
if ($filter_url_did_redirect =~ /Y/)
|
||||
{
|
||||
$did_route='DID';
|
||||
if ($AGILOG) {$agi_string = "SYSTEM Filter URL DID Redirect found: |$filter_match_found|$filter_url_did_redirect|$did_route|"; &agi_output;}
|
||||
}
|
||||
}
|
||||
### update url log entry
|
||||
$full_output_raw =~ s/;|\||\\//gi;
|
||||
$stmtA = "UPDATE vicidial_url_log SET url_response='$full_output_raw|$full_output',response_sec='$response_sec' where url_log_id='$url_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
if ($AGILOG) {$agi_string = "SYSTEM URL filter search response: |$filter_match_found|$full_output|$filter_url|$affected_rows|"; &agi_output;}
|
||||
}
|
||||
}
|
||||
if ($filter_match_found > 0)
|
||||
{
|
||||
if ($did_route !~ /DID/)
|
||||
{$did_route = $filter_action;}
|
||||
$did_extension = $filter_extension;
|
||||
$exten_context = $filter_exten_context;
|
||||
$voicemail_ext = $filter_voicemail_ext;
|
||||
$phone = $filter_phone;
|
||||
$did_server_ip = $filter_server_ip;
|
||||
$user = $filter_user;
|
||||
$user_unavailable_action = $filter_user_unavailable_action;
|
||||
$user_route_settings_ingroup = $filter_user_route_settings_ingroup;
|
||||
$menu_id = $filter_menu_id;
|
||||
$route_type = 'FILTER';
|
||||
|
||||
if ($AGILOG) {$agi_string = "SYSTEM Filter match found: |$filter_match_found|$filter_inbound_number|$filter_action|$did_route|"; &agi_output;}
|
||||
|
||||
if ($filter_number_altered > 0)
|
||||
{
|
||||
$newcallerid = "\"$calleridname <$callerid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
if ($AGILOG) {$agi_string = "filter clean callerid, setting new CID: |$callerid|$calleridname|$newcallerid|$filter_clean_cid_number| Old: |$original_callerid|"; &agi_output;}
|
||||
}
|
||||
|
||||
### Log the call to vicidial_did_log
|
||||
$stmtA = "INSERT INTO vicidial_did_log SET uniqueid='$uniqueid',channel='$channel',server_ip='$VARserver_ip',caller_id_number='$callerid',caller_id_name='$calleridname',extension='$extension',call_date='$SQLdate',did_id='$did_id',did_route='F_$did_route';";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rowsL = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- SYSTEM FILTER DID LOG : |$affected_rowsL|$stmtA|"; &agi_output;}
|
||||
|
||||
### Log the call to call_log
|
||||
$stmtA = "INSERT INTO call_log SET uniqueid='$unique_id', channel='$channel', channel_group='DID_INBOUND', server_ip='$VARserver_ip', type='$type', extension='$extension', number_dialed='$extension', caller_code='$callerid', start_time='$SQLdate', start_epoch='$now_date_epoch';";
|
||||
$affected_rowsC = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- SYSTEM FILTER CALL LOG : |$affected_rowsC|$stmtA|"; &agi_output;}
|
||||
|
||||
if ($AGILOG) {$did_string = "$SQLdate|$uniqueid|$channel|$extension|$callerid|$calleridname|$did_id|$did_route|"; &did_output;}
|
||||
|
||||
if ($did_agent_log =~ /Y/)
|
||||
{
|
||||
if ($did_route !~ /IN_GROUP/)
|
||||
{$group_id='';}
|
||||
$stmtA = "INSERT INTO vicidial_did_agent_log SET uniqueid='$uniqueid',server_ip='$VARserver_ip',caller_id_number='$callerid',caller_id_name='$calleridname',extension='$extension',call_date='$SQLdate',did_id='$did_id',did_route='$did_route',user='VDCL',group_id='$group_id',did_description='$did_description';";
|
||||
|
||||
if ( ($tables_use_alt_log_db =~ /did_agent_log/i) && (length($alt_log_server_ip)>4) && (length($alt_log_dbname)>0) )
|
||||
{
|
||||
$dbhD = DBI->connect("DBI:mysql:$alt_log_dbname:$alt_log_server_ip:3306", "$alt_log_login", "$alt_log_pass")
|
||||
or die "Couldn't connect to database: " . DBI->errstr;
|
||||
|
||||
if ($AGILOG) {$agi_string = "CONNECTED TO ALT-LOG DATABASE: $alt_log_server_ip|$alt_log_dbname|$uniqueid"; &agi_output;}
|
||||
|
||||
$affected_rowsAL = $dbhD->do($stmtA);
|
||||
|
||||
$dbhD->disconnect();
|
||||
}
|
||||
else
|
||||
{
|
||||
$affected_rowsAL = $dbhA->do($stmtA);
|
||||
}
|
||||
if ($AGILOG) {$agi_string = "SYSTEM FILTER -- DID AGENT LOG : |$affected_rowsAL|$stmtA|"; &agi_output;}
|
||||
}
|
||||
|
||||
### Route call to a VICIDIAL-defined phone
|
||||
if ($did_route =~ /PHONE/)
|
||||
{
|
||||
$stmtA = "SELECT dialplan_number,voicemail_id,protocol,ext_context FROM phones where server_ip='$did_server_ip' and extension='$phone';";
|
||||
$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;
|
||||
$dialplan_number = $aryA[0];
|
||||
$voicemail_id = $aryA[1];
|
||||
$protocol = $aryA[2];
|
||||
$ext_context = $aryA[3];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
### format the remote server dialstring to get the call to the overflow agent meetme room
|
||||
if( $did_server_ip =~ m/(\S+)\.(\S+)\.(\S+)\.(\S+)/ )
|
||||
{
|
||||
$a = leading_zero($1);
|
||||
$b = leading_zero($2);
|
||||
$c = leading_zero($3);
|
||||
$d = leading_zero($4);
|
||||
$ServerString = "$a$S$b$S$c$S$d$S";
|
||||
}
|
||||
|
||||
$did_extension = "$ServerString$dialplan_number";
|
||||
$did_route = 'EXTEN';
|
||||
}
|
||||
|
||||
### Route call to a voicemail box on the system
|
||||
if ($did_route =~ /VOICEMAIL|VMAIL_NO_INST/)
|
||||
{
|
||||
### format the remote server dialstring to get the call to the overflow agent meetme room
|
||||
if( $did_server_ip =~ m/(\S+)\.(\S+)\.(\S+)\.(\S+)/ )
|
||||
{
|
||||
$a = leading_zero($1);
|
||||
$b = leading_zero($2);
|
||||
$c = leading_zero($3);
|
||||
$d = leading_zero($4);
|
||||
$ServerString = "$a$S$b$S$c$S$d$S";
|
||||
}
|
||||
if ($did_route =~ /VMAIL_NO_INST/)
|
||||
{$voicemail_dump_exten = $voicemail_dump_exten_no_inst;}
|
||||
$did_extension = "$ServerString$voicemail_dump_exten$voicemail_ext";
|
||||
$did_route = 'EXTEN';
|
||||
}
|
||||
|
||||
### Route call to a VICIDIAL Inbound Group
|
||||
if ($did_route =~ /IN_GROUP/)
|
||||
{
|
||||
$did_extension = "99909$S$did_id$S$S$S$route_type";
|
||||
$exten_context = $ext_context;
|
||||
$did_route = 'EXTEN';
|
||||
}
|
||||
|
||||
### Route call to a logged-in VICIDIAL agent
|
||||
if ($did_route =~ /AGENT/)
|
||||
{
|
||||
$did_extension = "99909$S$did_id$S$S$S$route_type";
|
||||
$exten_context = $ext_context;
|
||||
$did_route = 'EXTEN';
|
||||
}
|
||||
|
||||
### QueueMetrics logging if enabled
|
||||
if ( ($did_route =~ /EXTEN|CALLMENU/) && ($enable_queuemetrics_logging > 0) )
|
||||
{
|
||||
$dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass")
|
||||
or die "Couldn't connect to database: " . DBI->errstr;
|
||||
|
||||
if ($DBX) {print "CONNECTED TO QueueMetrics DATABASE: $queuemetrics_server_ip|$queuemetrics_dbname\n";}
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET `partition`='P01',time_id='$now_date_epoch',call_id='$uniqueid',queue='NONE',agent='NONE',verb='INFO',data1='DID',data2='$extension',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
$dbhB->disconnect();
|
||||
}
|
||||
|
||||
### Route call to an extension on the system
|
||||
if ($did_route =~ /EXTEN/)
|
||||
{
|
||||
$XFERexten = "$did_extension";
|
||||
if ($AGILOG) {$agi_string = "SYSTEM FILTER exiting the DID app, transferring call to $XFERexten @ $exten_context"; &agi_output;}
|
||||
print "SET CONTEXT $exten_context\n";
|
||||
$result = <STDIN>;
|
||||
checkresult($result);
|
||||
print "SET EXTENSION $XFERexten\n";
|
||||
$result = <STDIN>;
|
||||
checkresult($result);
|
||||
print "SET PRIORITY 1\n";
|
||||
$result = <STDIN>;
|
||||
checkresult($result);
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
### Route call to a DID in the trunkinbound context on the system
|
||||
if ($did_route =~ /DID/)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "SYSTEM FILTER exiting the DID app, transferring call to $filter_match_found @ trunkinbound"; &agi_output;}
|
||||
print "SET CONTEXT trunkinbound\n";
|
||||
$result = <STDIN>;
|
||||
checkresult($result);
|
||||
print "SET EXTENSION $filter_match_found\n";
|
||||
$result = <STDIN>;
|
||||
checkresult($result);
|
||||
print "SET PRIORITY 1\n";
|
||||
$result = <STDIN>;
|
||||
checkresult($result);
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
### Route call to a call menu on the system
|
||||
if ($did_route =~ /CALLMENU/)
|
||||
{
|
||||
if ($enable_queuemetrics_logging > 0)
|
||||
{
|
||||
$dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass")
|
||||
or die "Couldn't connect to database: " . DBI->errstr;
|
||||
|
||||
if ($DBX) {print "CONNECTED TO QM DATABASE: $queuemetrics_server_ip|$queuemetrics_dbname\n";}
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET `partition`='P01',time_id='$now_date_epoch',call_id='$uniqueid',queue='NONE',agent='NONE',verb='INFO',data1='IVRSTART',data2='$callerid',data3='$extension',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
$dbhB->disconnect();
|
||||
}
|
||||
|
||||
$XFERcontext = "$menu_id";
|
||||
if ($AGILOG) {$agi_string = "SYSTEM FILTER exiting the DID app, transferring call to CALLMENU $XFERcontext"; &agi_output;}
|
||||
print "SET CONTEXT $XFERcontext\n";
|
||||
$result = <STDIN>;
|
||||
checkresult($result);
|
||||
print "SET EXTENSION s\n";
|
||||
$result = <STDIN>;
|
||||
checkresult($result);
|
||||
print "SET PRIORITY 1\n";
|
||||
$result = <STDIN>;
|
||||
checkresult($result);
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$callerid = $original_callerid;
|
||||
}
|
||||
}
|
||||
}
|
||||
### END did_system_filter filter process ###
|
||||
|
||||
|
||||
|
||||
### Grab DID values from the database
|
||||
$DIDs_in_system=0;
|
||||
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number,group_id,filter_dnc_campaign,filter_url_did_redirect,no_agent_ingroup_redirect,no_agent_ingroup_id,no_agent_ingroup_extension,pre_filter_phone_group_id,pre_filter_extension,max_queue_ingroup_calls,max_queue_ingroup_id,max_queue_ingroup_extension FROM vicidial_inbound_dids where did_pattern = '$extension' and did_active='Y';";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ASTERISK 13 COMPATIBILITY START: 2017-09-16 UPDATE: 2017-09-16
|
||||
ASTERISK 13 COMPATIBILITY START: 2017-09-16 UPDATE: 2017-09-22
|
||||
|
||||
|
||||
|
||||
@@ -64,9 +64,9 @@ make
|
||||
make install
|
||||
cd ../../
|
||||
|
||||
wget http://download.vicidial.com/beta-apps/asterisk-13.17.1-vici.tar.gz
|
||||
tar xvfz asterisk-13.17.1-vici.tar.gz
|
||||
cd asterisk-13.17.1-vici/
|
||||
wget http://download.vicidial.com/beta-apps/asterisk-13.17.2-vici.tar.gz
|
||||
tar xvfz asterisk-13.17.2-vici.tar.gz
|
||||
cd asterisk-13.17.2-vici/
|
||||
./configure --with-dahdi=/usr/src/asterisk/dahdi-linux-complete-2.11.1+2.11.1/ --with-gsm=internal --with-ogg=/usr/lib64/
|
||||
make menuselect <MAKE SURE APP_MEETME IS SELECTED IN APPLICATIONS!!!!!!!!!!!!!!!!!!!!!!!!!!>
|
||||
make
|
||||
@@ -101,7 +101,7 @@ cd ../../
|
||||
|
||||
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
|
||||
tar xvfz asterisk-13-current.tar.gz
|
||||
cd asterisk-13.17.1/
|
||||
cd asterisk-13.17.2/
|
||||
wget http://download.vicidial.com/asterisk-patches/leave.h
|
||||
wget http://download.vicidial.com/asterisk-patches/enter.h
|
||||
mv -f enter.h apps/enter.h
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
DNC.COM INTEGRATION Started: 2015-12-02 Updated: 2016-11-14
|
||||
DNC.COM INTEGRATION Started: 2015-12-02 Updated: 2017-09-25
|
||||
|
||||
NOTE: for DNC.COM integration of batch cellphone filtering, see this document:
|
||||
CELLPHONE_USA_TCPA_FCC_COMPLIANCE.txt
|
||||
|
||||
|
||||
We have added a utility to allow for direct filtering of lists on your Vicidial system with a DNC.COM account, to allow for state, federal(FTC) and internal DNC lists as well as TCPA and Litigator Scrub direct through DNC.COM.
|
||||
We have added a utility to allow for direct filtering of lists on your Vicidial system with a DNC.COM account, to allow for state, federal(FTC) and internal DNC lists as well as TCPA and Litigator Scrub direct through DNC.COM. We have also added a new inbound scrubbing option for calls coming in through DIDs on your system.
|
||||
|
||||
DNC.COM is also offering a Free 15 day trial to VICIdial users of their Real-time Integrated TCPA and DNC Safe Harbor lead scrubbing. For more information on this free offer, contact us (http://www.vicidial.com/?page_id=7).
|
||||
|
||||
|
||||
########## OUTBOUND LIST FILTERING ############################################
|
||||
|
||||
The script that allows for this must be run from the Linux command-line(CLI):
|
||||
AST_DNCcom_filter.pl
|
||||
|
||||
|
||||
In order for this script to work, you must have a Settings Container set up within Vicidial with the ID of "DNCDOTCOM". This settings container should be customized for your specific DNC.COM account, and how you want it to function.
|
||||
|
||||
|
||||
@@ -31,7 +33,7 @@ LOGIN_ID => 1234567890QWERTYUIOP1234567890QWERTYUIOP
|
||||
# the Master Project
|
||||
PROJ_ID =>
|
||||
|
||||
# CAMPAIGN_ID denotes the campaignId you wish to scrub-in – if you
|
||||
# CAMPAIGN_ID denotes the campaignId you wish to scrub-in - if you
|
||||
# specify this you may omit projId; if omitted we assume Default
|
||||
# Campaign of projId, or if both are omitted, the Default Campaign of
|
||||
# your Master Project
|
||||
@@ -185,3 +187,32 @@ STATUS_Y => YDNCCM
|
||||
# documentation. The additional fields will be comma separated.
|
||||
# Values are YES or NO.
|
||||
ADD_INFO_TO_COMMENTS => NO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
########## INBOUND CALL DID FILTERING ############################################
|
||||
|
||||
There is also a script that will work with the Inbound DID configuration to filter calls coming in through DIDs:
|
||||
DNCcom_inbound_filter.php
|
||||
|
||||
|
||||
For this script to work, you must have the same DNCDOTCOM settings container created in the system as shown above, but you will need to add another option to specify if you want to filter out USADNC numbers and/or LITIGATOR numbers:
|
||||
|
||||
# For inbound filtering,
|
||||
# USADNC will block federal DNC numbers
|
||||
# LITIGATOR will block the litigator list, if subscribed
|
||||
# INVALID will block invalid numbers
|
||||
INBOUND_FILTER => USADNC,LITIGATOR,INVALID
|
||||
|
||||
Here is an example of what to put in the "Filter URL" field of the DID entry that you will be using this for.
|
||||
NOTES:
|
||||
- Make sure you set the "Filter Inbound Number" option to "URL"
|
||||
- If you want this to be a system-wide filter, use the "did_system_filter" DID entry that you get to by clicking on the link in the Admin -> System Settings page.
|
||||
- The below example assumes the local connection to your webserver from your dialers is "192.168.1.3"
|
||||
|
||||
http://192.168.1.3/vicidial/DNCcom_inbound_filter.php?phone=--A--phone_number--B--
|
||||
|
||||
|
||||
IMPORTANT! We strongly recommend that if you are receiving calls from North America that you set the DID option "Clean CID Number" to "R10" so that you will always be looking up 10 digit numbers properly.
|
||||
|
||||
@@ -1724,7 +1724,8 @@ agent_push_events ENUM('0','1') default '0',
|
||||
agent_push_url TEXT,
|
||||
hide_inactive_lists ENUM('0','1') default '0',
|
||||
allow_manage_active_lists ENUM('0','1') default '0',
|
||||
expired_lists_inactive ENUM('0','1') default '0'
|
||||
expired_lists_inactive ENUM('0','1') default '0',
|
||||
did_system_filter ENUM('0','1') default '0'
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_campaigns_list_mix (
|
||||
@@ -3795,6 +3796,17 @@ index (lead_id),
|
||||
index (uniqueid)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_dnccom_scrub_log (
|
||||
phone_number VARCHAR(18),
|
||||
scrub_date DATETIME NOT NULL,
|
||||
flag_invalid ENUM('','0','1') default '',
|
||||
flag_dnc ENUM('','0','1') default '',
|
||||
flag_litigator ENUM('','0','1') default '',
|
||||
full_response VARCHAR(255) default '',
|
||||
index(phone_number),
|
||||
index(scrub_date)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
|
||||
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
|
||||
|
||||
@@ -4072,4 +4084,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 db_schema_version='1516',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1517',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -374,3 +374,18 @@ UPDATE system_settings SET db_schema_version='1515',db_schema_update_date=NOW()
|
||||
ALTER TABLE system_settings ADD expired_lists_inactive ENUM('0','1') default '0';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1516',db_schema_update_date=NOW() where db_schema_version < 1516;
|
||||
|
||||
ALTER TABLE system_settings ADD did_system_filter ENUM('0','1') default '0';
|
||||
|
||||
CREATE TABLE vicidial_dnccom_scrub_log (
|
||||
phone_number VARCHAR(18),
|
||||
scrub_date DATETIME NOT NULL,
|
||||
flag_invalid ENUM('','0','1') default '',
|
||||
flag_dnc ENUM('','0','1') default '',
|
||||
flag_litigator ENUM('','0','1') default '',
|
||||
full_response VARCHAR(255) default '',
|
||||
index(phone_number),
|
||||
index(scrub_date)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1517',db_schema_update_date=NOW() where db_schema_version < 1517;
|
||||
|
||||
@@ -565,10 +565,11 @@
|
||||
# 170912-1619 - Fix for no-hopper dnc dialing issue
|
||||
# 170913-1747 - Small change for two agent events
|
||||
# 170914-0708 - Fix for script tab issue
|
||||
# 170923-1336 - Small change to hangup customer process
|
||||
#
|
||||
|
||||
$version = '2.14-535c';
|
||||
$build = '170914-0708';
|
||||
$version = '2.14-536c';
|
||||
$build = '170923-1336';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=87;
|
||||
$one_mysql_log=0;
|
||||
@@ -12223,13 +12224,13 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
// {
|
||||
// alert(xmlhttp.responseText);
|
||||
// }
|
||||
|
||||
VD_live_customer_call = 0;
|
||||
agent_events('agent_hangup', '', aec); aec++;
|
||||
}
|
||||
}
|
||||
process_post_hangup=1;
|
||||
delete xmlhttp;
|
||||
}
|
||||
process_post_hangup=1;
|
||||
}
|
||||
else
|
||||
{process_post_hangup=1;}
|
||||
|
||||
@@ -220,7 +220,7 @@ while($i < $url_type_ct)
|
||||
$i++;
|
||||
}
|
||||
|
||||
$LISTurltypes=array("add_lead", "custom", "dispo", "na_callurl", "non-agent", "other", "qm_socket", "start", "start_ra","nva_phone","DID_FILTER","park_ivr_c","webform");
|
||||
$LISTurltypes=array("add_lead", "custom", "dispo", "na_callurl", "non-agent", "other", "qm_socket", "start", "start_ra","nva_phone","DID_FILTER","DNCcom","park_ivr_c","webform");
|
||||
|
||||
$url_types_to_print=count($LISTurltypes);
|
||||
$i=0;
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
# DNCcom_inbound_filter.php
|
||||
#
|
||||
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This script searches DNC.COM's scrub service for incoming DID phone numbers
|
||||
# and returns a blocking match of '1' that will send the call to the Filter route
|
||||
# DID Filter URL feature in the URL search type with the following URL:
|
||||
# VARhttp://server/vicidial/DNCcom_inbound_filter.php?phone=--A--phone_number--B--
|
||||
#
|
||||
# This script REQUIRES a Settings Container in the system with ID of: DNCDOTCOM
|
||||
# For inbound filtering, use the below variable in the settings container:
|
||||
# USADNC will block federal DNC numbers
|
||||
# LITIGATOR will block the litigator list, if subscribed
|
||||
# INVALID will block invalid numbers
|
||||
#
|
||||
#INBOUND_FILTER => USADNC,LITIGATOR,INVALID
|
||||
#
|
||||
# This code is tested against DNC.COM scrub utility version 2.12
|
||||
#
|
||||
# CHANGES
|
||||
# 170923-1905 - First Build
|
||||
#
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
|
||||
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
|
||||
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
|
||||
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
||||
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,webroot_writable FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$non_latin = $row[0];
|
||||
$webroot_writable = $row[1];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
$phone=preg_replace('/[^-_0-9a-zA-Z]/','',$phone);
|
||||
}
|
||||
else
|
||||
{
|
||||
$phone = preg_replace("/'|\"|\\\\|;/","",$phone);
|
||||
}
|
||||
$filter_count=0;
|
||||
$ENTRYdate = date("mdHis");
|
||||
|
||||
$stmt = "SELECT count(*) FROM vicidial_settings_containers where container_id='DNCDOTCOM';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$sc_ct = mysqli_num_rows($rslt);
|
||||
if ($sc_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$SC_count = $row[0];
|
||||
}
|
||||
|
||||
if ($SC_count > 0)
|
||||
{
|
||||
$stmt = "SELECT container_entry FROM vicidial_settings_containers where container_id='DNCDOTCOM';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$sc_ct = mysqli_num_rows($rslt);
|
||||
if ($sc_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$container_entry = $row[0];
|
||||
$container_ARY = explode("\n",$container_entry);
|
||||
$p=0;
|
||||
$scrub_url='';
|
||||
$flag_invalid=0;
|
||||
$flag_dnc=0;
|
||||
$flag_litigator=0;
|
||||
$container_ct = count($container_ARY);
|
||||
while ($p <= $container_ct)
|
||||
{
|
||||
$line = $container_ARY[$p];
|
||||
$line = preg_replace("/\n|\r|\t|\#.*|;.*/",'',$line);
|
||||
if (preg_match("/^DNC_DOT_COM_URL/",$line))
|
||||
{$scrub_url = $line; $scrub_url = trim(preg_replace("/.*=>/",'',$scrub_url));}
|
||||
if (preg_match("/^LOGIN_ID/",$line))
|
||||
{$login_id = $line; $login_id = trim(preg_replace("/.*=>/",'',$login_id));}
|
||||
if (preg_match("/^PROJ_ID/",$line))
|
||||
{$project_id = $line; $project_id = trim(preg_replace("/.*=>/",'',$project_id));}
|
||||
if (preg_match("/^CAMPAIGN_ID/",$line))
|
||||
{$campaign_id = $line; $campaign_id = trim(preg_replace("/.*=>/",'',$campaign_id));}
|
||||
if (preg_match("/^INBOUND_FILTER/",$line))
|
||||
{$in_filter = $line; $in_filter = trim(preg_replace("/.*=>/",'',$in_filter));}
|
||||
|
||||
$p++;
|
||||
}
|
||||
|
||||
$scrub_url .= "?version=2&loginId=" . $login_id . "&phoneList=" . $phone;
|
||||
if (strlen($project_id)>0) {$scrub_url .= "&projId=" . $project_id;}
|
||||
if (strlen($campaign_id)>0) {$scrub_url .= "&campaignId=" . $campaign_id;}
|
||||
|
||||
### insert a new url log entry
|
||||
$uniqueid = $ENTRYdate . '.' . $phone;
|
||||
$SQL_log = "$scrub_url";
|
||||
$SQL_log = preg_replace('/;|\n/','',$SQL_log);
|
||||
$SQL_log = addslashes($SQL_log);
|
||||
$stmt = "INSERT INTO vicidial_url_log SET uniqueid='$uniqueid',url_date=NOW(),url_type='DNCcom',url='$SQL_log',url_response='';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
$url_id = mysqli_insert_id($link);
|
||||
|
||||
$URLstart_sec = date("U");
|
||||
|
||||
if ($DB > 0) {echo "$scrub_url<BR>\n";}
|
||||
$SCUfile = file("$scrub_url");
|
||||
if ( !($SCUfile) )
|
||||
{
|
||||
$error_array = error_get_last();
|
||||
$error_type = $error_array["type"];
|
||||
$error_message = $error_array["message"];
|
||||
$error_line = $error_array["line"];
|
||||
$error_file = $error_array["file"];
|
||||
}
|
||||
|
||||
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
|
||||
|
||||
### update url log entry
|
||||
$URLend_sec = date("U");
|
||||
$URLdiff_sec = ($URLend_sec - $URLstart_sec);
|
||||
if ($SCUfile)
|
||||
{
|
||||
$SCUfile_contents = implode("", $SCUfile);
|
||||
$SCUfile_contents = preg_replace("/;|\n/",'',$SCUfile_contents);
|
||||
$SCUfile_contents = addslashes($SCUfile_contents);
|
||||
}
|
||||
else
|
||||
{
|
||||
$SCUfile_contents = "PHP ERROR: Type=$error_type - Message=$error_message - Line=$error_line - File=$error_file";
|
||||
}
|
||||
$stmt = "UPDATE vicidial_url_log SET response_sec='$URLdiff_sec',url_response='$SCUfile_contents' where url_log_id='$url_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
|
||||
$result_details = explode(',',$SCUfile_contents);
|
||||
if ($result_details[1] == 'D')
|
||||
{
|
||||
if ( (preg_match("/National \(USA\)/",$SCUfile_contents)) and (preg_match("/USADNC/",$in_filter)) )
|
||||
{
|
||||
$flag_dnc++;
|
||||
$filter_count++;
|
||||
}
|
||||
if ( (preg_match("/Litigator/",$SCUfile_contents)) and (preg_match("/LITIGATOR/",$in_filter)) )
|
||||
{
|
||||
$flag_litigator++;
|
||||
$filter_count++;
|
||||
}
|
||||
}
|
||||
if ( ($result_details[1] == 'I') or ( (preg_match("/not a valid number/",$SCUfile_contents)) and (preg_match("/INVALID/",$in_filter)) ) )
|
||||
{
|
||||
$flag_invalid++;
|
||||
$filter_count++;
|
||||
}
|
||||
|
||||
$stmt = "INSERT INTO vicidial_dnccom_scrub_log SET phone_number='$phone',scrub_date=NOW(),flag_invalid='$flag_invalid',flag_dnc='$flag_dnc',flag_litigator='$flag_litigator',full_response='$SCUfile_contents';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
if ($DB) {echo "$affected_rows|$stmt\n";}
|
||||
}
|
||||
}
|
||||
|
||||
echo "$filter_count\n";
|
||||
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@@ -134,6 +134,7 @@
|
||||
# 170819-0951 - Added allow_manage_active_lists entry
|
||||
# 170825-1129 - Added auto_reports-filename_override entry
|
||||
# 170920-2156 - Added expired_lists_inactive entry
|
||||
# 170923-1458 - Added settings-did_system_filter entry
|
||||
#
|
||||
|
||||
|
||||
@@ -5346,6 +5347,11 @@ FR_SPAC 00 00 00 00 00 - <?php echo _QXZ("France space separated phone number");
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Enable Campaign Test Calls"); ?> -</B><?php echo _QXZ("This setting enables the ability to enter a phone code and phone number into fields at the bottom of the Campaign Detail screen and place a phone call to that number as if it were a lead being auto-dialed in the system. The phone number will be stored as a new lead in the manual dial list ID list. The campaign must be active for this feature to be enabled, and it is recommended that the lists assigned to the campaign all be set to inactive. The dial prefix, dial timeout and all other dialing related features, except for DNC and call time options, will affect the dialing of the test number. The phone call will be placed on the server selected as the voicemail server in the system settings. Default is 0 for disabled."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-did_system_filter">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("DID System Filter"); ?> -</B><?php echo _QXZ("This setting enables the special did_system_filter DID entry. The filter settings in this DID entry will be applied to all incoming calls to the system, prior to any other actions on the call. This feature is commonly used for system-wide inbound blacklists, or filtering of do-not-contact phone numbers. Default is 0 for disabled."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-user_new_lead_limit">
|
||||
<BR>
|
||||
|
||||
Reference in New Issue
Block a user