diff options
author | mark <mark> | 2011-08-02 20:57:51 +0000 |
---|---|---|
committer | mark <mark> | 2011-08-02 20:57:51 +0000 |
commit | 9fa60cbce4bb13ef227749706c99c5bf584bbf3e (patch) | |
tree | dfcf1f8af0fe2036c8e5803f6bb5a7b9e980a431 | |
parent | 6578195643791d5cc809155485144649e6cfe307 (diff) |
skip_dst_prefix, #13895
-rw-r--r-- | FS/FS/part_pkg/voip_cdr.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index 5f191f280..292bab654 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -899,6 +899,11 @@ sub check_chargable { if $opt{'ignore_disposition'} =~ /\S/ && grep { $cdr->disposition eq $_ } split(/\s*,\s*/, $opt{'ignore_disposition'}); + foreach(split(/\s*,\s*/, $opt{'skip_dst_prefix'})) { + return "dst starts with '$_'" + if length($_) && substr($cdr->dst,0,length($_)) eq $_; + } + return "carrierid != $opt{'use_carrierid'}" if length($opt{'use_carrierid'}) && $cdr->carrierid ne $opt{'use_carrierid'} #ne otherwise 0 matches '' @@ -912,11 +917,6 @@ sub check_chargable { if length($opt{'ignore_cdrtypenum'}) && $cdr->cdrtypenum eq $opt{'ignore_cdrtypenum'}; #eq otherwise 0 matches '' - foreach(split(',',$opt{'skip_dst_prefix'})) { - return "dst starts with '$_'" - if length($_) && substr($cdr->dst,0,length($_)) eq $_; - } - return "dcontext IN ( $opt{'skip_dcontext'} )" if $opt{'skip_dcontext'} =~ /\S/ && grep { $cdr->dcontext eq $_ } split(/\s*,\s*/, $opt{'skip_dcontext'}); |