From 599760e4dfea7a6c7d70749dd5507cf3eb5f9c07 Mon Sep 17 00:00:00 2001 From: mattf Date: Mon, 15 Mar 2021 15:44:29 +0000 Subject: [PATCH] Fix for multiple filter_clean_cid_number actions in the DID routing AGI script, also added 'T' filter action, Issue #1247 git-svn-id: svn://192.168.202.10@3381 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/agi/agi-DID_route.agi | 27 +++++++++++++++---- .../trunk/www/vicidial/help_documentation.txt | 4 +-- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/agc_2-X/trunk/agi/agi-DID_route.agi b/agc_2-X/trunk/agi/agi-DID_route.agi index cebb5c2c..9c2ec833 100644 --- a/agc_2-X/trunk/agi/agi-DID_route.agi +++ b/agc_2-X/trunk/agi/agi-DID_route.agi @@ -13,7 +13,7 @@ # ;inbound DID catch-all: #exten => _X.,1,AGI(agi-DID_route.agi) # -# Copyright (C) 2020 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2021 Matt Florell LICENSE: AGPLv2 # # changes: # 81007-0324 - First Build @@ -47,6 +47,7 @@ # 190216-0814 - Fix for user-group, in-group and campaign settings matching issues # 200623-2258 - Added Answer Signal options # 201112-0834 - Fix for AGENT routing, check for availability, issue #1211 +# 210315-1132 - Fix for multiple filter_clean_cid_number actions, added 'T' filter action, Issue #1247 # @@ -290,7 +291,7 @@ if ($SSdid_system_filter > 0) { $original_callerid = $callerid; $filter_number_altered=0; - if ($filter_clean_cid_number =~ /^R\d/) + if ($filter_clean_cid_number =~ /R\d/) { @filter_rule = split(/R/,$filter_clean_cid_number); $filter_rule[1] =~ s/ .*//gi; @@ -299,7 +300,7 @@ if ($SSdid_system_filter > 0) if (length($callerid) != length($original_callerid)) {$filter_number_altered++;} } - if ($filter_clean_cid_number =~ /^L\d/) + if ($filter_clean_cid_number =~ /L\d/) { @filter_rule = split(/L/,$filter_clean_cid_number); $filter_rule[1] =~ s/ .*//gi; @@ -308,6 +309,14 @@ if ($SSdid_system_filter > 0) if (length($callerid) != length($original_callerid)) {$filter_number_altered++;} } + if ($filter_clean_cid_number =~ /T\d/) + { + @filter_rule = split(/T/,$filter_clean_cid_number); + $filter_rule[1] =~ s/ .*//gi; + $callerid = substr($callerid, 0, $filter_rule[1]); + if (length($callerid) != length($original_callerid)) + {$filter_number_altered++;} + } } ### END temp clean caller id number ### @@ -904,7 +913,7 @@ if (length($filter_clean_cid_number) > 1) { $original_callerid = $callerid; $filter_number_altered=0; - if ($filter_clean_cid_number =~ /^R\d/) + if ($filter_clean_cid_number =~ /R\d/) { @filter_rule = split(/R/,$filter_clean_cid_number); $filter_rule[1] =~ s/ .*//gi; @@ -913,7 +922,7 @@ if (length($filter_clean_cid_number) > 1) if (length($callerid) != length($original_callerid)) {$filter_number_altered++;} } - if ($filter_clean_cid_number =~ /^L\d/) + if ($filter_clean_cid_number =~ /L\d/) { @filter_rule = split(/L/,$filter_clean_cid_number); $filter_rule[1] =~ s/ .*//gi; @@ -922,6 +931,14 @@ if (length($filter_clean_cid_number) > 1) if (length($callerid) != length($original_callerid)) {$filter_number_altered++;} } + if ($filter_clean_cid_number =~ /T\d/) + { + @filter_rule = split(/T/,$filter_clean_cid_number); + $filter_rule[1] =~ s/ .*//gi; + $callerid = substr($callerid, 0, $filter_rule[1]); + if (length($callerid) != length($original_callerid)) + {$filter_number_altered++;} + } if ($filter_number_altered > 0) { $newcallerid = "\"$calleridname <$callerid>\""; diff --git a/agc_2-X/trunk/www/vicidial/help_documentation.txt b/agc_2-X/trunk/www/vicidial/help_documentation.txt index 218e1a37..024f36da 100644 --- a/agc_2-X/trunk/www/vicidial/help_documentation.txt +++ b/agc_2-X/trunk/www/vicidial/help_documentation.txt @@ -1,4 +1,4 @@ -# version: 20210314105801 +# version: 20210315114001 users-user User ID This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. users-pass Password This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters. users-force_change_password Force Change Password If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N. @@ -650,7 +650,7 @@ inbound_dids-list_id In-Group List ID If IN_GROUP is selected as the DID Ro inbound_dids-entry_list_id In-Group Entry List ID If IN_GROUP is selected as the DID Route, then this is the Entry List ID that a new lead will be populated with if a new lead is added. Default is 0 for disabled. inbound_dids-campaign_id In-Group Campaign ID If IN_GROUP is selected as the DID Route, then this is the Campaign ID that leads may be searched for in if the call handle method is CIDLOOKUPRC. inbound_dids-phone_code In-Group Phone Code If IN_GROUP is selected as the DID Route, then this is the Phone Code used if a new lead is created. -inbound_dids-filter_clean_cid_number Clean CID Number This field allows you to specify a number of digits to restrict the incoming caller ID number to by putting an R in front of the number of digits, for example to restrict to the right 10 digits you would enter in R10. You can also use this feature to remove only a leading digit or digits by putting an L in front of the specific digits that you want to remove, for example to remove a 1 as the first digit you would enter in L1. Default is empty. If more than one rule is specified make sure you separate them with a space and the R will run before the L. +inbound_dids-filter_clean_cid_number Clean CID Number This field allows you to specify a number of digits to restrict the incoming caller ID number to by putting an R in front of the number of digits, for example to restrict to the right 10 digits you would enter in R10. You can also use this feature to remove only a leading digit or digits by putting an L in front of the specific digits that you want to remove, for example to remove a 1 as the first digit you would enter in L1. The T option which will trim the end number to a specific number of digits from the left for example T3 on 12345 will return 123. Default is empty. If more than one rule is specified make sure you separate them with a space and they will be executed in the following order R L T. inbound_dids-no_agent_ingroup_redirect No-Agent In-Group Redirect This setting allows you to redirect calls on this DID if there are no logged-in agents set to take calls from a specific In-Group. If this field is set to Y or NO_PAUSED and there are no agents logged in to take calls from the specific In-Group the calls will go to the No Agent In-Group Extension set below. The NO_PAUSED option will only send the call to the defined Extension if there are only paused agents in the in-group. The READY_ONLY option will send the call to the defined Extension if there are no agents waiting for calls right now in the in-group. Default is DISABLED. See the No Agent In-Group Extension setting below for more information. inbound_dids-no_agent_ingroup_id No-Agent In-Group ID For the No-Agent In-Group Redirect feature above to work properly, an in-Group must be selected from this menu. Default is blank. inbound_dids-no_agent_ingroup_extension No-Agent In-Group Extension For the No-Agent In-Group Redirect feature above to work properly, an Extension must be set in this field. Default is 9998811112. Below you will see some examples of default extensions that you can use in the system to terminate calls to,
- 9998811112 - ANSWERED, This number is not in service
- 9993333333 - UNANSWERED, signal 1, unallocated number, immediate hangup
- 9998888888 - UNANSWERED, signal 17, busy signal, immediate hangup
- 9994444444 - UNANSWERED, signal 27, out of order, immediate hangup
- 9995555555 - UNANSWERED, ring for 120 seconds then hangup