Hello Heikki Thanks for your answer, indeed that was the problem!. Now I can insert in both databases perfect! We're in the middle of the process to upgrade to Radiator 4.9!
Thanks for your support! Regards, Ricardo.- -----Mensaje original----- De: [email protected] [mailto:[email protected]] En nombre de Heikki Vatiainen Enviado el: miércoles, 27 de junio de 2012 17:35 Para: [email protected] Asunto: Re: [RADIATOR] Question about AuthByPolicy anything else and AuthBy SQL On 06/27/2012 11:23 PM, Ricardo Martinez wrote: > I’m using Radiator 3.1.13 Version 3.x is quite old, so you could consider upgrading in case they are more problems. > I have this configuration file : I think the main problem is this: DBusername user The option is slightly incorrect. You should have: DBUsername user Notice the capital U. Radiator should log an error about this when it starts up. Since the parameters are incorrect, it can not initialise DBD::Oracle and Oracle specific string value quoting will fail. This is why you see blanks. Also note that the AcctColumnDefs are not equal in both AuthBys. For example Acct-Input-Octets has 'integer' type in one AuthBy but not in the other. Please let us know if this solves the problem, Heikki > <Handler Request-Type = Accounting-Request, Acct-Status-Type = Stop> > > <AuthBy GROUP> > > AuthByPolicy anything else > > <AuthBy SQL> > > DBSource dbi:Oracle:DEV > > DBusername user > > DBAuth pass > > FailureBackoffTime 60 > > > > AccountingTable VOIPACCOUNTING2 > > AcctColumnDef > LOGGEDAT,%{GlobalVar:DBsysdate},literal > > AcctColumnDef CALL_LEG_SETUP_TIME,h323-setup-time > > AcctColumnDef GATEWAY_IDENTIFIER,h323-gw-id > > AcctColumnDef CONNECTION_ID,h323-conf-id > > AcctColumnDef CALL_LEG_DIRECTION,h323-call-origin > > AcctColumnDef CALL_LEG_TYPE,h323-call-type > > AcctColumnDef > CALL_LEG_CONNECT_TIME,h323-connect-time > > AcctColumnDef > CALL_LEG_DISCONNECT_TIME,h323-disconnect-time > > AcctColumnDef > CALL_LEG_DISCONNECT_CAUSE,h323-disconnect-cause > > AcctColumnDef > REMOTE_GATEWAY_IP_ADDRESS,h323-remote-address > > AcctColumnDef VOICE_QUALITY,h323-voice-quality > > AcctColumnDef USER_NAME,User-Name > > AcctColumnDef CALLED_STATION_ID,Called-Station-Id > > AcctColumnDef > CALLING_STATION_ID,Calling-Station-Id > > AcctColumnDef > ACCT_STATUS_TYPE,Acct-Status-Type,integer > > AcctColumnDef > ACCT_DELAY_TIME,Acct-Delay-Time,integer > > AcctColumnDef > ACCT_INPUT_OCTETS,Acct-Input-Octets,integer > > AcctColumnDef > ACCT_OUTPUT_OCTETS,Acct-Output-Octets,integer > > AcctColumnDef ACCT_SESSION_ID,Acct-Session-Id > > AcctColumnDef > ACCT_SESSION_TIME,Acct-Session-Time,integer > > AcctColumnDef > ACCT_INPUT_PACKETS,Acct-Input-Packets,integer > > AcctColumnDef > ACCT_OUTPUT_PACKETS,Acct-Output-Packets,integer > > AcctColumnDef NAS_PORT_TYPE,NAS-Port-Type,integer > > AcctColumnDef ACCESS_DEVICE,h323-gw-id > > AcctColumnDef > NETWORK_DEVICE_GROUP,Acct-Status-Type,intege > > </AuthBy> > > <AuthBy SQL> > > DBSource dbi:Oracle:SID1 > > DBUsername user > > DBAuth pass > > FailureBackoffTime 60 > > > > AccountingTable VOIPACCOUNTING2 > > AcctColumnDef > LOGGEDAT,%{GlobalVar:DBsysdate},literal > > AcctColumnDef CALL_LEG_SETUP_TIME,h323-setup-time > > AcctColumnDef GATEWAY_IDENTIFIER,h323-gw-id > > AcctColumnDef CONNECTION_ID,h323-conf-id > > AcctColumnDef CALL_LEG_DIRECTION,h323-call-origin > > AcctColumnDef CALL_LEG_TYPE,h323-call-type > > AcctColumnDef > CALL_LEG_CONNECT_TIME,h323-connect-time > > AcctColumnDef > CALL_LEG_DISCONNECT_TIME,h323-disconnect-time > > AcctColumnDef > CALL_LEG_DISCONNECT_CAUSE,h323-disconnect-cause > > AcctColumnDef > REMOTE_GATEWAY_IP_ADDRESS,h323-remote-address > > AcctColumnDef VOICE_QUALITY,h323-voice-quality > > AcctColumnDef USER_NAME,User-Name > > AcctColumnDef CALLED_STATION_ID,Called-Station-Id > > AcctColumnDef > CALLING_STATION_ID,Calling-Station-Id > > AcctColumnDef > ACCT_STATUS_TYPE,Acct-Status-Type,integer > > AcctColumnDef ACCT_DELAY_TIME,Acct-Delay-Time > > AcctColumnDef ACCT_INPUT_OCTETS,Acct-Input-Octets > > AcctColumnDef > ACCT_OUTPUT_OCTETS,Acct-Output-Octets > > AcctColumnDef ACCT_SESSION_ID,Acct-Session-Id > > AcctColumnDef ACCT_SESSION_TIME,Acct-Session-Time > > AcctColumnDef > ACCT_INPUT_PACKETS,Acct-Input-Packets > > AcctColumnDef > ACCT_OUTPUT_PACKETS,Acct-Output-Packets > > AcctColumnDef NAS_PORT_TYPE,NAS-Port-Type,integer > > AcctColumnDef ACCESS_DEVICE,h323-gw-id > > AcctColumnDef > NETWORK_DEVICE_GROUP,Acct-Status-Type,integer > > </AuthBy> > > </AuthBy> > > > > # Log accounting to a detail file. %D is replaced by DbDir > above > > AcctLogFileName %L/acct/%Y/VoIP_Acct_%Y.%m.%d.%q.csv > > > > PostProcessingHook file:"%D/NAS_Stats" > > > > </Handler> > > > > When I see the debug I get this : > > > > Code: Accounting-Request > > Identifier: 169 > > Authentic: <142><223>lD<30><195>[4<30><135>/<155><133><2><204>: > > Attributes: > > NAS-IP-Address = 64.76.155.44 > > User-Name = "51121000537485571" > > Calling-Station-Id = "51121000537485571" > > Called-Station-Id = "02580056974833290" > > Acct-Status-Type = Stop > > Service-Type = Login-User > > Acct-Delay-Time = 0 > > Acct-Session-Id = "376634662D651" > > CALL-ID = > "[email protected]_1" > > Acct-Session-Time = 46 > > cisco-h323-connect-time = "h323-connect-time=16:19:17.895 CMT > Wed Jun 27 2012" > > cisco-h323-disconnect-time = > "h323-disconnect-time=16:20:03.075 > CMT Wed Jun 27 2012" > > cisco-h323-disconnect-cause = "h323-disconnect-cause=10" > > IMSI = "IMSI=730020700332516" > > cisco-h323-setup-time = "h323-setup-time=16:19:09.055 CMT Wed > Jun 27 2012" > > cisco-h323-call-origin = "h323-call-origin=originate" > > cisco-h323-call-type = "h323-call-type=Telephony" > > cisco-h323-conf-id = "h323-conf-id=BD6A EB4F0010 8EF3155C 7E0CBC81" > > cisco-avpair = "h323-incoming-conf-id=0 0 0 0" > > cisco-h323-remote-address = "h323-remote-address=64.76.154.36" > > cisco-avpair = > "[email protected]:5060 > <http://[email protected]:5060>" > > cisco-h323-gw-id = "h323-gw-id=iGate05" > > > > Wed Jun 27 16:20:03 2012: DEBUG: DST: 0 > > Wed Jun 27 16:20:03 2012: DEBUG: Handling request with Handler > 'Request-Type = Accounting-Request, Acct-Status-Type = Stop' > > Wed Jun 27 16:20:03 2012: DEBUG: Deleting session for > 51121000537485571, 64.76.155.44, > > Wed Jun 27 16:20:03 2012: DEBUG: Handling with Radius::AuthGROUP > > Wed Jun 27 16:20:03 2012: DEBUG: Handling with Radius::AuthSQL > > Wed Jun 27 16:20:03 2012: DEBUG: Handling accounting with > Radius::AuthSQL > > Wed Jun 27 16:20:03 2012: DEBUG: do query is: 'insert into > VOIPACCOUNTING2 > (ACCESS_DEVICE,ACCT_DELAY_TIME,ACCT_SESSION_ID,ACCT_SESSION_TIME,ACCT_ > STATUS_TYPE,CALLED_STATION_ID,CALLING_STATION_ID,CALL_LEG_CONNECT_TIME > ,CALL_LEG_DIRECTION,CALL_LEG_DISCONNECT_CAUSE,CALL_LEG_DISCONNECT_TIME > ,CALL_LEG_SETUP_TIME,CALL_LEG_TYPE,CONNECTION_ID,GATEWAY_IDENTIFIER,LO > GGEDAT,NETWORK_DEVICE_GROUP,USER_NAME) > values (,0,,46,2,,,,,,,,,,,sysdate,2,)': > > Wed Jun 27 16:20:03 2012: DEBUG: Handling with Radius::AuthSQL > > Wed Jun 27 16:20:03 2012: DEBUG: Handling accounting with > Radius::AuthSQL > > Wed Jun 27 16:20:03 2012: DEBUG: do query is: 'insert into > VOIPACCOUNTING2 > (ACCESS_DEVICE,ACCT_DELAY_TIME,ACCT_SESSION_ID,ACCT_SESSION_TIME,ACCT_ > STATUS_TYPE,CALLED_STATION_ID,CALLING_STATION_ID,CALL_LEG_CONNECT_TIME > ,CALL_LEG_DIRECTION,CALL_LEG_DISCONNECT_CAUSE,CALL_LEG_DISCONNECT_TIME > ,CALL_LEG_SETUP_TIME,CALL_LEG_TYPE,CONNECTION_ID,GATEWAY_IDENTIFIER,LO > GGEDAT,NETWORK_DEVICE_GROUP,USER_NAME) > values > ('iGate05','0','376634662D651','46',2,'02580056974833290','51121000537 > 485571','16:19:17.895 CHILE Wed Jun 27 > 2012','originate','10','16:20:03.075 CMT Wed Jun 27 > 2012','16:19:09.055 CMT Wed Jun 27 2012','Telephony','BD6A EB4F0010 > 8EF3155C 7E0CBC81','iGate05',sysdate,2,'51121000537485571')': > > Wed Jun 27 16:20:03 2012: DEBUG: AuthBy GROUP result: ACCEPT, > > Wed Jun 27 16:20:03 2012: DEBUG: Accounting accepted > > * * > > * * > > *Why the first insert does not have all the values ???????* > > * * > > * * > > * * > > *Regards,* > > *Ricardo.-* > > > > _______________________________________________ > radiator mailing list > [email protected] > http://www.open.com.au/mailman/listinfo/radiator -- Heikki Vatiainen <[email protected]> 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, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP, DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc. _______________________________________________ radiator mailing list [email protected] http://www.open.com.au/mailman/listinfo/radiator _______________________________________________ radiator mailing list [email protected] http://www.open.com.au/mailman/listinfo/radiator
