4 use vars qw( @ISA %info );
5 use FS::cdr qw(_cdr_date_parser_maker);
16 # All of these are based on the January 2010 version of the spec,
17 # except that we assume that before all the fields mentioned in the
18 # spec, there's a counter field.
19 skip(4), # counter, id, APCSJursID, RecordType
20 sub { my($cdr, $data, $conf, $param) = @_;
21 $param->{skiprow} = 1 if $data == 1;
22 $cdr->uniqueid($data);
23 }, # CDRID; is 1 for line charge records
24 skip(1), # AccountNumber; empty
25 'charged_party', # ServiceNumber
26 skip(1), # ServiceNumberType
29 'calltypenum', # Jurisdiction: need to remap
30 _cdr_date_parser_maker('startdate'), #TransactionDate
31 skip(3), # BillClass, TypeIDUsage, ElementID
32 'duration', # PrimaryUnits
33 skip(6), # CompletionStatus, Latitude, Longitude,
34 # OriginDescription, TargetDescription, RatePeriod
35 'billsec', # RatedUnits; seems to always be equal to PrimaryUnits
36 skip(6), #SecondsUnits, ThirdUnits, FileID, OriginalExtractSequenceNumber,
37 #RateClass, #ProviderClass
38 skip(8), #ProviderID, CurrencyCode, EquipmentTypeCode, ClassOfServiceCode,
39 #RateUnitsType, DistanceBandID, ZoneClass, CDRStatus
40 'upstream_price', # ISPBuy
41 skip(2), # EUBuy, CDRFromCarrier
46 sub skip { map {''} (1..$_[0]) }