Freeradius - MySQL Update problem

musoket at mtn.co.ug musoket at mtn.co.ug
Thu Aug 2 12:20:16 CEST 2007



Hi Claudiu,
Thanks for your response.

Thu, 2 Aug 2007 03:10:24 +0300, you wrote:
>How does your INSERT look like?
>AFAIK, in logs you get something like
>       h323-remote-address = "h323-remote-address=re.mo.te.ip"
>You should use the %{h323-remote-address} variable


That is in fact the variable that I am using in my insert and update
statements but it still doesn't work. See below:


accounting_update_query_alt = "INSERT into ${acct_table1} (AcctSessionId,
AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctSt
artTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets,
AcctOutputOctets, CalledStationId, CallingStationId,
ServiceType,FramedProtocol, FramedIPAddress, AcctStartDelay) 
values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', 
'%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{Cisco-NAS-Port}',
'%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} +
%{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', 
'%{Acct-Authentic}','', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}',
'%{Called-Station-Id}', '%{Calling-Station-Id}', '%{h323-remote-address}',
'%{Framed-Protocol}', '%{h323-remote-address}', '0')"

It appears twice here because I tried putting it in two different columns.

Regards

Timothy.




More information about the Freeradius-Users mailing list