diff --git a/agi/agi-DID_route.agi b/agi/agi-DID_route.agi index 2d1adf16..b59714a6 100644 --- a/agi/agi-DID_route.agi +++ b/agi/agi-DID_route.agi @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# agi-DID_route.agi version 2.12 +# agi-DID_route.agi version 2.14 # # runs when a call comes into an inbound context on a trunk. This script will # send the calls to various places depending on the settings for each DID. @@ -13,7 +13,7 @@ # ;inbound DID catch-all: #exten => _X.,1,AGI(agi-DID_route.agi) # -# Copyright (C) 2016 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2017 Matt Florell LICENSE: AGPLv2 # # changes: # 81007-0324 - First Build @@ -42,6 +42,7 @@ # 150806-1316 - Added Filter URL logging to url log, and added variables for uniqueid, channel and server_ip # 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 # @@ -476,7 +477,9 @@ if ( (length($pre_filter_phone_group_id)>0) && (length($pre_filter_extension)>0) { if ($AGILOG) {$agi_string = "pre-filtering active: |$extension|$pre_filter_phone_group_id|$pre_filter_extension|$filter_clean_cid_number|$callerid"; &agi_output;} - $stmtA = "SELECT count(*) FROM vicidial_filter_phone_numbers where filter_phone_group_id='$pre_filter_phone_group_id' and phone_number='$callerid';"; + $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='$pre_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; @@ -512,7 +515,9 @@ if ( ($filter_inbound_number =~ /GROUP|URL|DNC_INTERNAL|DNC_CAMPAIGN/) && ($pre_ if ($AGILOG) {$agi_string = "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/) { - $stmtA = "SELECT count(*) FROM vicidial_filter_phone_numbers where filter_phone_group_id='$filter_phone_group_id' and phone_number='$callerid';"; + $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; diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 1b419ef5..9bf90b03 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -6653,7 +6653,7 @@ if ($ADD==171) echo ""._QXZ("Filter Phone Group").": \n"; - echo ""._QXZ("Phone Numbers").":

("._QXZ("one phone number per line only").")
$NWB#internal_list-dnc$NWE\n"; + echo ""._QXZ("Phone Numbers").":

("._QXZ("one phone number per line only").")
$NWB#filter-phone-list$NWE\n"; if ($LOGdelete_from_dnc > 0) { echo ""._QXZ("Add or Delete").": \n"; diff --git a/www/vicidial/help.php b/www/vicidial/help.php index b00059c5..04732550 100644 --- a/www/vicidial/help.php +++ b/www/vicidial/help.php @@ -116,6 +116,7 @@ # 170313-2012 - Added CHAT option to inbound_queue_no_dial entry # 170320-1346 - Added phones conf_qualify entry # 170321-1130 - Added pause code limits entries +# 170322-1720 - Added filter-phone-list entry # @@ -2158,12 +2159,20 @@ if ($SSqc_features_active > 0)
- +


- +
+
+
+
+ - + +