4 use vars qw( @ISA %info);
18 my ($cdr, $data, $conf, $param) = @_;
19 $param->{skiprow} = 1 unless $data =~ 'CallDetail'; # skip non-detail records
21 skip(2), # unknown, callid ( not unique )
24 sub { my ($cdr, $calldate, $param) = @_;
26 if ($calldate =~ /^(\d{2})\/(\d{2})\/(\d{4})\s*(\d{2}):(\d{2}):(\d{2})$/){
28 $cdr->set('calldate', $calldate);
29 my $tmp_date = "$2/$1/$3 $4:$5:$6";
31 $tmp_date = str2time($tmp_date);
32 $cdr->set('startdate', $tmp_date);
35 sub { my ($cdr, $duration) = @_;
37 my ($hour,$min,$sec) = split(/:/,$duration);
39 $sec += $hour * 60 * 60;
40 $sec = sprintf ("%.0f", $sec);
41 $cdr->set('billsec', $sec);
45 'disposition', # call status
46 'accountcode', # AccountCode
51 sub skip { map {''} (1..$_[0]) }