From fa572d76cce0784de0bc15939e6eaf8e06f3f8f6 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Mon, 16 May 2016 15:02:06 -0700 Subject: [PATCH] allow "none" as international prefix when all calls have country codes, #41198 --- FS/FS/cdr.pm | 3 +++ FS/FS/part_pkg/voip_cdr.pm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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', }, -- 2.11.0