[freeside-commits] branch FREESIDE_3_BRANCH updated. 7fe829b7d746d9be193d70e02090d8984347bc2a
Ivan
ivan at 420.am
Sun Aug 17 15:04:33 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via 7fe829b7d746d9be193d70e02090d8984347bc2a (commit)
from 15deaf0aa18910232f99a38398995b3abc412411 (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 7fe829b7d746d9be193d70e02090d8984347bc2a
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sun Aug 17 15:04:32 2014 -0700
show Calling-Station-Id on RADIUS reports (as a MAC address w/vendor), RT#29154
diff --git a/FS/FS/part_export/sqlradius.pm b/FS/FS/part_export/sqlradius.pm
index 5d84f37..7ec869c 100644
--- a/FS/FS/part_export/sqlradius.pm
+++ b/FS/FS/part_export/sqlradius.pm
@@ -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)',
diff --git a/httemplate/search/sqlradius.cgi b/httemplate/search/sqlradius.cgi
index f7873e7..604f44e 100644
--- a/httemplate/search/sqlradius.cgi
+++ b/httemplate/search/sqlradius.cgi
@@ -13,17 +13,6 @@
% if ( $part_export->option('hide_data') ) {
% delete $efields{$_} foreach qw(acctinputoctets acctoutputoctets);
% }
-% if ( $part_export->option('show_called_station') ) {
-% $efields->Splice(1, 0,
-% 'calledstationid' => {
-% 'name' => 'Destination',
-% 'attrib' => 'Called-Station-ID',
-% 'fmt' =>
-% sub { length($_[0]) ? shift : ' '; },
-% 'align' => 'left',
-% },
-% );
-% }
<FONT CLASS="fsinnerbox-title">
<% $part_export->exportname || $part_export->exporttype |h %>
@@ -384,6 +373,37 @@ tie %fields, 'Tie::IxHash',
},
align => 'right',
},
+ 'callingstationid' => {
+ name => 'Source or MAC',
+ attrib => 'Calling-Station-Id',
+ fmt => sub {
+ my $src = shift;
+ if ( $src =~
+ /^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i ) {
+ return $src. ' ('.
+ (Net::MAC::Vendor::lookup($1))->[0].
+ ')';
+
+ }
+ length($src) ? $src : ' ';
+ },
+ align => 'right',
+ },
+ 'calledstationid' => {
+ name => 'Destination',
+ attrib => 'Called-Station-ID',
+ fmt => sub {
+ my $dst = shift;
+ if ( $dst =~
+ /^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i ) {
+ return $dst. ' ('.
+ (Net::MAC::Vendor::lookup($1))->[0].
+ ')';
+ }
+ length($dst) ? $dst : ' ';
+ },
+ align => 'left',
+ },
'acctstarttime' => {
name => 'Start time',
attrib => 'Acct-Start-Time',
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_export/sqlradius.pm | 2 +-
httemplate/search/sqlradius.cgi | 42 +++++++++++++++++++++++++++++----------
2 files changed, 32 insertions(+), 12 deletions(-)
More information about the freeside-commits
mailing list