summaryrefslogtreecommitdiff
path: root/FS/FS/cdr.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-06-28 22:32:23 -0700
committerIvan Kohler <ivan@freeside.biz>2014-06-28 22:32:23 -0700
commit752c8c301644253af3ed8a316e93345bbe016c45 (patch)
treeb0d2774f7d35e915c1cc0e6a29e0dff032ec02fc /FS/FS/cdr.pm
parentd38101d94807b4d7cff6bbff537cabe3b9837f51 (diff)
australian toll-free, RT#29638
Diffstat (limited to 'FS/FS/cdr.pm')
-rw-r--r--FS/FS/cdr.pm7
1 files changed, 6 insertions, 1 deletions
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