'type' => 'checkbox',
},
- 'use_disposition' => { 'name' => 'Do not charge for CDRs where the disposition flag is not set to "ANSWERED".',
- 'type' => 'checkbox',
- },
-
- 'use_disposition_taqua' => { 'name' => 'Do not charge for CDRs where the disposition is not set to "100" (Taqua).',
- 'type' => 'checkbox',
- },
-
'use_carrierid' => { 'name' => 'Do not charge for CDRs where the Carrier ID is not set to: ',
},
'ignore_disposition' => { 'name' => 'Do not charge for CDRs where the Disposition is set to any of these (comma-separated) values: ',
},
+
+ 'disposition_in' => { 'name' => 'Do not charge for CDRs where the Disposition is not set to any of these (comma-separated) values: ',
+ },
'skip_dst_prefix' => { 'name' => 'Do not charge for CDRs where the destination number starts with any of these values: ',
},
disable_src
domestic_prefix international_prefix
disable_tollfree
- use_amaflags use_disposition
- use_disposition_taqua use_carrierid
+ use_amaflags
+ use_carrierid
use_cdrtypenum ignore_cdrtypenum
- ignore_disposition
+ ignore_disposition disposition_in
skip_dcontext skip_dst_prefix
skip_dstchannel_prefix skip_src_length_more
noskip_src_length_accountcode_tollfree
my @opt = qw(
use_amaflags
- use_disposition
- use_disposition_taqua
use_carrierid
use_cdrtypenum
ignore_cdrtypenum
+ disposition_in
ignore_disposition
skip_dst_prefix
skip_dcontext
return 'amaflags != 2'
if $opt{'use_amaflags'} && $cdr->amaflags != 2;
- return 'disposition != ANSWERED'
- if $opt{'use_disposition'} && $cdr->disposition ne 'ANSWERED';
-
- return "disposition != 100"
- if $opt{'use_disposition_taqua'} && $cdr->disposition != 100;
+ return "disposition NOT IN ( $opt{'disposition_in'} )"
+ if $opt{'disposition_in'} =~ /\S/
+ && !grep { $cdr->disposition eq $_ } split(/\s*,\s*/, $opt{'disposition_in'});
return "disposition IN ( $opt{'ignore_disposition'} )"
if $opt{'ignore_disposition'} =~ /\S/