1 package FS::cdr::thinktel;
4 use base qw( FS::cdr );
5 use FS::cdr qw( _cdr_date_parser_maker _cdr_min_parser_maker );
10 'header' => 1, #0 default, set to 1 to ignore the first line, or
11 # to higher numbers to ignore that number of lines
12 'type' => 'csv', #csv (default), fixedlength or xls
13 'sep_char' => ',', #for csv, defaults to ,
14 'disabled' => 0, #0 default, set to 1 to disable
16 #listref of what to do with each field from the CDR, in order
21 _cdr_date_parser_maker('startdate'),
22 'billsec', # rounded call duration
23 'dcontext', # Usage Type: 'Local', 'Canada', 'Incoming', ...
25 'upstream_src_regionname',
26 'upstream_dst_regionname',
27 '', # upstream rate per minute
29 # raw seconds, to one decimal place
30 sub { my ($cdr, $sec) = @_;
31 $cdr->set('duration', sprintf('%.0f', $sec));
33 # newly added fields of unclear meaning:
34 # Subscription (UUID, seems to correspond to charged_party)
35 # Call Type (always "Normal" thus far)
36 # Carrier (always empty)
37 # Alt Destination Name (always empty)