1 package FS::cdr::enswitch;
4 use vars qw( @ISA %info $tmp_mon $tmp_mday $tmp_year );
6 use FS::cdr qw(_cdr_min_parser_maker);
16 'disposition', #Status
17 'startdate', #Start, already a unix timestamp
18 skip(2), #Start date, Start time
20 skip(4), #End date, End time
21 #Calling customer, Calling type
22 'src', #Calling number
26 skip(5), #Destination customer, Destination type
28 #Destination group ID, Destination group name,
29 'in_calling_type', #Inbound calling type,
30 \&in_calling_num, #Inbound calling number,
31 '', #Inbound called type,
32 \&in_called_num, #Inbound called number,
34 #Inbound destination type, Inbound destination number,
35 #Outbound calling type, Outbound calling number,
36 #Outbound called type, Outbound called number,
37 #Outbound destination type, Outbound destination number,
38 #Internal calling type, Internal calling number,
39 #Internal called type, Internal called number,
40 #Internal destination type, Internal destination number
41 'duration', #Total seconds
42 skip(1), #Ring seconds
43 'billsec', #Billable seconds
44 'upstream_price', #Cost
45 'accountcode', #Billing customer
46 skip(3), #Billing customer name, Billing type, Billing reference
50 sub skip { map {''} (1..$_[0]) }
53 my ($record, $data) = @_;
54 $record->src($data) if ( ($record->in_calling_type || '') eq 'external' );
58 my ($record, $data) = @_;
59 $record->dst($data) if ( ($record->in_calling_type || '') eq 'external' );