1 package FS::cdr::avaya_ipo;
4 use vars qw( @ISA %info $tmp_mon $tmp_mday $tmp_year );
12 'name' => 'Avaya IPO',
18 sub { my ($cdr, $info) = @_;
19 my @data = split(/\s+/, $info);
20 my $calldate = $data[4]. " ". $data[5];
22 $cdr->set('calldate', $calldate);
23 $calldate =~ /^(\d{4})\/(\d{2})\/(\d{2})\s*(\d{2}):(\d{2}):(\d{2})$/
24 or die "unparseable date: $calldate";
25 my $tmp_date = "$2/$3/$1 $4:$5:$6";
26 $tmp_date = str2time($tmp_date);
27 $cdr->set('startdate', $tmp_date);
31 sub { my ($cdr, $duration) = @_;
32 my ($hours,$min,$sec) = split(/:/, $duration);
33 my $seconds += ($min * 60)+ ($hours * 60*60) + $sec;
34 $cdr->set('billsec',$seconds);
35 } , # Duration 00:00:00
37 sub { my ($cdr, $info) = @_;
38 my ($src,$ip) = split(/@/,$info);
39 $cdr->set('src',$src);
44 'dst', # Dialed number
45 'accountcode', # Accountcode
47 skip(5), # continuation
48 'disposition',# Party2Device
53 # Amount at Last User Change
55 # Units at Last User Change
63 sub skip { map {''} (1..$_[0]) }