[freeside-commits] branch FREESIDE_3_BRANCH updated. 1df1cb78110f3f47d474fd1496d8485c231fd4b8

Ivan ivan at 420.am
Sat Feb 15 17:30:41 PST 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  1df1cb78110f3f47d474fd1496d8485c231fd4b8 (commit)
      from  ad9229b8b2934caa4af464e26cdb3349fb2e759b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1df1cb78110f3f47d474fd1496d8485c231fd4b8
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Feb 15 17:30:40 2014 -0800

    import public IP in voipswitch CDRs, RT#26228

diff --git a/bin/cdr-voipswitch.import b/bin/cdr-voipswitch.import
index 817c4bc..a8ab9d9 100644
--- 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}),

-----------------------------------------------------------------------

Summary of changes:
 bin/cdr-voipswitch.import |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list