(RADIATOR) Session database with mysql

tdn at tdn.co.ke tdn at tdn.co.ke
Wed Jan 15 04:22:21 CST 2003


Hello,

Am trying to implement a session database using a mysql database.
My problem is that i notice that there are so many cases when people have
actually logged out, but not
deleted from the database.

(see my database structure and part of my cfg file)

create table radonline (
        username       char(50) NOT NULL,
        nasidentifier   char(50),
         nasipaddress char(15),
        nasport         int,
        acctsessionid   char(30) NOT NULL,
        time_stamp               int,
        framedipaddress          char(15),
        nasporttype              char(10),
        servicetype              char(20),
        calledstationid          char(16),
        callingstationid         char(16),
         usrchassiscallslot       int,
         usrchassiscallchannel    int,

        UNIQUE RADONLINE_I (nasidentifier, username),
        INDEX RADONLINE_I2 (username)
);



cfg file
=========


SessionDatabase SQL>
        Identifier InSQL

        DBSource        dbi:mysql:radonline:1.1.1.1
        DBUsername     xxxx
        DBAuth         xxx


        AddQuery insert into radonline (username, \
                                        nasidentifier, \
                                        nasipaddress, \
                                        nasport, \
                                        acctsessionid, \
                                        time_stamp, \
                                        framedipaddress, \
                                        nasporttype, \
                                        servicetype, \
                                        calledstationid, \
                                        callingstationid, \
                                        usrchassiscallslot, \
                                        usrchassiscallchannel) \
                        values ('%u', \
                                '%N', \
                                '%{NAS-IP-Address}', \
                                0%{NAS-Port}, \
                                '%{Acct-Session-Id}',  \
                                %{Timestamp}, \
                                '%{Framed-IP-Address}', \
                                '%{NAS-Port-Type}', \
                                '%{Service-Type}', \
                                '%{Called-Station-Id}', \
                                '%{Calling-Station-Id}', \
                                0%{USR-Chassis-Call-Slot}, \
                                0%{USR-Chassis-Call-Channel} )

       DeleteQuery delete from radonline where acctsessionid='%4' and
nasipaddress='%2' and username='%u'

       ClearNasQuery    delete from radonline where nasidentifier='%N'

       CountQuery    select
nasidentifier,nasport,acctsessionid,framedipaddress from radonline where
username='%u'
</SessionDatabase>

TDN

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list