[RADIATOR] Question about AuthByPolicy anything else and AuthBy SQL
    Ricardo Martinez 
    rmartinez at redvoiss.net
       
    Wed Jun 27 15:23:11 CDT 2012
    
    
  
Hello.
I’m using Radiator 3.1.13
I have this configuration file :
<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 =
"CALL-ID=d87f4f4e-ef90-42ab-cbd2-0002a4051f26 at 10.104.57.2-b2b_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 = "h323-remote-id=51121000537485571 at 64.76.154.149: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,LOGGEDAT,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,LOGGEDAT,NETWORK_DEVICE_GROUP,USER_NAME)
values
('iGate05','0','376634662D651','46',2,'02580056974833290','51121000537485571','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.-*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open.com.au/pipermail/radiator/attachments/20120627/7a82a7eb/attachment-0001.html 
    
    
More information about the radiator
mailing list