mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
FB_CALLMONITOR: fix control code entries in phonebook and reverse search text file (Forum: #85761)
git-svn-id: https://svn.fhem.de/fhem/trunk@16693 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
cd9a611e72
commit
62951dde4f
@ -1,5 +1,7 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: 72_FB_CALLMONITOR: fix control code entries in phonebook and
|
||||
reverse search text file
|
||||
- feature: 49_SSCam: V4.1.0, support Audiostream cams, minor internal changes
|
||||
- change: 93_Log2Syslog: ssldebug for debugging SSL messages, minor fixes
|
||||
- feature: 49_SSCam: V3.10.0, CreateStreamDev added, new lastrec_fw_MJPEG,
|
||||
|
@ -1362,7 +1362,7 @@ sub FB_CALLMONITOR_loadTextFile($;$)
|
||||
{
|
||||
foreach my $line (@file)
|
||||
{
|
||||
$line =~ s/#.*$//g;
|
||||
$line =~ s/(,.*?)#.*$/$1/g;
|
||||
$line =~ s,//.*$,,g;
|
||||
|
||||
if((not $line =~ /^\s*$/) and $line =~ /,/)
|
||||
@ -1993,10 +1993,10 @@ sub FB_CALLMONITOR_normalizePhoneNumber($$)
|
||||
$number =~ s/\s//g; # Remove spaces
|
||||
$number =~ s/^(\#[0-9]{1,10}\#)//g; # Remove phone control codes
|
||||
$number =~ s/^\+/00/g; # Convert leading + to 00 country extension
|
||||
$number =~ s/\D//g if(not $number =~ /@/); # Remove anything else isn't a number if it is no VoIP number
|
||||
$number =~ s/[^\d\*#]//g if(not $number =~ /@/); # Remove anything else isn't a number if it is no VoIP number
|
||||
$number =~ s/^$country_code/0/g; # Replace own country code with leading 0
|
||||
|
||||
if($number !~ /^0/ and $number !~ /^11/ and $number !~ /@/ and $area_code =~ /^0[1-9]\d+$/)
|
||||
if($number =~ /^\d/ and $number !~ /^0/ and $number !~ /^11/ and $number !~ /@/ and $area_code =~ /^0[1-9]\d+$/)
|
||||
{
|
||||
$number = $area_code.$number;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user