summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-05-16 15:02:06 -0700
committerMark Wells <mark@freeside.biz>2016-05-16 15:02:06 -0700
commitfa572d76cce0784de0bc15939e6eaf8e06f3f8f6 (patch)
treebcbc125a0d14dc2dd90f9754d007678ff2a4051f
parent5f26e344a894a65dfa7ccff7d3063e2f20eb0eff (diff)
allow "none" as international prefix when all calls have country codes, #41198
-rw-r--r--FS/FS/cdr.pm3
-rw-r--r--FS/FS/part_pkg/voip_cdr.pm2
2 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm
index 8ccf7af63..b3cceb4aa 100644
--- a/FS/FS/cdr.pm
+++ b/FS/FS/cdr.pm
@@ -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();
diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm
index 7363700ed..be2d15b23 100644
--- a/FS/FS/part_pkg/voip_cdr.pm
+++ b/FS/FS/part_pkg/voip_cdr.pm
@@ -149,7 +149,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',
},