Hello Budi -
Can you tell me exactly what you want to do? I am not clear on what you want to have happen.
The simplest way to carry information between AuthBy clauses is to add it to the incoming request packet which can be used as a scratch-pad area for this purpose.
regards
Hugh
On Friday, Jun 13, 2003, at 18:32 Australia/Melbourne, budi wibowo wrote:
i have made other AuthBy SQL <AuthBy SQL> DBSource dbi:mysql:bill DBUsername xxx DBAuth xxxx AccountingTable accounting AcctSQLStatement update set time_bill=ceiling(acctsessiontime/60) </AuthBy>
i'm confused about one thing at second AuthBy SQL which paramater should i take Acct-Session-Time (from cisco)or acctsessiontime (from mysql table) after first AuthBy SQL is executed is the value inserted to mysql immediately? so when second AuthBySQL executed i can get the data from mysql table
rgds
budi
--- Hugh Irvine <[EMAIL PROTECTED]> wrote:h323setuptime,%{cisco-h323-setup-time},formatted,substri
Hello Budi -
You should use two AuthBy SQL clauses with the AcctSQLStatement(s) in the second one.
Alternatively you could possibly use a hook (there are some examples in "goodies/hooks.txt").
regards
Hugh
On Thursday, Jun 12, 2003, at 18:21 Australia/Melbourne, budi wibowo wrote:
executedok here we go from trace 4 result .. AcctSQLStatement isfirst time before i got the paramater from AcctColumnDef. that makes the value always 0 any idea to make AcctSQLStatement executed after AcctColumnDef?
<AuthBy SQL> DBSource dbi:mysql:bill DBUsername xx DBAuth yyy
AuthSelect AccountingTable accounting AcctColumnDef
h323gwid,%{cisco-h323-gw-id},formatted,substring_index(%ng_index(%s, '=',-1) AcctColumnDef
h323confid,%{cisco-h323-conf-id},formatted,substring_inds, '=',-1) AcctColumnDef
h323callorigin,%{cisco-h323-call-origin},formatted,substex(%s, '=',-1) AcctColumnDef
h323calltype,%{cisco-h323-call-type},formatted,substringring_index(%s, '=',-1) AcctColumnDef
h323connecttime,%{cisco-h323-connect-time},formatted,sub_index(%s, '=',-1) AcctColumnDef acctsessiontime,Acct-Session-Time,integer AcctColumnDef
h323disconnecttime,%{cisco-h323-disconnect-time},formattstring_index(%s, '=',-1) AcctColumnDef
h323disconnectcause,%{cisco-h323-disconnect-cause},formaed,substring_index(%s, '=',-1) AcctColumnDef
h323remoteaddress,%{cisco-h323-remote-address},formattedtted,substring_index(%s, '=',-1) AcctColumnDef
(acctsessiontime,h323callorigin,h323connecttime,h323calltype,acctstatusnasipaddress,NAS-IP-Address,substring_index(%s, '=',-1) AcctColumnDef username,User-Name AcctColumnDef acctstatustype,Acct-Status-Type AcctColumnDef calledstationid,Called-Station-Id AcctColumnDefaccountingAcctSQLStatement update set time_bill=ceiling(%{Acct-Session-Time}/60)
</AuthBy>
trace 4 result:
Thu Jun 12 08:16:42 2003: DEBUG: Handling with Radius::AuthSQL Thu Jun 12 08:16:42 2003: DEBUG: Handlingupdatewith Radius::AuthSQL Thu Jun 12 08:16:42 2003: DEBUG: do query is:set time_bill=ceiling(0/60)'update
Thu Jun 12 08:16:42 2003: ERR: do failed foratset time_bill=ceiling(0/60)': You have an error in your SQL syntax near 'set time_bill=ceiling(0/60)''updateline 1 Thu Jun 12 08:16:42 2003: ERR: do failed foratset time_bill=ceiling(0/60)': You have an error in your SQL syntax near 'set time_bill=ceiling(0/60)'insertline 1 Thu Jun 12 08:16:42 2003: DEBUG: do query is:into accounting
type,h323confid,calledstationid,username,h323gwid,nasipaddress,h323remo
teaddress,h323setuptime,h323disconnectcause,h323disconnecttime)
'=',-1),substring_index('h323-connect-time=.08:16:19.226values(0,substring_index('h323-call-origin=answer',
'=',-1),'Stop',substring_index('h323-conf-id=F2564005UTC Thu Jun 12 2003', '=',-1),substring_index('h323-call-type=VoIP',
'=',-1),'37373762771315886','[EMAIL PROTECTED]',substring_index('h323-gw-6DED1810 95BD00E0 4C8CA47E',
'=',-1),'211.152.187.134',substring_index('h323-remote-
id=ipipgw.',
'=',-1),substring_index('h323-setup-time=.08:15:43.031
address=211.152.187.133',
'=',-1),substring_index('h323-disconnect-time=.08:16:19.226UTC Thu Jun 12 2003','=',-1),substring_index('h323-disconnect-cause=10',
=== message truncated ===UTC Thu Jun 12 2003', '=',-1))configuration
--- Hugh Irvine <[EMAIL PROTECTED]> wrote:
Hello Budi -
Can you please send me a copy of yourshowingfile (no secrets) together with a trace 4 debug from RadiatorSQLwhat is happening. I will also need to see a copy of the relevanttryingrecords.
In general you should test your SQL queries interactively with whatever tools are available with your database beforeto Outlook(TM).to use them in the Radiator configuration file.
regards
Hugh
__________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with synchttp://calendar.yahoo.com
NB: have you included a copy of your configuration file (no secrets), together with a trace 4 debug showing what is happening?
-- Radiator: the most portable, flexible and configurable RADIUS server anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X. - Nets: internetwork inventory and management - graphical, extensible, flexible with hardware, software, platform and database independence.
===
__________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com
NB: have you included a copy of your configuration file (no secrets), together with a trace 4 debug showing what is happening?
-- Radiator: the most portable, flexible and configurable RADIUS server anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X. - Nets: internetwork inventory and management - graphical, extensible, flexible with hardware, software, platform and database independence.
=== Archive at http://www.open.com.au/archives/radiator/ Announcements on [EMAIL PROTECTED] To unsubscribe, email '[EMAIL PROTECTED]' with 'unsubscribe radiator' in the body of the message.