Added GROUP_AREACODE option to inbound did filters
git-svn-id: svn://192.168.202.10@2459 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -226,6 +226,8 @@ OTHER CHANGES:
|
|||||||
This only works for inbound and auto-dial outbound calls for in-groups
|
This only works for inbound and auto-dial outbound calls for in-groups
|
||||||
and campaigns that are set to ALLCALLS or ALLFORCE recording.
|
and campaigns that are set to ALLCALLS or ALLFORCE recording.
|
||||||
|
|
||||||
|
57. Added option to Inbound DID Group Filtering to filter by areacode.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
# ;inbound DID catch-all:
|
# ;inbound DID catch-all:
|
||||||
#exten => _X.,1,AGI(agi-DID_route.agi)
|
#exten => _X.,1,AGI(agi-DID_route.agi)
|
||||||
#
|
#
|
||||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
# changes:
|
# changes:
|
||||||
# 81007-0324 - First Build
|
# 81007-0324 - First Build
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
# 150112-1426 - Added no-agent last_update_time check to match in-group queries
|
# 150112-1426 - Added no-agent last_update_time check to match in-group queries
|
||||||
# 150708-2252 - Added max_queue_ingroup_ DID options
|
# 150708-2252 - Added max_queue_ingroup_ DID options
|
||||||
# 150806-1316 - Added Filter URL logging to url log, and added variables for uniqueid, channel and server_ip
|
# 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
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@@ -520,7 +521,23 @@ if ( ($filter_inbound_number =~ /GROUP|URL|DNC_INTERNAL|DNC_CAMPAIGN/) && ($pre_
|
|||||||
$filter_match_found = $aryA[0];
|
$filter_match_found = $aryA[0];
|
||||||
}
|
}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
if ($AGILOG) {$agi_string = "GROUP: |$filter_match_found|$stmtA|"; &agi_output;}
|
|
||||||
|
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 = "GROUP: |$filter_match_found|$stmtA|$stmtB|"; &agi_output;}
|
||||||
}
|
}
|
||||||
elsif ($filter_inbound_number =~ /DNC_INTERNAL/)
|
elsif ($filter_inbound_number =~ /DNC_INTERNAL/)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1911,7 +1911,7 @@ campaign_id VARCHAR(8),
|
|||||||
phone_code VARCHAR(10) default '1',
|
phone_code VARCHAR(10) default '1',
|
||||||
menu_id VARCHAR(50) default '',
|
menu_id VARCHAR(50) default '',
|
||||||
record_call ENUM('Y','N','Y_QUEUESTOP') default 'N',
|
record_call ENUM('Y','N','Y_QUEUESTOP') default 'N',
|
||||||
filter_inbound_number ENUM('DISABLED','GROUP','URL','DNC_INTERNAL','DNC_CAMPAIGN') default 'DISABLED',
|
filter_inbound_number ENUM('DISABLED','GROUP','URL','DNC_INTERNAL','DNC_CAMPAIGN','GROUP_AREACODE') default 'DISABLED',
|
||||||
filter_phone_group_id VARCHAR(20) default '',
|
filter_phone_group_id VARCHAR(20) default '',
|
||||||
filter_url VARCHAR(1000) default '',
|
filter_url VARCHAR(1000) default '',
|
||||||
filter_action ENUM('EXTEN','VOICEMAIL','AGENT','PHONE','IN_GROUP','CALLMENU','VMAIL_NO_INST') default 'EXTEN',
|
filter_action ENUM('EXTEN','VOICEMAIL','AGENT','PHONE','IN_GROUP','CALLMENU','VMAIL_NO_INST') default 'EXTEN',
|
||||||
@@ -3689,4 +3689,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='1447',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
UPDATE system_settings SET db_schema_version='1448',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||||
|
|||||||
@@ -469,3 +469,7 @@ UPDATE system_settings SET db_schema_version='1446',db_schema_update_date=NOW()
|
|||||||
CREATE INDEX live_chat_id on vicidial_chat_log (chat_id);
|
CREATE INDEX live_chat_id on vicidial_chat_log (chat_id);
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1447',db_schema_update_date=NOW() where db_schema_version < 1447;
|
UPDATE system_settings SET db_schema_version='1447',db_schema_update_date=NOW() where db_schema_version < 1447;
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_inbound_dids MODIFY filter_inbound_number ENUM('DISABLED','GROUP','URL','DNC_INTERNAL','DNC_CAMPAIGN','GROUP_AREACODE') default 'DISABLED';
|
||||||
|
|
||||||
|
UPDATE system_settings SET db_schema_version='1448',db_schema_update_date=NOW() where db_schema_version < 1448;
|
||||||
|
|||||||
@@ -3684,12 +3684,13 @@ else
|
|||||||
# 151231-0009 - Fixed admin logging in several places
|
# 151231-0009 - Fixed admin logging in several places
|
||||||
# 151231-0834 - Added agent_allowed_chat_groups to User Groups
|
# 151231-0834 - Added agent_allowed_chat_groups to User Groups
|
||||||
# 160101-0928 - Added routing_initiated_recordings to in-group and campaign settings, and updated for 2016
|
# 160101-0928 - Added routing_initiated_recordings to in-group and campaign settings, and updated for 2016
|
||||||
|
# 160106-0751 - Added GROUP_AREACODE option to inbound did filters
|
||||||
#
|
#
|
||||||
|
|
||||||
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
||||||
|
|
||||||
$admin_version = '2.12-531a';
|
$admin_version = '2.12-532a';
|
||||||
$build = '160101-0928';
|
$build = '160106-0751';
|
||||||
|
|
||||||
$STARTtime = date("U");
|
$STARTtime = date("U");
|
||||||
$SQLdate = date("Y-m-d H:i:s");
|
$SQLdate = date("Y-m-d H:i:s");
|
||||||
@@ -27353,7 +27354,7 @@ if ($ADD==3311)
|
|||||||
|
|
||||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Pre-Filter Phone Group DID").": </td><td align=left><input type=text name=pre_filter_extension size=40 maxlength=50 value=\"$pre_filter_extension\">$NWB#inbound_dids-pre_filter_extension$NWE</td></tr>\n";
|
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Pre-Filter Phone Group DID").": </td><td align=left><input type=text name=pre_filter_extension size=40 maxlength=50 value=\"$pre_filter_extension\">$NWB#inbound_dids-pre_filter_extension$NWE</td></tr>\n";
|
||||||
|
|
||||||
echo "<tr bgcolor=#CCFFFF><td align=right>"._QXZ("Filter Inbound Number").": </td><td align=left><select size=1 name=filter_inbound_number><option value=\"DISABLED\">"._QXZ("DISABLED")."</option><option value=\"GROUP\">"._QXZ("GROUP")."</option><option value=\"URL\">"._QXZ("URL")."</option><option value=\"DNC_INTERNAL\">"._QXZ("DNC_INTERNAL")."</option><option value=\"DNC_CAMPAIGN\">"._QXZ("DNC_CAMPAIGN")."</option><option SELECTED>$filter_inbound_number</option></select>$NWB#inbound_dids-filter_inbound_number$NWE</td></tr>\n";
|
echo "<tr bgcolor=#CCFFFF><td align=right>"._QXZ("Filter Inbound Number").": </td><td align=left><select size=1 name=filter_inbound_number><option value=\"DISABLED\">"._QXZ("DISABLED")."</option><option value=\"GROUP\">"._QXZ("GROUP")."</option><option value=\"URL\">"._QXZ("URL")."</option><option value=\"DNC_INTERNAL\">"._QXZ("DNC_INTERNAL")."</option><option value=\"DNC_CAMPAIGN\">"._QXZ("DNC_CAMPAIGN")."</option><option value=\"GROUP_AREACODE\">"._QXZ("GROUP_AREACODE")."</option><option SELECTED>$filter_inbound_number</option></select>$NWB#inbound_dids-filter_inbound_number$NWE</td></tr>\n";
|
||||||
|
|
||||||
echo "<tr bgcolor=#CCFFFF><td align=right><a href=\"$PHP_SELF?ADD=3711&filter_phone_group_id=$filter_phone_group_id\">"._QXZ("Filter Phone Group ID").":</a> </td><td align=left><select size=1 name=filter_phone_group_id>$Fgroups_list<option value='$filter_phone_group_id' SELECTED>"._QXZ("$filter_phone_group_id")."</option></select>$NWB#inbound_dids-filter_phone_group_id$NWE</td></tr>\n";
|
echo "<tr bgcolor=#CCFFFF><td align=right><a href=\"$PHP_SELF?ADD=3711&filter_phone_group_id=$filter_phone_group_id\">"._QXZ("Filter Phone Group ID").":</a> </td><td align=left><select size=1 name=filter_phone_group_id>$Fgroups_list<option value='$filter_phone_group_id' SELECTED>"._QXZ("$filter_phone_group_id")."</option></select>$NWB#inbound_dids-filter_phone_group_id$NWE</td></tr>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
# help.php - VICIDIAL administration page
|
# help.php - VICIDIAL administration page
|
||||||
#
|
#
|
||||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
|
|
||||||
# CHANGELOG:
|
# CHANGELOG:
|
||||||
@@ -75,6 +75,7 @@
|
|||||||
# 151229-2302 - Added campaigns-manual_dial_timeout entry
|
# 151229-2302 - Added campaigns-manual_dial_timeout entry
|
||||||
# 151231-0839 - Added user_groups-agent_allowed_chat_groups entry
|
# 151231-0839 - Added user_groups-agent_allowed_chat_groups entry
|
||||||
# 160101-0933 - Added entries for routing_initiated_recordings in campaigns and in-groups
|
# 160101-0933 - Added entries for routing_initiated_recordings in campaigns and in-groups
|
||||||
|
# 160106-0700 - Added AREACODE description to the inbound_dids-filter_inbound_number entry
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@@ -2928,7 +2929,7 @@ if ($SSqc_features_active > 0)
|
|||||||
<BR>
|
<BR>
|
||||||
<A NAME="inbound_dids-filter_inbound_number">
|
<A NAME="inbound_dids-filter_inbound_number">
|
||||||
<BR>
|
<BR>
|
||||||
<B><?php echo _QXZ("Filter Inbound Number"); ?> -</B><?php echo _QXZ("This option if enabled allows you to filter calls coming into this DID and send them to an alternative action if they match a phone number that is in the filter phone group or a URL response if you have configured one. Default is DISABLED. GROUP will search in a Filter Phone Group. URL will send a URL and will match if a 1 is sent back. DNC_INTERNAL will search by the internal DNC list. DNC_CAMPAIGN will search by one specific campaign DNC list."); ?>
|
<B><?php echo _QXZ("Filter Inbound Number"); ?> -</B><?php echo _QXZ("This option if enabled allows you to filter calls coming into this DID and send them to an alternative action if they match a phone number that is in the filter phone group or a URL response if you have configured one. Default is DISABLED. GROUP will search in a Filter Phone Group. URL will send a URL and will match if a 1 is sent back. DNC_INTERNAL will search by the internal DNC list. DNC_CAMPAIGN will search by one specific campaign DNC list. If the option has AREACODE at the end, then the number and an entry for that numbers 3 digit areacode will be searched for. Both DNC options already have areacode searching built in."); ?>
|
||||||
|
|
||||||
<BR>
|
<BR>
|
||||||
<A NAME="inbound_dids-filter_phone_group_id">
|
<A NAME="inbound_dids-filter_phone_group_id">
|
||||||
|
|||||||
Reference in New Issue
Block a user