From 3f4b529f158156b31df769eaf4b6055d5948d84a Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 12 Sep 2008 22:38:02 +0000 Subject: [PATCH] not enough sleep to support multiple internal_prefixen, RT#3985 --- FS/FS/part_pkg/voip_cdr.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index 40998cf70..dbaf4c42c 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -227,11 +227,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 -- 2.20.1