diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2014-06-28 22:32:57 -0700 | 
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2014-06-28 22:32:57 -0700 | 
| commit | 38c49e73b24608ef28ef8086410d5e594d56f0c4 (patch) | |
| tree | c061c496a6eed239fee925ce4d81c4965998240f | |
| parent | fcd1c0609410626f03936fb46c24d45a9cc61808 (diff) | |
australian toll-free, RT#29638
| -rw-r--r-- | FS/FS/Conf.pm | 10 | ||||
| -rw-r--r-- | FS/FS/cdr.pm | 7 | 
2 files changed, 16 insertions, 1 deletions
| diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index b38b0d7cc..54a9ca392 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -5748,6 +5748,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 0771a7b32..8113412c1 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 | 
