Fw: (RADIATOR) SQL Accounting / Radius Attribute Values only

Ross Kusler ross at inreach.com
Sat Jan 19 14:01:40 CST 2002


Robert,

    I know that this question is from awhile back and may be a non-issue
now, however it may still be of help to someone.  If you're using mysql (or
most decent DBMS) you can use case statements in your insert query.  This is
what I'm doing.  I

The query looks something like...


AcctSQLStatement        EXEC sp_RadiusAcctInsert  '0', '%{Acct-Session-Id}',
CASE '%{Acct-Status-Type}' WHEN 'Start' THEN 1 WHEN  'Stop' THEN 2 ELSE NULL
END,
'%{User-Name}','%{Called-Station-Id}','%{Calling-Station-Id}','%c
','%{NAS-Port}','%{NAS-Port-Type}','%{Service-Type}','%{Framed-Protocol}','%
{Framed-IP-Address}',
'%{Connect-Info}','%{Acct-Terminate-Cause}','%{Acct-Input-Octets}','%{Acct-O
utput-Octets}','%{Acct-Session-Time}'

Ross Kusler
Senior Database Administrator
InReach Internet LLC
ross at inreach.com


> ----- Original Message -----
> From: "Robert Blayzor" <noc at inoc.net>
> To: <hugh at open.com.au>
> Cc: <radiator at open.com.au>
> Sent: Friday, January 04, 2002 4:57 AM
> Subject: RE: (RADIATOR) SQL Accounting / Radius Attribute Values only
>
>
> > Correct... If you are using the standard accounting "INSERT ...".  But
> > how would you do it if you need to use:
> >
> >         AcctSQLStatement        EXEC sp_RadiusAcctInsert
> > '0','%{Acct-Session-Id}','%{Acct-Status-
> > Type}','%{User-Name}','%{Called-Station-Id}','%{Calling-Station-Id}','%c
> > ','%{NAS-Port}','%{NAS-Po
> > rt-Type}','%{Service-Type}','%{Framed-Protocol}','%{Framed-IP-Address}',
> > '%{Connect-Info}','%{Acct
> > -Terminate-Cause}','%{Acct-Input-Octets}','%{Acct-Output-Octets}','%{Acc
> > t-Session-Time}'
> >
> >
> > A more advanced SQL statement?
> >
> > --
> > Robert Blayzor, BOFH
> > INOC, LLC
> > rblayzor at inoc.net
> >
> >
> > > -----Original Message-----
> > > From: Hugh Irvine [mailto:hugh at open.com.au]
> > > Sent: Thursday, January 03, 2002 11:38 PM
> > > To: rblayzor at inoc.net; Robert Blayzor
> > > Cc: radiator at open.com.au
> > > Subject: Re: (RADIATOR) SQL Accounting / Radius Attribute Values only
> > >
> > >
> > >
> > > Hello Robert -
> > >
> > > You can do this with AcctColumnDef's:
> > >
> > > AcctColumnDef NASPORT,NAS-Port,integer
> > >
> > > Have a look at section 6.28.13 in the Radiator 2.19 reference manual.
> > >
> >
> > ===
> > Archive at http://www.open.com.au/archives/radiator/
> > Announcements on radiator-announce at open.com.au
> > To unsubscribe, email 'majordomo at open.com.au' with
> > 'unsubscribe radiator' in the body of the message.
> >
>

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list