allow "none" as international prefix when all calls have country codes, #41198
authorMark Wells <mark@freeside.biz>
Mon, 16 May 2016 22:02:06 +0000 (15:02 -0700)
committerMark Wells <mark@freeside.biz>
Mon, 16 May 2016 22:03:40 +0000 (15:03 -0700)
FS/FS/cdr.pm
FS/FS/part_pkg/voip_cdr.pm

index 8ccf7af..b3cceb4 100644 (file)
@@ -546,6 +546,9 @@ sub parse_number {
 
   my $field = $options{column} || 'dst';
   my $intl = $options{international_prefix} || '011';
+  # Still, don't break anyone's CDR rating if they have an empty string in
+  # there. Require an explicit statement that there's no prefix.
+  $intl = '' if lc($intl) eq 'none';
   my $countrycode = '';
   my $number = $self->$field();
 
index c1dd522..fa2c02f 100644 (file)
@@ -152,7 +152,7 @@ tie my %accountcode_tollfree_field, 'Tie::IxHash',
 #                                    'type' => 'checkbox',
 #                                  },
 
-    'international_prefix' => { 'name'    => 'Destination prefix for international CDR records',
+    'international_prefix' => { 'name'    => 'Destination prefix for international CDR records (or "none" for no prefix)',
                                 'default' => '011',
                               },