Title: IMPORTANT - multiple accounting records in SQL

Hello Edgar, Hello Everyone -

I have recently come across a clever way to deal with this in the standard AuthBy SQL clause.

Here is what to do (you will need to tweak it for your own requirements):

<AuthBy SQL>
        DBSource .....
        DBUsername .....
        DBAuth .....

        AuthSelect .....
        AuthColumnDef .....
        .....

        AcctSQLStatement delete from ACCOUNTING where \
                USERNAME='%{User-Name}' and \
                ACCTSESSIONID='%{Acct-Session-Id}' and \
                NASIDENTIFIER='%{NAS-IP-Address}'

        AcountingTable ACCOUNTING
        AcctColumnDef .....
        .....
</AuthBy>


NOTE: this only works because the AcctSQLStatement(s) is executed *before* the normal accounting processing.

Thanks to the folks at austar.com.au for the suggestion.

regards

Hugh


At 7:44 +0800 00/11/10, Edgar R Gutierrez wrote:
Hi Hugh,
 
Again, we need your company's help.
We are in the process of providing PREPAID service to the market.
But apparently, from the duplicate logging that is happening, we will be
in a bad position to offer the service now not unless, we come up of a solution
in ensuring that DUPLICATE accounting records are ignored and not logged at all.
 
OUr billing system is currently MYSQL based. This makes it very easy for us to
do real time accounting/billing for our current customers. But unfortunately, like I mentioned,
there are cases wherein our RAS re-sends accounting packets, which RADIATOR (using our postauthhook) eventually
logs to our accounting database.
 
Is there anyway using a hook or an external program, or anything inherent to RADIATOR by which RADIATOR
could ignore or drop the duplicate accounting request before it reaches our POSTAUTHHOOK program.
 
--
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.

Reply via email to