4 use vars qw(@ISA %info);
5 use FS::cdr qw(_cdr_date_parser_maker);
12 'type' => 'fixedlength',
13 'fixedlength_format' => [qw(
15 MasterAccountID:12:4:15
19 CallDateStartTime:14:58:71
21 CalculatedSeconds:12:73:84
26 CallDirection:1:178:178
27 CallIndicator:1:179:179
28 ReportIndicator:1:180:180
34 DialedNumber:18:237:254
35 DisplayNumber:18:255:272
36 RecordSource:1:273:273
37 LECInfoDigits:2:274:275
42 OrigCircuit:12:289:300
43 OrigTrunkGroupCLLI:12:301:312
48 TermCircuit:12:326:337
49 TermTrunkGroupCLLI:12:338:349
52 # at least that's how they're defined in the spec we have.
53 # the real CDRs have several differences.
55 '', #CDRType (for now always 'V')
58 'charged_party', #BillToNumber
59 'accountcode', #AccountCode
60 _cdr_date_parser_maker('startdate'),
62 '', #TimeOfDay (always 'S')
63 sub { #CalculatedSeconds
71 'upstream_price', #Charges
74 $cdr->set('direction', $dir);
76 $cdr->set('src', $cdr->charged_party);
77 } elsif ( $dir eq 'I' ) {
78 $cdr->set('dst', $cdr->charged_party);
81 '', #CallIndicator #calltype?
84 # it appears that it's the "other" number, not necessarily ANI.
85 my ($cdr, $number) = @_;
86 if ( $cdr->direction eq 'O' ) {
87 $cdr->set('dst', $number);
88 } elsif ( $cdr->direction eq 'I' ) {
89 $cdr->set('src', $number);