X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcdr%2Ftaqua.pm;h=7ef6d769ae6318c61c98fc8ac9e43adecd9c4b3c;hb=0a9c5d7a2e387f3c30df51fc952725e77ad27c1e;hp=44e2747292508d0d058e3b3a004811268987314e;hpb=1a588ca640701eac6e6f1c9dcd31fdc48d93fc9e;p=freeside.git diff --git a/FS/FS/cdr/taqua.pm b/FS/FS/cdr/taqua.pm index 44e274729..7ef6d769a 100644 --- a/FS/FS/cdr/taqua.pm +++ b/FS/FS/cdr/taqua.pm @@ -7,7 +7,7 @@ use FS::cdr qw(_cdr_date_parser_maker); @ISA = qw(FS::cdr); %info = ( - 'name' => 'Taqua', + 'name' => 'Taqua v6.0', 'weight' => 130, 'header' => 1, 'import_fields' => [ #some of these are kind arbitrary... @@ -16,7 +16,9 @@ use FS::cdr qw(_cdr_date_parser_maker); #RecordType sub { my($cdr, $field, $conf, $hashref) = @_; - $hashref->{skiprow} = 1 unless ($field == 0 && $cdr->disposition == 100); + $hashref->{skiprow} = 1 + unless ($field == 0 && $cdr->disposition == 100 ) #regular CDR + || ($field == 1 && $cdr->lastapp eq 'acctcode'); #accountcode $cdr->cdrtypenum($field); }, @@ -26,7 +28,7 @@ use FS::cdr qw(_cdr_date_parser_maker); sub { my($cdr, $field) = @_; }, #OrigCircuit sub { my($cdr, $field) = @_; }, #OrigCircuitType 'uniqueid', #SequenceNumber - 'accountcode', #SessionNumber + 'sessionnum', #SessionNumber 'src', #CallingPartyNumber #'dst', #CalledPartyNumber #CalledPartyNumber @@ -40,15 +42,15 @@ use FS::cdr qw(_cdr_date_parser_maker); }, #10 - _cdr_date_parser_maker('startdate'), #CallArrivalTime - _cdr_date_parser_maker('enddate'), #CallCompletionTime + _cdr_date_parser_maker('startdate', 'gmt' => 1), #CallArrivalTime + _cdr_date_parser_maker('enddate', 'gmt' => 1), #CallCompletionTime #Disposition #sub { my($cdr, $d ) = @_; $cdr->disposition( $disposition{$d}): }, 'disposition', # -1 => '', # 0 => '', - # 100 => '', + # 100 => '', #regular cdr # 101 => '', # 102 => '', # 103 => '', @@ -57,7 +59,7 @@ use FS::cdr qw(_cdr_date_parser_maker); # 201 => '', # 203 => '', - _cdr_date_parser_maker('answerdate'), #DispositionTime + _cdr_date_parser_maker('answerdate', 'gmt' => 1), #DispositionTime sub { my($cdr, $field) = @_; }, #TCAP sub { my($cdr, $field) = @_; }, #OutboundCarrierConnectTime sub { my($cdr, $field) = @_; }, #OutboundCarrierDisconnectTime @@ -94,10 +96,14 @@ use FS::cdr qw(_cdr_date_parser_maker); return; } } - ''; + if ( $cdr->is_tollfree ) { # thankfully this is already available + $cdr->charged_party($cdr->dst); # and this + } else { + $cdr->charged_party($field); + } }, - sub { my($cdr, $field) = @_; }, #SubscriberNumber + 'subscriber', #SubscriberNumber 'lastapp', #ServiceName sub { my($cdr, $field) = @_; }, #some weirdness #ChargeTime 'lastdata', #ServiceInformation