From 06dd1a24c0d4ada0daa55da9129278f7ccc935d3 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 4 Oct 2008 20:43:51 +0000 Subject: [PATCH] add disable_tollfree option --- FS/FS/part_pkg/voip_cdr.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.11.0