[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm, 1.121, 1.122 voip_inbound.pm, 1.10, 1.11

Erik Levinson levinse at wavetail.420.am
Thu Jun 16 19:48:47 PDT 2011


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

Modified Files:
	voip_cdr.pm voip_inbound.pm 
Log Message:
CDR rating: migrate use_disposition and use_disposition_taqua to disposition_in, RT10991

Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -w -d -r1.121 -r1.122
--- voip_cdr.pm	16 Jun 2011 22:57:04 -0000	1.121
+++ voip_cdr.pm	17 Jun 2011 02:48:44 -0000	1.122
@@ -141,14 +141,6 @@
                         '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: ',
                          },
 
@@ -161,6 +153,9 @@
     '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: ',
     },
 
@@ -275,10 +270,10 @@
                        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
@@ -881,11 +876,10 @@
 
   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
@@ -903,11 +897,9 @@
   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/

Index: voip_inbound.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_inbound.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -d -r1.10 -r1.11
--- voip_inbound.pm	16 Jun 2011 22:57:04 -0000	1.10
+++ voip_inbound.pm	17 Jun 2011 02:48:44 -0000	1.11
@@ -68,14 +68,6 @@
                         '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: ',
                          },
 
@@ -88,6 +80,9 @@
     '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_dcontext' => { 'name' => 'Do not charge for CDRs where the dcontext is set to any of these (comma-separated) values:',
                        },
 
@@ -157,10 +152,10 @@
                        min_charge min_included sec_granularity
                        default_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_dstchannel_prefix
                        skip_dst_length_less skip_lastapp
                        use_duration
@@ -333,11 +328,10 @@
 
   my @opt = qw(
     use_amaflags
-    use_disposition
-    use_disposition_taqua
     use_carrierid
     use_cdrtypenum
     ignore_cdrtypenum
+    disposition_in
     ignore_disposition
     skip_dcontext
     skip_dstchannel_prefix
@@ -352,11 +346,9 @@
   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/



More information about the freeside-commits mailing list