[freeside-commits] branch master updated. 14cf2c4eca10f54271b777a3b150414ea0507e46

Jeremy Davis jeremyd at 420.am
Mon Nov 17 07:47:16 PST 2014


The branch, master has been updated
       via  14cf2c4eca10f54271b777a3b150414ea0507e46 (commit)
      from  cd44a115510c3e0c88b64fe51baaba1e76d0e355 (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 14cf2c4eca10f54271b777a3b150414ea0507e46
Author: Jeremy Davis <jeremyd at freeside.biz>
Date:   Mon Nov 17 10:46:57 2014 -0500

    Ticket #29048 3cx cdr changes

diff --git a/FS/FS/cdr/cx3.pm b/FS/FS/cdr/cx3.pm
index bc511d9..e5b5f03 100644
--- a/FS/FS/cdr/cx3.pm
+++ b/FS/FS/cdr/cx3.pm
@@ -16,18 +16,17 @@ use Date::Parse;
 
 sub {                 
       	my ($cdr, $data, $conf, $param) = @_;
-      	 	$param->{skiprow} = 1 if $data ne 'CallDetail 0'; # skip non-detail records
+      	 	$param->{skiprow} = 1 unless $data =~ 'CallDetail'; # skip non-detail records
 	},		# record type
-	'uniqueid',	# unique id  
-	skip(1),	# unknown
+	skip(2),	# unknown, callid ( not unique )
 	'src',		# source
 	'dst',		# destination
 sub { my ($cdr, $calldate, $param) = @_;
 
-	if ($calldate =~ /^(\d{4})-(\d{2})-(\d{2})\s*(\d{2}):(\d{2}):(\d{2})$/){
+	if ($calldate =~ /^(\d{2})\/(\d{2})\/(\d{4})\s*(\d{2}):(\d{2}):(\d{2})$/){
 
 		$cdr->set('calldate', $calldate);
-                my $tmp_date = "$2/$3/$1 $4:$5:$6";
+                my $tmp_date = "$2/$1/$3 $4:$5:$6";
 
                 $tmp_date = str2time($tmp_date);
                 $cdr->set('startdate', $tmp_date);

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

Summary of changes:
 FS/FS/cdr/cx3.pm |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list