Cisco Hack
Chuck
cwbl301 at gmail.com
Thu Jun 5 22:52:35 CEST 2014
Hi,
I’m running freeRadius 3.0.3 with an oracle database. I enabled the cisco hack in preprocess module and it appears to be working for start records, however, for stop records I get an error 'Unknown attribute’ for the dsp-id. Here is a debug snip from a stop record:
Received Accounting-Request Id 125
Cisco-AVPair = 'dsp-id=1/1:1'
Acct-Status-Type = Stop
…..
(6) ERROR: sql : ... isconnect-cause}', DSPID = '%{dsp-id}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}' AND AcctStopTime IS NULL
(6) ERROR: sql : ... ^ Unknown attribute
Here is a debug snip from the start record that works:
Received Accounting-Request Id 120
Cisco-AVPair = 'call-id=DA889581-EC2611E3-8C62BC7B-A853074F at 172.17.8.11'
Acct-Status-Type = Start
……
(1) sql : EXPAND 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, XAscendSessionSvrKey, CallID) VALUES('', '%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port-Id}', '%{NAS-Port-Type}', TO_DATE('%S','yyyy-mm-dd hh24:mi:ss'), NULL, '0', '%{Acct-Authentic}', '%{h323-setup-time}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '0', '%{X-Ascend-Session-Svr-Key}', '%{call-id}’)
Here is the update query from my queries file:
UPDATE ${....acct_table2} \
SET \
AcctStopTime = TO_DATE('%S','yyyy-mm-dd hh24:mi:ss'), \
AcctSessionTime = '%{Acct-Session-Time}', \
AcctInputOctets = '%{Acct-Input-Octets}' + \
('%{%{Acct-Input-Gigawords}:-0}' * 4294967296), \
AcctOutputOctets = '%{Acct-Output-Octets}' + \
('%{%{Acct-Output-Gigawords}:-0}' * 4294967296), \
AcctTerminateCause = '%{Acct-Terminate-Cause}', \
AcctStopDelay = '%{%{Acct-Delay-Time}:-0}', \
ConnectInfo_stop = '%{h323-disconnect-time}', \
ACCTTERMINATECAUSE = '%{h323-disconnect-cause}', \
DSPID = '%{dsp-id}' \
WHERE AcctSessionId = '%{Acct-Session-Id}' \
AND UserName = '%{SQL-User-Name}' \
AND NASIPAddress = '%{NAS-IP-Address}' \
AND AcctStopTime IS NULL"
Is there another place I need to enable the cisco hack?
Thanks!
Chuck
More information about the Freeradius-Users
mailing list