route_type id_tariff cost duration tariff_prefix client_type id_route pdd
costR1 costR2 costR3 costD id_reseller tariffdesc id_cc ratio client_pdd
orig_call_id term_call_id id_callback_call id_cn dialing_plan_prefix
route_type id_tariff cost duration tariff_prefix client_type id_route pdd
costR1 costR2 costR3 costD id_reseller tariffdesc id_cc ratio client_pdd
orig_call_id term_call_id id_callback_call id_cn dialing_plan_prefix
));
#effective_duration/billsec appears from the documentation to be post-minimum time and granularity, calculated on the switch (see p4-5). would probably have weired effects if we then tried to do the same in freeside.
));
#effective_duration/billsec appears from the documentation to be post-minimum time and granularity, calculated on the switch (see p4-5). would probably have weired effects if we then tried to do the same in freeside.
my $cdr = FS::cdr->new({
cdrid => $row->{id_call},
charged_party => sprintf('%.2d', $row->{client_type}).
$row->{id_client},
my $cdr = FS::cdr->new({
cdrid => $row->{id_call},
charged_party => sprintf('%.2d', $row->{client_type}).
$row->{id_client},
src => $row->{caller_id},
dst => $row->{called_number},
startdate => str2time($row->{call_start}),
src => $row->{caller_id},
dst => $row->{called_number},
startdate => str2time($row->{call_start}),
uniqueid => $row->{id_cc},
orig_call_id => $row->{clid},
billsec => $row->{effective_duration},
uniqueid => $row->{id_cc},
orig_call_id => $row->{clid},
billsec => $row->{effective_duration},
disposition => $row->{call_data},
cdrbatchnum => $cdrbatchnum,
disposition => $row->{call_data},
cdrbatchnum => $cdrbatchnum,