1 package FS::cdr::cia_callblast;
4 use vars qw( @ISA %info $date $tmp_mday $tmp_mon $tmp_year);
5 use FS::cdr qw(_cdr_date_parser_maker);
11 'name' => 'Client Instant Access Callblast',
18 skip(2), # First and last name
20 sub { my($cdr, $date) = @_;
21 $date =~ /^(\d{1,2})\/(\d{1,2})\/(\d\d(\d\d)?)$/
22 or die "unparsable date: $date"; #maybe we shouldn't die...
23 ($tmp_mday, $tmp_mon, $tmp_year) = ( $2, $1-1, $3 );
26 sub { my($cdr, $time) = @_;
27 #my($sec, $min, $hour, $mday, $mon, $year)= localtime($cdr->startdate);
28 $time =~ /^(\d{1,2}):(\d{1,2}):(\d{1,2})$/
29 or die "unparsable time: $time"; #maybe we shouldn't die...
30 $cdr->startdate( timelocal($3, $2, $1 ,$tmp_mday, $tmp_mon, $tmp_year));
31 $cdr->answerdate( timelocal($3, $2, $1 ,$tmp_mday, $tmp_mon, $tmp_year));
35 sub { my($cdr, $time) = @_;
36 #my($sec, $min, $hour, $mday, $mon, $year)= localtime($cdr->startdate);
37 $time =~ /^(\d{1,2}):(\d{1,2}):(\d{1,2})$/
38 or die "unparsable time: $time"; #maybe we shouldn't die...
39 #$cdr->startdate( timelocal($3, $2, $1 ,$mday, $mon, $year) );
41 timelocal($3, $2, $1 ,$tmp_mday, $tmp_mon, $tmp_year) );
44 'disposition', # Disposition
46 skip(3), # Extension, Service Type, Filler
47 'src', # ClientContactID
52 sub skip { map {''} (1..$_[0]) }