Hi..
Thank you Sir, I'll try to use the existing identifier on <AuthBy SQL> clause.


Regards,







-----Original Message-----
From: Hugh Irvine [mailto:[email protected]]
Sent: Monday, November 03, 2014 2:08 AM
To: Mohammed Alhaj Ali
Cc: Heikki Vatiainen; [email protected]
Subject: Re: [RADIATOR] ::Accounting Request Proxying for Remote OSS Systems::


Hello -

You need to reference both AuthBy clauses in your Handler:


################################################################
<AuthBy SQL>
       # Add Identifier for reference in accounting Handler
       Identifier SQLAccounting
       AccountingTable zooomonline.ZOOOM_ACCOUNTING
       AcctColumnDef USERNAME,User-Name,%A
       AcctColumnDef TIME_STAMP,Timestamp,integer
       AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type
       AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer
       AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer
       AcctColumnDef ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
       AcctColumnDef ACCTSESSIONID,Acct-Session-Id
       AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer
       AcctColumnDef acctterminatecause, Acct-Terminate-Cause
       AcctColumnDef NASIDENTIFIER,NAS-Identifier
       AcctColumnDef NASPORT,NAS-Port,integer
       AcctColumnDef FRAMEDIPADDRESS,Framed-IP-Address
       AcctInsertQuery insert into %0 (ACCOUNT_ID, DATE_TIME, %1) values 
(zooomonline.ZOOOM_ACCOUNTING_SEQ.nextval, SYSDATE, %2)
#       AddToReply Service-Type=Framed-User, Framed-Protocol=PPP, 
Framed-MTU=1492, Session-Timeout = "until Expiration"
       AddToReply Service-Type=Framed-User, Framed-Protocol=PPP, Framed-MTU=1492
       AuthColumnDef 0,User-Password, check
#       AuthColumnDef 1,Expiration, check
       AuthColumnDef 1,Session-Timeout, reply
       AuthColumnDef 2,Simultaneous-Use, check
       AuthColumnDef 3,GENERIC, reply
#       AuthSelect select PASSWORD, to_char(EXPIRATION, 'yyyy-mm-dd 
HH24:MI:SS') EXPIRATION, MAXSESSIONS, REPLYATTR, Session_Timeout 
"Session-Timeout" from zooomonline.view_zooom_user_auth where 
upper(USERNAME)=upper('%n')
       AuthSelect select PASSWORD, (Session_Timeout) EXPIRATION, MAXSESSIONS, 
