(RADIATOR) SQL Accounting able to pick up a var from SQL subscribers table?

Hugh Irvine hugh at open.com.au
Wed Jan 16 18:14:18 CST 2002


Hello Justin -

As has already been mentioned on the list (thanks Frank), there is a 
mechanism in the Radius protocol for exactly this purpose. 

The Class attribute can be returned to a NAS in an Access-Accept, and the NAS 
will subsequently include the Class attribute in all accounting requests for 
this session.

In your case you would do something like this:

# define AuthBy clause

<AuthBy SQL>
	......
	AuthSelect select PASSWORD, CID from \
		SUBSCRIBERS where USERNAME = '%n'
	AuthColumnDef 0, Password, check
	AuthColumnDef 1, Class, reply
	.....
	AccountingTable ACCOUNTING
	AcctColumnDef CID, Class 
	......
</AuthBy>


regards

Hugh


On Thu, 17 Jan 2002 05:51, Justin Scott wrote:
> Hi guys,
>
> I have another thing I'm trying to wrap my brain around here, that I can't
> seem to figure out.
>
> My client's reason for choosing Radiator is so that they can seamlessly
> integrate it into their custom billing/accounting package (which is going
> great!)
>
> However, the billing system needs to have a CID (customer ID) associated
> with everything for ease of report generation.
>
> In my SUBSCRIBERS table, I have that CID listed with each individual user. 
> In the ACCOUNTING table, we also have one there.
>
> However, since the Accounting table is generated by radius accounting, I
> can't figure out a way to get that user's CID to propagate to each of their
> records in the accounting table.
>
> I first wondered if maybe I could send this information back to the NAS
> upon replying to the AUTH request, and maybe the NAS could store and
> forward back to the radius auth on radiator when accounting packets are
> handled.  I don't think this will work, will it?
>
> The other that I thought of was maybe to do an AcctSQLStatement before the
> defs for the insert query, but how could I get the returned column for a
> simple statement like:
>
> select CID from SUBSCRIBERS where USERNAME = '%n'
>
> Or similar into a variable that could then be passed back thru the
> AcctColumnDefs into the accounting table?
>
> Thanks for your help! :)
>
> Radiator is truly the most flexible package I have worked with in years. 
> The possibilities seem to be endless!  Keep up the great work!
>
> cheers,
> j
> ===
> 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.

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
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