Hello List, I recently installed freeradius 1.0 pre1 with Oracle8i, Ascend MAX. and I found it very very good. Thanks Alan Dekok and all freeradius ppl for such a nice work. I did some changes please suggest, I customize authorize_check_query to :- authorize_check_query ="SELECT 1 as id,e.userid as UserName,'Password' as Attribute,e.password as Value,'==' as op from everyuser e where e.userid='%{SQL-User-Name}' and e.status=0 union SELECT id,UserName,Attribute,Value,op FROM ${authcheck_table} WHERE Username ='{SQL-User-Name}' order by id" Reason=I only need check password/status most of the time thats why I did that.Status will be update from my billing module
and authorize_reply_query to :- authorize_reply_query="Select 1 as id,e.userid,'Session-Timeout',((e.balance-e.usedbalance)/p.onpeakrate)*3600,'==' from everyuser e, packages p where e.userid='%{SQL-User-Name}' and e.policyindex=p.indexptr union SELECT id,UserName,Attribute,Value,op FROM ${authreply_table} WHERE Username = '%{SQL-User-Name}' ORDER BY id" Reason=I don't want to use radacct table too big, so i m not able to use sqlcounter. So I fetch remaining seconds and get in Session-Timeout every time. Usedbalance is updated by my billing module. select * from radgroupreply; For Dialup ID GROUPNAME ATTRIBUTE OP VALUE --- -------------------- ---------------------------------------- -- -------------------- 32 dynamic Service-Type := Framed-User 33 dynamic Framed-Protocol := PPP 34 dynamic Framed-Compression := Van-Jacobsen-TCP-IP 35 dynamic Framed-MTU := 1500 62 dynamic Port-Limit := 1 61 dynamic Nas-Port-Type := Async for ISDN no 'Async' 63 isdn Service-Type := Framed-User 64 isdn Framed-Protocol := PPP 65 isdn Framed-Compression := Van-Jacobsen-TCP-IP 66 isdn Framed-MTU := 1500 67 isdn Port-Limit := 1 select * from radgroupcheck ID GROUPNAME ATTRIBUTE OP VALUE -- -------------------- -------------------------------------- -- ----- 0 dynamic Auth-Type == Sql 1 isdn Auth-Type == Sql I have to use Auth-Type=Local or Auth-Type=Sql ? please suggest. select * from radcheck; ID USERNAME ATTRIBUTE VALUE OP -- ------------------- ------------------ --------------------- -- 2 babar Calling-Station-Id 2315938 == NULLIF is not supported in Oracle 8i SET FramedIPAddress = NULLIF('%{Framed-IP-Address}', ''), \ so I change it to SET FramedIPAddress= CASE WHEN '%{Framed-IP-Address}'='' THEN '' ELSE '%{Framed-IP-Address}' END,\ Actually Im trying to develop usage base,pre-paid, post-paid billing. So I write a billing module which is checking radacct table every 60 seconds and bill the user on basis of hourly + onpeek time/offpeak time/Monthly/Unlimited/ISDN rates, billing module is also checking timelimit expiration of users every half an hour. I used OCI/C code for billing module. Right now i m billing from NAS AcctSessionTime this is correct or I have to use acctStopTime minus acctStartTime ? please suggest. I m deleting radacct entries when i got acctstoptime and when billing is done and storing in another table 'usagedetails'. and using snmp check for multilogin. Please suggest all this is okey ? Thanks once again, Babar Shafiq. ===== God is a great Programmer __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html