diff options
author | ivan <ivan> | 2008-09-12 22:38:01 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-09-12 22:38:01 +0000 |
commit | 3d2f5a9f9248bd7187ccfa5075bdc577b70dc7bc (patch) | |
tree | f896c18a6c8b9865b1c4753eb78d29596f771c26 | |
parent | b867921af5ae4c795e1e60dac8c89644e385bdef (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, 4 insertions, 4 deletions
diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index 787f052f5..cef654021 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -285,11 +285,11 @@ sub calc_recur { } #determine the country code + my $intl_match = 0; + foreach (@intl) { $number =~ /^$_(((\d)(\d))(\d))(\d+)$/ and do { $intl_match++; last; }; } + my $countrycode; - if ( ( grep { $number =~ /^$_(((\d)(\d))(\d))(\d+)$/ } @intl ) - || $number =~ /^\+(((\d)(\d))(\d))(\d+)$/ - ) - { + if ( $intl_match || $number =~ /^\+(((\d)(\d))(\d))(\d+)$/ ) { my( $three, $two, $one, $u1, $u2, $rest ) = ( $1,$2,$3,$4,$5,$6 ); #first look for 1 digit country code |