REPLYATTR, Session_Timeout "Session-Timeout" from 
zooomonline.view_zooom_user_auth where upper(USERNAME)=upper('%n')
       CachePasswordExpiry 86400
       ConnectionAttemptFailedHook sub {my $self = shift;my $dbsource = 
shift;my $dbusername = shift;my $dbauth = shift;$self->log($main::LOG_ERR, 
"Could not connect to SQL database with DBI->connect $dbsource, $dbusername, 
$dbauth: $@ $DBI::errstr");}
       DBAuth zooomonline2009
       DBSource dbi:ODBC:DSLPROD
       DBUsername zooomonline
       DateFormat %b %e, %Y %H:%M
       EAPAnonymous anonymous
       EAPContextTimeout 1000
       EAPFAST_PAC_Lifetime 7776000
       EAPFAST_PAC_Reprovision 2592000
       EAPTLS_MaxFragmentSize 2048
       EAPTLS_PEAPVersion 1
       EAPTLS_SessionResumption 1
       EAPTLS_SessionResumptionLimit 43200
       EAPTLS_VerifyDepth 1
       FailureBackoffTime 600
       Identifier ZooomAuth
       NoConnectionsHook sub { my $self = shift;$self->log($main::LOG_ERR, 
"Could not connect to any SQL database. Request is ignored. Backing off for 
$self->{FailureBackoffTime} seconds");}
       NullPasswordMatchesAny 1
       PasswordPrompt password
       SIPDigestRealm DefaultSipRealm
       Timeout 60
</AuthBy>


Handler Request-Type=Accounting-Request>
       AuthByPolicy ContinueAlways
       <AuthBy RADIUS>
              Secret 123456
              Host 1.2.3.1
              Host 1.2.3.2
              AuthPort 1812
              AcctPort 1813
              IgnoreAccountingResponse
        </AuthBy>
       # store accounting in SQL
       # use the Identifier to reference the AuthBy SQL clause
       AuthBy SQLAccounting
</Handler>


hope that helps

regards

Hugh


> On 2 Nov 2014, at 20:24, Mohammed Alhaj Ali <[email protected]> wrote:
>
> Hi,
>
> I'm trying to setup only accounting request proxying for remote OSS systems, 
> as well to keep accounting messages to be written on SQL database with the 
> original  <AuthBy SQL>. I applied the below configuration, and I had received 
> the accounting on the remote system, but I loss accounting update on the sql 
> database table...
>
> Need urgent advice.
>
>
> Configuration:
>
>
> ################################################################
> <AuthBy SQL>
>        AccountingTable zooomonline.ZOOOM_ACCOUNTING
>        AcctColumnDef USERNAME,User-Name,%A
>        AcctColumnDef TIME_STAMP,Timestamp,integer
>        AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type
>        AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer
>        AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer
>        AcctColumnDef ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
>        AcctColumnDef ACCTSESSIONID,Acct-Session-Id
>        AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer
>        AcctColumnDef acctterminatecause, Acct-Terminate-Cause
>        AcctColumnDef NASIDENTIFIER,NAS-Identifier
>        AcctColumnDef NASPORT,NAS-Port,integer
>        AcctColumnDef FRAMEDIPADDRESS,Framed-IP-Address
>        AcctInsertQuery insert into %0 (ACCOUNT_ID, DATE_TIME, %1) values 
> (zooomonline.ZOOOM_ACCOUNTING_SEQ.nextval, SYSDATE, %2)
> #       AddToReply Service-Type=Framed-User, Framed-Protocol=PPP, 
> Framed-MTU=1492, Session-Timeout = "until Expiration"
>        AddToReply Service-Type=Framed-User, Framed-Protocol=PPP, 
> Framed-MTU=1492
>        AuthColumnDef 0,User-Password, check
> #       AuthColumnDef 1,Expiration, check
>        AuthColumnDef 1,Session-Timeout, reply
>        AuthColumnDef 2,Simultaneous-Use, check
>        AuthColumnDef 3,GENERIC, reply
> #       AuthSelect select PASSWORD, to_char(EXPIRATION, 'yyyy-mm-dd 
> HH24:MI:SS') EXPIRATION, MAXSESSIONS, REPLYATTR, Session_Timeout 
> "Session-Timeout" from zooomonline.view_zooom_user_auth where 
> upper(USERNAME)=upper('%n')
>        AuthSelect select PASSWORD, (Session_Timeout) EXPIRATION, MAXSESSIONS, 
> REPLYATTR, Session_Timeout "Session-Timeout" from 
> zooomonline.view_zooom_user_auth where upper(USERNAME)=upper('%n')
>        CachePasswordExpiry 86400
>        ConnectionAttemptFailedHook sub {my $self = shift;my $dbsource = 
> shift;my $dbusername = shift;my $dbauth = shift;$self->log($main::LOG_ERR, 
> "Could not connect to SQL database with DBI->connect $dbsource, $dbusername, 
> $dbauth: $@ $DBI::errstr");}
>        DBAuth zooomonline2009
>        DBSource dbi:ODBC:DSLPROD
>        DBUsername zooomonline
>        DateFormat %b %e, %Y %H:%M
>        EAPAnonymous anonymous
>        EAPContextTimeout 1000
>        EAPFAST_PAC_Lifetime 7776000
>        EAPFAST_PAC_Reprovision 2592000
>        EAPTLS_MaxFragmentSize 2048
>        EAPTLS_PEAPVersion 1
>        EAPTLS_SessionResumption 1
>        EAPTLS_SessionResumptionLimit 43200
>        EAPTLS_VerifyDepth 1
>        FailureBackoffTime 600
>        Identifier ZooomAuth
>        NoConnectionsHook sub { my $self = shift;$self->log($main::LOG_ERR, 
> "Could not connect to any SQL database. Request is ignored. Backing off for 
> $self->{FailureBackoffTime} seconds");}
>        NullPasswordMatchesAny 1
>        PasswordPrompt password
>        SIPDigestRealm DefaultSipRealm
>        Timeout 60
> </AuthBy>
>
>
> Handler Request-Type=Accounting-Request>
>
>  AuthByPolicy ContinueAlways
>  AccountingHandled
>     <AuthBy RADIUS>
>         Secret 123456
>         Host 1.2.3.1
>         Host 1.2.3.2
>         AuthPort 1812
>         AcctPort 1813
>                 IgnoreAccountingResponse
>   </AuthBy>
> </Handler>
>
> Is there's any additional required configuration.
>
>
>
> Thank you!
> Regards,
>
>
>
>
>
>
> _______________________________________________
> radiator mailing list
> [email protected]
> http://www.open.com.au/mailman/listinfo/radiator


--

Hugh Irvine
[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, SIM, etc.
Full source on Unix, Linux, Windows, MacOSX, Solaris, VMS, NetWare etc.

_______________________________________________
radiator mailing list
[email protected]
http://www.open.com.au/mailman/listinfo/radiator

Reply via email to