(RADIATOR) newbiw question: acctcolumndef

Mike McCauley mikem at open.com.au
Thu Jun 5 01:19:58 CDT 2003


Hello Budi, 

thank you for sending your license details.

The default behaviour of Radiator SQL is to insert the whole of the attribute 
value into the SQL database. From your logs you will see that the NAS is 
sending values like 'h323-disconnect-cause=10'. This is a very silly thing 
for the NAS to do but all Ciscos do it.

If you really need to change this, you have several options:

1. Write a hook that will alter these attributes before they get to AuthBy 
SQL.

2. Change your config to use mysql functions to trim the value in the SQL 
statement, something like this:
AcctColumnDef	H323DISCONNECTCAUSE, %{cisco-h323-disconnect-cause}, formatted, 
substring_index(%s, '=', -1)

You can find more in goodies/voip.txt about dealing with Cisco VOIP attributes 
etc.

Hope that helps.
Cheers

On Thu, 5 Jun 2003 02:47 pm, budi wibowo wrote:
> hi .. i'm new to this mailing list
> i have a problem with accounting to mysql
> i have some reference and i have this on my radius.cfg
> <Realm dbku>
>    AcctLogFileName              %L/detail
>    <AuthBy SQL>
>         DBSource                dbi:mysql:billing
>         DBUsername              xxx
>         DBAuth                  xxxx
>
>         AuthSelect
>         AccountingTable accouting
>         AcctColumnDef
> H323SETUPTIME,cisco-h323-setup-time
>         AcctColumnDef   H323GWID,cisco-h323-gw-id
>         AcctColumnDef   H323CONFID,cisco-h323-conf-id
>         AcctColumnDef
> H323CALLORIGIN,cisco-h323-call-origin
>         AcctColumnDef
> H323CALLTYPE,cisco-h323-call-type
>         AcctColumnDef
> ACCTSESSIONTIME,Acct-Session-Time,integer
>         AcctColumnDef
> H323CONNECTTIME,cisco-h323-connect-time,integer-date
>         AcctColumnDef
> H323DISCONNETTIME,cisco-h323-disconnect-time
>         AcctColumnDef
> H323DISCONNECTCAUSE,cisco-h323-disconnect-cause
>         AcctColumnDef
> H323REMOTEADDRESS,cisco-h323-remote-address
>        AcctColumnDef
> H323REMOTEADDRESS,cisco-h323-remote-address
>         AcctColumnDef   USERNAME,User-Name
>         AcctColumnDef
> ACCTSTATUSTYPE,Acct-Status-Type
>         AcctColumnDef
> CALLEDSTATIONID,Called-Station-Id
>         AcctColumnDef   NASIPADDRESS,NAS-IP-Address
>
>         AcctFailedLogFileName  %L/missedaccounting
>     </AuthBy>
>
> i also have created the table, using trace 4 i get
> something like this
> Thu Jun  5 04:30:11 2003: DEBUG: do query is: insert
> into accouting (NASIPADDRES
> S,H323CONFID,USERNAME,ACCTSESSIONTIME,H323SETUPTIME,H323CALLORIGIN,H323GWID
>,H323
> CONNECTTIME,H323DISCONNETTIME,ACCTSTATUSTYPE,CALLEDSTATIONID,H323CALLTYPE,H
>323RE MOTEADDRESS,H323DISCONNECTCAUSE) values
> ('1.1.1.1','h323-conf-id=6000001
> 9 46F05A14 0E18000C
> 30A85EFD','Irjavgw at dbku',0,'h323-setup-time=*23:50:22.591
> UT
> C Tue Mar 2
> 1993','h323-call-origin=answer','h323-gw-id=ipipgw.','h323-connect-t
> ime=*23:50:23.613 UTC Tue Mar 2
> 1993','h323-disconnect-time=*23:50:23.613 UTC Tu
> e Mar 2
> 1993','Stop','39935048505','h323-call-type=VoIP','h323-remote-address
> =66.68.133.70','h323-disconnect-cause=10')
>
> in this example i have 'h323-disconnect-cause=10' is
> it possible only '10' inserted to mysql?
> if it is possible how'w the syntax at acctcolumndef?
>
>
> rgds
>
> budi
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
> ===
> 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.

-- 
Mike McCauley                               mikem at open.com.au
Open System Consultants Pty. Ltd            Unix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia   http://www.open.com.au
Phone +61 3 9598-0985                       Fax   +61 3 9598-0955

Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS, 
TTLS, PEAP etc on Unix, Windows, MacOS etc.

===
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