diff --git a/fhem/CHANGED b/fhem/CHANGED index a33c3148d..32128bd53 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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, diff --git a/fhem/FHEM/72_FB_CALLMONITOR.pm b/fhem/FHEM/72_FB_CALLMONITOR.pm index 979deaa9a..cf0979bc4 100755 --- a/fhem/FHEM/72_FB_CALLMONITOR.pm +++ b/fhem/FHEM/72_FB_CALLMONITOR.pm @@ -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; }