diff options
author | mark <mark> | 2011-08-02 20:57:35 +0000 |
---|---|---|
committer | mark <mark> | 2011-08-02 20:57:35 +0000 |
commit | 143ea0473ca61fa5e2d7eea4da3d6b63505cacec (patch) | |
tree | 570dd1d723b1ffce37da13aff227fe17567a5e25 | |
parent | 3d1be41d848ad42d33eeffde23394b7ca76a693e (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 a79928924..fe86f6c37 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -870,6 +870,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 '' @@ -883,11 +888,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'}); |