[freeside-commits] branch FREESIDE_3_BRANCH updated. 6f69bfdda85327ac9d15322e243b5a357853244f

Ivan Kohler ivan at freeside.biz
Wed Apr 21 14:59:46 PDT 2021


The branch, FREESIDE_3_BRANCH has been updated
       via  6f69bfdda85327ac9d15322e243b5a357853244f (commit)
      from  04d613ce3a2f51e90e4a103e28ce0e0858e8169e (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 6f69bfdda85327ac9d15322e243b5a357853244f
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Apr 21 14:59:46 2021 -0700

    fix TeleAPI import (what kind of crack was Christopher smoking that he couldn't fix this for years?), RT#85784

diff --git a/FS/FS/cdr/telapi_voip.pm b/FS/FS/cdr/telapi_voip.pm
index 687c431a8..c238d2a17 100644
--- a/FS/FS/cdr/telapi_voip.pm
+++ b/FS/FS/cdr/telapi_voip.pm
@@ -2,27 +2,31 @@ package FS::cdr::telapi_voip;
 use base qw( FS::cdr );
 
 use strict;
-use vars qw( @ISA %info $CDR_TYPES );
-use FS::Record qw( qsearch );
-use FS::cdr qw( _cdr_date_parser_maker _cdr_min_parser_maker );
+use vars qw( %info );
+use FS::cdr qw( _cdr_date_parser_maker );
 
 %info = (
-  'name'          => 'telapi_voip (csv file)',
+  'name'          => 'TeleAPI VoIP (CSV file)',
   'weight'        => 601,
   'header'        => 1,
   'type'          => 'csv',
   'import_fields' => [
-    skip(1),                              # Inbound/Outbound
-    _cdr_date_parser_maker('startdate'),  # date
-    skip(1),                              # cost per minute
-    'upstream_price',                     # call cost
-    'billsec',                            # duration
-    'src',                                # source
-    'dst',                                # destination
-    skip(1),                              # hangup code
+    _cdr_date_parser_maker('startdate', 'gmt'=>1 ),  # date gmt
+    'src',                                           # source
+    'dst',                                           # destination
+    'clid',                                          # callerid
+    'disposition',                                   # hangup code
+    'userfield',                                     # sip account
+    'src_ip_addr',                                   # orig ip
+    'billsec',                                       # duration
+    skip(1),                                  # per minute (add "upstream_rate"?
+    'upstream_price',                                # call cost
+    'dcontext',                                      # type
+    'uniqueid',                                      # uuid
+    'lastapp',                                       # direction
   ],
 );
 
 sub skip { map {''} (1..$_[0]) }
 
-1;
\ No newline at end of file
+1;

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

Summary of changes:
 FS/FS/cdr/telapi_voip.pm | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)




More information about the freeside-commits mailing list