projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd44a11
)
Ticket #29048 3cx cdr changes
author
Jeremy Davis
<jeremyd@freeside.biz>
Mon, 17 Nov 2014 15:46:57 +0000
(10:46 -0500)
committer
Jeremy Davis
<jeremyd@freeside.biz>
Mon, 17 Nov 2014 15:46:57 +0000
(10:46 -0500)
FS/FS/cdr/cx3.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cdr/cx3.pm
b/FS/FS/cdr/cx3.pm
index
bc511d9
..
e5b5f03
100644
(file)
--- 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) = @_;
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
}, # record type
- 'uniqueid', # unique id
- skip(1), # unknown
+ skip(2), # unknown, callid ( not unique )
'src', # source
'dst', # destination
sub { my ($cdr, $calldate, $param) = @_;
'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);
$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);
$tmp_date = str2time($tmp_date);
$cdr->set('startdate', $tmp_date);