With every vendor making up there own Attributes and Values 
it has me wondering how whether any one has a simple solution 
to putting all the similar Attributes into the acctterminatecause
field. I have been thinking that I would use :
%{Acct-Terminate-Cause}:-%{Ascend-Disconnect-Cause}:-%{Cisco-Disconnect-
Cause}

I am not sure if this would need brackets or if there is a better 
way. So far I will only need these three, for that entry.

There are other entries that will likely need to be mapped as well 
but I have not yet researched them.

The custom Cistron I wrote allows me to map as many Radius 
Attributes as I want to a sql attribute. In my system I just 
put 

#START#
...
Acct-Terminate-Cause    = Acct-Terminate-Cause  : Text  # 
Ascend-Disconnect-Cause = Acct-Terminate-Cause  : Text  # 
Cisco-Disconnect-Cause  = Acct-Terminate-Cause  : Text  # 
...
#END#

The automatic table create/update function, accumulates all 
the distinct SQL attributes, and creates one column per 
Attribute, or adds any new columns to an existing table.

Unfortunately the code I wrote was not abstracted in any 
way, and may be difficult to make work with MySQL, since 
I only had PostgreSQL in mind when writing it.

PS: Can XLAT be used to generate SQL table names ?
My current system generates configured table names such as :

acct_%{Acct-Session-Type}_%Y%b

So every month I get 3 tables :
Eg:
acct_start_2005apr , acct_stop_2005apr , acct_other_2005apr

Acct-Session-Type is a special case, only Start and Stop 
Tables are Created anything else is sent to the Other table 
along with any duplicate log entries. Any failed entries 
are saved in a cache file, that is monitored. I had one 
entry over a year ago, that was caused by an entry that 
had a byte count > 2GB that was being put into an int4.
I updated the attribute map to use "bigint", but haven't 
had anything that large since.




- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to