diff options
author | ivan <ivan> | 2008-09-12 22:48:20 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-09-12 22:48:20 +0000 |
commit | d8bfb28a58b03d246201fa2d1746ee1372edd583 (patch) | |
tree | b7036b6a869b46855541b07fdc08d9588fcc8531 | |
parent | 3f4b529f158156b31df769eaf4b6055d5948d84a (diff) |
not enough sleep to support multiple internal_prefixen, RT#3985
-rw-r--r-- | FS/FS/part_pkg/voip_cdr.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index dbaf4c42c..a959d1bf2 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -228,8 +228,12 @@ sub calc_recur { #determine the country code my $intl_match = 0; - foreach (@intl) { $number =~ /^$_(((\d)(\d))(\d))(\d+)$/ and do { $intl_match++; last; }; } - + foreach my $i (@intl) { + if ( $number =~ /^$i(((\d)(\d))(\d))(\d+)$/ ) { + $intl_match++; + last; + } + } my $countrycode; if ( $intl_match || $number =~ /^\+(((\d)(\d))(\d))(\d+)$/ ) { |