X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcdr.pm;h=9859dfade5e28928d29689a01526b0da5d52fb2f;hb=1dbab258aed2f501761d69a2afcdf6b977721dfe;hp=cced0eb9053b1c306e01e9af4a437d7c21d3cd5a;hpb=3ed189ae0f3d1a6fd082fe8d53d888dc4cd57ad2;p=freeside.git diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index cced0eb90..9859dfade 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -368,8 +368,10 @@ to inspect other field. sub is_tollfree { my $self = shift; my $field = scalar(@_) ? shift : 'dst'; - my $country = $conf->config('tollfree-country'); + my $country = $conf->config('tollfree-country') || ''; if ( $country eq 'AU' ) { + ( $self->$field() =~ /^(\+?61)?(1800|1300)/ ) ? 1 : 0; + } elsif ( $country eq 'NZ' ) { ( $self->$field() =~ /^(\+?64)?(800|508)/ ) ? 1 : 0; } else { #NANPA (US/Canaada) ( $self->$field() =~ /^(\+?1)?8(8|([02-7])\3)/ ) ? 1 : 0;