projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ad9229b
)
import public IP in voipswitch CDRs, RT#26228
author
Ivan Kohler
<ivan@freeside.biz>
Sun, 16 Feb 2014 01:30:40 +0000
(17:30 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Sun, 16 Feb 2014 01:30:40 +0000
(17:30 -0800)
bin/cdr-voipswitch.import
patch
|
blob
|
history
diff --git
a/bin/cdr-voipswitch.import
b/bin/cdr-voipswitch.import
index
817c4bc
..
a8ab9d9
100644
(file)
--- a/
bin/cdr-voipswitch.import
+++ b/
bin/cdr-voipswitch.import
@@
-121,11
+121,17
@@
my $imported = 0;
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}),