show Calling-Station-Id on RADIUS reports (as a MAC address w/vendor), RT#29154
[freeside.git] / FS / FS / part_export / sqlradius.pm
index b3daade..5a8da7b 100644 (file)
@@ -48,7 +48,7 @@ tie %options, 'Tie::IxHash',
   },
   'show_called_station' => {
     type  => 'checkbox',
-    label => 'Show the Called-Station-ID on session reports',
+    label => 'Show the Called-Station-ID on session reports', #as a phone number
   },
   'overlimit_groups' => {
       label => 'Radius groups to assign to svc_acct which has exceeded its bandwidth or time limit (if not overridden by overlimit_groups global or per-agent config)', 
@@ -649,6 +649,8 @@ Returns an arrayref of hashrefs with the following fields:
 
 =item acctoutputoctets
 
+=item callingstationid
+
 =item calledstationid
 
 =back
@@ -667,7 +669,7 @@ sub usage_sessions {
     $opt = shift;
     $start    = $opt->{stoptime_start};
     $end      = $opt->{stoptime_end};
-    $svc_acct = $opt->{svc_acct};
+    $svc_acct = $opt->{svc} || $opt->{svc_acct};
     $ip       = $opt->{ip};
     $prefix   = $opt->{prefix};
     $summarize   = $opt->{summarize};
@@ -692,7 +694,7 @@ sub usage_sessions {
   my @fields = (
                  qw( username realm framedipaddress
                      acctsessiontime acctinputoctets acctoutputoctets
-                     calledstationid
+                     callingstationid calledstationid
                    ),
                  "$str2time acctstarttime ) as acctstarttime",
                  "$str2time acctstoptime ) as acctstoptime",
@@ -823,7 +825,7 @@ sub update_svc {
 
     $fs_username = lc($fs_username) unless $conf->exists('username-uppercase');
 
-    #my %search = ( 'username' => $UserName );
+    #my %search = ( 'username' => $fs_username );
 
     my $status = '';
     my $errinfo = "for RADIUS detail RadAcctID $RadAcctId ".