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:03:05 -0700
commitb238c8cf058e5ee1df637ffe97b79948ff5f1853 (patch)
tree28e4ce551f2fec76458607797483133168d9a744
parentd5df4bcae22fc17e7c4ef11df6f6b9353a4db2dd (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',
},