(RADIATOR) Configuration Understanding

Akhnukh Bashir Khan akhnukh at comcerto.net
Sat Oct 7 04:55:16 CDT 2006


HI,
    Sir I have one query about Configuration of Radiator.
What I want to do is , At time of authentication I want to call hook
which call procedure internally , and that procedure insert record in
User table. from where I have AuthQuery which get user data from table.
 
Now problem is that , I have configured in this way. but in hook each
time I create database connection.and connect it.
 
Can I define database credentional once in configuration file and it
Radiator automatically connect to database. In hook I just call
procedure with out creating connection or I have to do in that way .
         e.g DBSource dbi:ODBC:radius
 
Can you please tell me configuration format.you just tell me what is
best configuration format for this kind of setup rest I will do by my
self.
 
Here is my current configuration file ------------
************************************ CFG file
***************************
 
 

Foreground
LogStdout
LogDir  c:/Program Files/Radiator
DbDir  c:/Program Files/Radiator
Trace   5
 
# You will probably want to change this to suit your site.
<Client DEFAULT>
 Secret mysecret
 DupInterval 0
</Client>
 
#<Realm DEFAULT>
#   PreAuthHook file:"%D\preauthhook.pl" 
#   AuthByPolicy ContinueWhileAccept
#   <AuthBy SQL>
# DBSource dbi:ODBC:radius
# DBUsername sa
# DBAuth sa
# AuthSelect select Password from TblUser where UserName='%n'
#   </AuthBy>
#</Realm>
 
  
  
  
  
<Realm DEFAULT>
 

 PreAuthHook file:"%D\preauthhook.pl"
PasswordLogFileName %L/password.log 
    <AuthBy SQL>
 # Adjust DBSource, DBUsername, DBAuth to suit your DB
 DBSource dbi:ODBC:radius
 DBUsername sa
 DBAuth sa
 
 
 # Only one session per user at a time
 DefaultSimultaneousUse 1
 
 # Let the user in if they have any time left, set
 # the Session-timeout to the time left
 AuthSelect SELECT US_Password, US_CallDuration, US_CallCharges FROM
AAA_TblUserSession where US_UserName='%n' and US_ACTIVE = 1
 AuthColumnDef 0,User-Password,check
 AuthColumnDef 1,cisco-h323-credit-time,reply
 AuthColumnDef 2,cisco-h323-credit-amount,reply
 
 # Adjust the time left when they log out
 AccountingStopsOnly
 AcctSQLStatement update SUBSCRIBERS set
TIMELEFT=TIMELEFT-0%{Acct-Session-Time} where USERNAME='%n'
 
    </AuthBy>
</Realm>
 
*****************************************************
 
 
 

 
 
 
 

Regards,
------------------------
Akhnukh Bashir Khan



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.13.0/464 - Release Date:
10/5/2006
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20061007/e374e20c/attachment.html>


More information about the radiator mailing list