1 package FS::cdr::conexiant;
2 use base qw( FS::cdr );
6 use FS::Record qw( qsearchs );
7 use FS::cdr qw( _cdr_date_parser_maker _cdr_min_parser_maker );
10 'name' => 'Conexiant',
15 skip(3), #LookupError,Direction,LegType
17 my($cdr,$value,$conf,$param) = @_;
18 #filter out already-imported cdrs here
19 if (qsearchs('cdr',{'uniqueid' => $value})) {
20 $param->{'skiprow'} = 1;
21 $param->{'unique_skip'} = 1; #tell batch_import why we're skipping
23 $cdr->uniqueid($value);
26 'upstream_rateplanid', #ClientRateSheetId
27 skip(1), #ClientRouteId
32 _cdr_date_parser_maker('startdate'), #CreatedOn
33 _cdr_date_parser_maker('answerdate'), #AnsweredOn
34 _cdr_date_parser_maker('enddate'), #HangupOn
35 skip(4), #CallCause,SipCode,Price,USFCharge
36 'upstream_price', #TotalPrice
37 _cdr_min_parser_maker('billsec'), #PriceDurationMins
38 skip(2), #SipEndpointId, SipEndpointName
42 sub skip { map {''} (1..$_[0]) }