[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm,1.97,1.98

Mark Wells mark at wavetail.420.am
Fri Sep 17 12:57:52 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv15031/FS/FS/part_pkg

Modified Files:
	voip_cdr.pm 
Log Message:
cdr.max_callers field and skip option, RT#9810

Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -w -d -r1.97 -r1.98
--- voip_cdr.pm	17 Sep 2010 17:28:47 -0000	1.97
+++ voip_cdr.pm	17 Sep 2010 19:57:50 -0000	1.98
@@ -166,7 +166,7 @@
                                                 },
 
     'accountcode_tollfree_ratenum' => {
-      'name' => 'Optional alternate rate plan when accountcode is toll free',
+      'name' => 'Optional alternate rate plan when accountcode is toll free: ',
       'type' => 'select',
       'select_table'  => 'rate',
       'select_key'    => 'ratenum',
@@ -182,7 +182,10 @@
                                                   'type' => 'checkbox',
                                                 },
 
-    'skip_lastapp' => { 'name' => 'Do not charge for CDRs where the lastapp matches this value',
+    'skip_lastapp' => { 'name' => 'Do not charge for CDRs where the lastapp matches this value: ',
+                      },
+
+    'skip_max_callers' => { 'name' => 'Do not charge for CDRs where max_callers is greater than this value: ',
                       },
 
     'use_duration'   => { 'name' => 'Calculate usage based on the duration field instead of the billsec field',
@@ -199,7 +202,7 @@
                          'default'        => 'default', #XXX test
                        },
 
-    'usage_section' => { 'name' => 'Section in which to place usage charges (whether separated or not)',
+    'usage_section' => { 'name' => 'Section in which to place usage charges (whether separated or not): ',
                        },
 
     'summarize_usage' => { 'name' => 'Include usage summary with recurring charges when usage is in separate section',
@@ -262,6 +265,7 @@
                        skip_dst_length_less
                        noskip_dst_length_accountcode_tollfree
                        skip_lastapp
+                       skip_max_callers
                        use_duration
                        411_rewrite
                        output_format usage_mandate summarize_usage usage_section
@@ -835,6 +839,7 @@
     skip_src_length_more noskip_src_length_accountcode_tollfree
     skip_dst_length_less noskip_dst_length_accountcode_tollfree
     skip_lastapp
+    skip_max_callers
   );
   foreach my $opt (grep !exists($flags{option_cache}->{$_}), @opt ) {
     $flags{option_cache}->{$opt} = $self->option($opt, 1);
@@ -903,6 +908,11 @@
 
   }
 
+  return "max_callers > $opt{skip_max_callers}"
+    if length($opt{'skip_max_callers'})
+      and length($cdr->max_callers)
+      and $cdr->max_callers > $opt{'skip_max_callers'};
+
   #all right then, rate it
   '';
 }



More information about the freeside-commits mailing list