diff options
author | ivan <ivan> | 2008-10-04 20:43:51 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-10-04 20:43:51 +0000 |
commit | 06dd1a24c0d4ada0daa55da9129278f7ccc935d3 (patch) | |
tree | 56eb39f111b19e3d760e1c460b453a5938d25276 | |
parent | 7d49fd20be0d0756334043439832de923507fa2e (diff) |
add disable_tollfree option
-rw-r--r-- | FS/FS/part_pkg/voip_cdr.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index 64ea20a72..6b27465f8 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -84,6 +84,10 @@ tie my %temporalities, 'Tie::IxHash', 'default' => '011', }, + 'disable_tollfree' => { 'name' => 'Disable automatic toll-free processing', + 'type' => 'checkbox', + }, + 'use_amaflags' => { 'name' => 'Do not charge for CDRs where the amaflags field is not set to "2" ("BILL"/"BILLING").', 'type' => 'checkbox', }, @@ -147,6 +151,7 @@ tie my %temporalities, 'Tie::IxHash', default_prefix disable_src domestic_prefix international_prefix + disable_tollfree use_amaflags use_disposition use_disposition_taqua use_carrierid use_cdrtypenum 411_rewrite @@ -261,7 +266,10 @@ sub calc_recur { } my( $to_or_from, $number ); - if ( $cdr->dst =~ /^(\+?1)?8([02-8])\1/ ) { #tollfree call + if ( $cdr->dst =~ /^(\+?1)?8([02-8])\1/ + && ! $self->option('disable_tollfree') + ) + { #tollfree call $to_or_from = 'from'; $number = $cdr->src; } else { #regular call |