[freeside-commits] branch master updated. ff9eaa5810c2ddb8688ae573b372d760679272ed

Jeremy Davis jeremyd at 420.am
Wed Feb 11 09:15:34 PST 2015


The branch, master has been updated
       via  ff9eaa5810c2ddb8688ae573b372d760679272ed (commit)
      from  73d97ad71884ce66b435f0e8d85e5bf99cda3712 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ff9eaa5810c2ddb8688ae573b372d760679272ed
Author: Jeremy Davis <jeremyd at freeside.biz>
Date:   Wed Feb 11 12:14:34 2015 -0500

    Ticket #33144 New format, not a change to the existing one

diff --git a/FS/FS/cdr/cia.pm b/FS/FS/cdr/cia.pm
index 0471e9b..ca44c0f 100644
--- a/FS/FS/cdr/cia.pm
+++ b/FS/FS/cdr/cia.pm
@@ -1,9 +1,8 @@
 package FS::cdr::cia;
 
 use strict;
-use vars qw( @ISA %info $date $tmp_mday $tmp_mon $tmp_year);
+use vars qw( @ISA %info );
 use FS::cdr qw(_cdr_date_parser_maker);
-use Time::Local;
 
 @ISA = qw(FS::cdr);
 
@@ -12,39 +11,26 @@ use Time::Local;
   'weight'        => 510,
   'header'        => 1,
   'type'          => 'csv',
-  'sep_char'      => "|",
+  'sep_char'      => "\t",
   'import_fields' => [
-    'accountcode',
-    skip(2),          # First and last name
-
-    sub { my($cdr, $date) = @_;
-          $date =~ /^(\d{1,2})\/(\d{1,2})\/(\d\d(\d\d)?)$/
-            or die "unparsable date: $date"; #maybe we shouldn't die...
-          ($tmp_mday, $tmp_mon, $tmp_year) = ( $2, $1-1, $3 );
-        }, #Date
-
-    sub { my($cdr, $time) = @_;
-          #my($sec, $min, $hour, $mday, $mon, $year)= localtime($cdr->startdate);
-          $time =~ /^(\d{1,2}):(\d{1,2}):(\d{1,2})$/
-            or die "unparsable time: $time"; #maybe we shouldn't die...
-          $cdr->startdate( timelocal($3, $2, $1 ,$tmp_mday, $tmp_mon, $tmp_year));
-          $cdr->answerdate( timelocal($3, $2, $1 ,$tmp_mday, $tmp_mon, $tmp_year));
-         
-        }, # Start time
-
-    sub { my($cdr, $time) = @_;
-          #my($sec, $min, $hour, $mday, $mon, $year)= localtime($cdr->startdate);
-          $time =~ /^(\d{1,2}):(\d{1,2}):(\d{1,2})$/
-            or die "unparsable time: $time"; #maybe we shouldn't die...
-          #$cdr->startdate( timelocal($3, $2, $1 ,$mday, $mon, $year) );
-          $cdr->enddate(
-            timelocal($3, $2, $1 ,$tmp_mday, $tmp_mon, $tmp_year) ); 
-        }, # End time
-
-    'disposition',    # Disposition
-    'dst',            # PhoneNumber
-    skip(3),          # Extension, Service Type, Filler
-    'src',            # ClientContactID
+    skip(2),          # Reseller Account Number, Confirmation Number
+    'description',    # Conference Name
+    skip(3),          # Organization Name, Bill Code, Q&A Active 
+    'userfield',      # Chairperson Name
+    skip(2),          # Conference Start Time, Conference End Time
+    _cdr_date_parser_maker('startdate'),  # Connect Time
+    _cdr_date_parser_maker('enddate'),    # Disconnect Time
+    skip(1),          # Duration
+    sub { my($cdr, $data, $conf, $param) = @_;
+          $cdr->duration($data);
+          $cdr->billsec( $data);
+    },                # Roundup Duration
+    skip(1),          # User Name
+    'dst',            # DNIS
+    'src',            # ANI
+    skip(2),          # Call Type, Toll Free, 
+    'accountcode',    # Chair Conference Entry Code
+    skip(1),          # Participant Conference Entry Code,
     ],
 
 );
diff --git a/FS/FS/cdr/cia.pm b/FS/FS/cdr/cia_callblast.pm
similarity index 95%
copy from FS/FS/cdr/cia.pm
copy to FS/FS/cdr/cia_callblast.pm
index 0471e9b..d59cd78 100644
--- a/FS/FS/cdr/cia.pm
+++ b/FS/FS/cdr/cia_callblast.pm
@@ -1,4 +1,4 @@
-package FS::cdr::cia;
+package FS::cdr::cia_callblast;
 
 use strict;
 use vars qw( @ISA %info $date $tmp_mday $tmp_mon $tmp_year);
@@ -8,7 +8,7 @@ use Time::Local;
 @ISA = qw(FS::cdr);
 
 %info = (
-  'name'          => 'Client Instant Access',
+  'name'          => 'Client Instant Access Callblast',
   'weight'        => 510,
   'header'        => 1,
   'type'          => 'csv',

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cdr/cia.pm                       |   54 ++++++++++++--------------------
 FS/FS/cdr/{cia.pm => cia_callblast.pm} |    4 +--
 2 files changed, 22 insertions(+), 36 deletions(-)
 copy FS/FS/cdr/{cia.pm => cia_callblast.pm} (95%)




More information about the freeside-commits mailing list