summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2008-09-12 22:53:56 +0000
committerivan <ivan>2008-09-12 22:53:56 +0000
commit04cd55e337f3d9408e91ce371ef876e539ef2df5 (patch)
tree441337130f88cb7c8dbb2899edd54a315334e0bf
parentd8bfb28a58b03d246201fa2d1746ee1372edd583 (diff)
just give up and try again tommorow, "1011" came from us not the CDRs anyway, RT#3985
-rw-r--r--FS/FS/part_pkg/voip_cdr.pm20
1 files changed, 5 insertions, 15 deletions
diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm
index a959d1bf2..3ff791c06 100644
--- a/FS/FS/part_pkg/voip_cdr.pm
+++ b/FS/FS/part_pkg/voip_cdr.pm
@@ -79,7 +79,7 @@ tie my %temporalities, 'Tie::IxHash',
# 'type' => 'checkbox',
# },
- 'international_prefix' => { 'name' => 'Destination prefix(es) for international CDR records. Separate multiple options with commas.',
+ 'international_prefix' => { 'name' => 'Destination prefix for international CDR records',
'default' => '011',
},
@@ -219,23 +219,13 @@ sub calc_recur {
# $dest =~ s/\@(.*)$// and $siphost = $1; # @10.54.32.1, @sip.example.com
my $intl = $self->option('international_prefix') || '011';
- my @intl = ();
- if ( $intl =~ /,/ ) {
- @intl = split(/\s*,\s*/, $intl);
- } else {
- @intl = ($intl);
- }
#determine the country code
- my $intl_match = 0;
- foreach my $i (@intl) {
- if ( $number =~ /^$i(((\d)(\d))(\d))(\d+)$/ ) {
- $intl_match++;
- last;
- }
- }
my $countrycode;
- if ( $intl_match || $number =~ /^\+(((\d)(\d))(\d))(\d+)$/ ) {
+ if ( $number =~ /^$intl(((\d)(\d))(\d))(\d+)$/
+ || $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