Hy all, i use freeradius 1.1.3 here is my problem: i use radiusaccounting into a mysql database. I want to extract information out of the accounting packet and insert it into the sql database: My Acct-Session-Id looks like this. Acct-Session-Id = "domain\\user"Thu Mar 1 14:29:58 2007"NC" the last field, here NC is one of this NC|WSAM|JSAM So i put this to acct_users: DEFAULT Acct-Session-Id =~ "^.*(NC|JSAM|WSAM).*" My-ST == `%{1}` My-ST is defined in dictionary ATTRIBUTE My-ST 3004 string i see that rad_xlat gives the correct value to My-ST but i cant use it in the sql statement. Its empty. acct_users: Matched entry DEFAULT at line 23 radius_xlat: 'WSAM' How can i define new Attributes? And use them in sql.conf Thanks a lot
markus.wintruff@linde.com wrote:
So i put this to acct_users:
DEFAULT Acct-Session-Id =~ "^.*(NC|JSAM|WSAM).*" My-ST == `%{1}`
Please read "man users". You are putting the attribute in the reply list. You are using "==", which is a comparison operator, rather than "='.
i see that rad_xlat gives the correct value to My-ST but i cant use it in the sql statement. Its empty.
acct_users: Matched entry DEFAULT at line 23 radius_xlat: 'WSAM'
How can i define new Attributes? And use them in sql.conf
Read doc/variables.txt If you fix the operator to '=', you can probably reference it in the SQL statement as %{reply:My-ST}. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
participants (2)
-
Alan DeKok -
markus.wintruff@linde.com