my $row;
while ( $row = $sth->fetchrow_hashref ) {
+ my $ip = $row->{ip_number};
+ if ( $ip =~ /^([\d\.]+)\/([\d\.]*)/ ) {
+ $ip = $1;
+ #$nat_ip = $2;
+ }
+
my $cdr = FS::cdr->new({
cdrid => $row->{id_call},
charged_party => sprintf('%.2d', $row->{client_type}).
$row->{id_client},
- src_ip_addr => $row->{ip_number},
+ src_ip_addr => $ip,
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},
- lastdata => $row->{dtmf},
+ #lastdata => $row->{dtmf},
disposition => $row->{call_data},
cdrbatchnum => $cdrbatchnum,