Aleksandr Kuzminsky wrote: > > On Wed, 16 Jan 2002, Do-Risika RAFIEFERANTSIARONJY wrote: > > > * can I add some attributes (already in the dictionary such as DataRate > > or XMitRate) into the radacct table ? I think of modifying the table and > > the accounting queries in the radiusd.conf but I'm not sure it would > > work ... > Yes. I did so. I had a look to the detail files, and added some attributes > to radacct table.
Ok, so I added three attributes in my radacct table : AcctMultiSessionId, AscendDataRate and XmitDataRate, and i modified the accounting_stop_query and accounting_stop_query_alt in my sql.conf as that. It's really what I need, but what should happen if some of these attributes are not provided by the nas ? (because some of our nas provides Ascend-Data-Rate, but the others no ...) -- here are my accounting_stop_queries -- accounting_stop_query = "UPDATE ${acct_table1} SET AcctStopTime = '%S', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}', AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}', AcctMultiSessionId = '%{Acct-Multi-Session-Id}', AscendDataRate = '%{Ascend-Data-Rate}', AscendXmitRate = '%{Ascend-Xmit-Rate}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'" accounting_stop_query_alt = "INSERT into radacct (RadAcctId, AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay, AcctMultiSessionId, AscendDataRate, AscendXmitRate) values('', '%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port-Id}', '%{NAS-Port-Type}', '0', '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}', '%{Acct-Multi-Session-Id}', '%{Asce\ nd-Data-Rate}', '%{Ascend-Xmit-Rate}')" @+ -- DouRiX - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html