summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2008-09-12 22:48:19 +0000
committerivan <ivan>2008-09-12 22:48:19 +0000
commit3b97735238d919ed548bfb17aea8162623c1d286 (patch)
treecc04d43407bdfd9bfeb15102327368305b97dbf3
parent3d2f5a9f9248bd7187ccfa5075bdc577b70dc7bc (diff)
not enough sleep to support multiple internal_prefixen, RT#3985
-rw-r--r--FS/FS/part_pkg/voip_cdr.pm8
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 cef654021..794ae010f 100644
--- a/FS/FS/part_pkg/voip_cdr.pm
+++ b/FS/FS/part_pkg/voip_cdr.pm
@@ -286,8 +286,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+)$/ ) {