From d06d1e756fb2f932094c992f9227157bdaadf1b0 Mon Sep 17 00:00:00 2001 From: markusbloch Date: Wed, 28 Jan 2015 16:39:34 +0000 Subject: [PATCH] FB_CALLMONITOR: allow spaces in phone numbers stored in phonebooks (Forum #32663) git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@7760 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/72_FB_CALLMONITOR.pm | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 699d1ffa5..6bb5ccc6a 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # 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: FB_CALLMONITOR: allow spaces in phone numbers stored in phonebooks - bugfix: SYSMON: Symbol '#' in Readings prevents update - feature: new helper module TimeSeries.pm (Boris) - feature: 71_YAMAHA_NP.pm: Make timer setting more convenient. diff --git a/fhem/FHEM/72_FB_CALLMONITOR.pm b/fhem/FHEM/72_FB_CALLMONITOR.pm index fb896784d..9efbecabc 100755 --- a/fhem/FHEM/72_FB_CALLMONITOR.pm +++ b/fhem/FHEM/72_FB_CALLMONITOR.pm @@ -740,8 +740,9 @@ sub FB_CALLMONITOR_parsePhonebook($$) if($1 ne "intern" and $1 ne "memo") { $number = $2; + $number =~ s/\s//g; $number =~ s/^\+\d\d/0/g; # quick'n'dirty fix in case of international number format. - $number =~ s/\s//g if($number =~ /@/); + if(not $number =~ /^0/ and not $number =~ /@/ and $area_code ne "") {