diff options
author | Jeremy Davis <jeremyd@freeside.biz> | 2014-11-17 10:46:57 -0500 |
---|---|---|
committer | Jeremy Davis <jeremyd@freeside.biz> | 2014-11-17 10:46:57 -0500 |
commit | 14cf2c4eca10f54271b777a3b150414ea0507e46 (patch) | |
tree | 86a51db1bfeb593898d1de4c5b7343a72b34a7f9 /FS/FS/cdr/cx3.pm | |
parent | cd44a115510c3e0c88b64fe51baaba1e76d0e355 (diff) |
Ticket #29048 3cx cdr changes
Diffstat (limited to 'FS/FS/cdr/cx3.pm')
-rw-r--r-- | FS/FS/cdr/cx3.pm | 9 |
1 files changed, 4 insertions, 5 deletions
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); |