[freeside-commits] branch master updated. 752c8c301644253af3ed8a316e93345bbe016c45
Ivan
ivan at 420.am
Sat Jun 28 22:32:50 PDT 2014
The branch, master has been updated
via 752c8c301644253af3ed8a316e93345bbe016c45 (commit)
from d38101d94807b4d7cff6bbff537cabe3b9837f51 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 752c8c301644253af3ed8a316e93345bbe016c45
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sat Jun 28 22:32:23 2014 -0700
australian toll-free, RT#29638
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index f402737..bb12ca5 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -5762,6 +5762,16 @@ and customer address. Include units.',
'type' => 'checkbox',
},
+ {
+ 'key' => 'tollfree-country',
+ 'section' => 'telephony',
+ 'description' => 'Country / region for toll-free recognition',
+ 'type' => 'select',
+ 'select_hash' => [ '' => 'NANPA (US/Canada)',
+ 'AU' => 'Australia',
+ ],
+ },
+
{ key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm
index 0771a7b..8113412 100644
--- a/FS/FS/cdr.pm
+++ b/FS/FS/cdr.pm
@@ -368,7 +368,12 @@ to inspect other field.
sub is_tollfree {
my $self = shift;
my $field = scalar(@_) ? shift : 'dst';
- ( $self->$field() =~ /^(\+?1)?8(8|([02-7])\3)/ ) ? 1 : 0;
+ my $country = $conf->config('tollfree-country');
+ if ( $country eq 'AU' ) {
+ ( $self->$field() =~ /^(\+?64)?(800|508)/ ) ? 1 : 0;
+ } else { #NANPA (US/Canaada)
+ ( $self->$field() =~ /^(\+?1)?8(8|([02-7])\3)/ ) ? 1 : 0;
+ }
}
=item set_charged_party
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Conf.pm | 10 ++++++++++
FS/FS/cdr.pm | 7 ++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list