skip_dst_prefix, #13895
authormark <mark>
Tue, 2 Aug 2011 20:57:51 +0000 (20:57 +0000)
committermark <mark>
Tue, 2 Aug 2011 20:57:51 +0000 (20:57 +0000)
FS/FS/part_pkg/voip_cdr.pm

index 5f191f2..292bab6 100644 (file)
@@ -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'});