sql billing not work please help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello List,

Please Help,
I use: system rh9 ; gnugk 2.2.0 (Linux Executable ) ; freradius; postrgesql 7.4
I need: what registered and unregistered endpoints only by IP, may or may not call and prepaid billing

I have upgrade sql billing and now not work at all :(. Early I use sample your sql billing and use only for billing ( not for Auth ), and sql count ok user balance.
This new version for only accounting not working at all ( ? ) cdr ok, but not user /destination select . I don't know why , but if I set in gnugk.ini RadAuth=required - gnugk don't send request to radius at all. request go if I use RadAliasAuth=required. But endpoints don't may registred - 'securityDenial'.

This some configuration and logs. And so, early I try set billing and see, what RadAcct work only if I se Servers=ip , and not Servers=localhost


[RadAuth]
Servers=1.2.3.4
SharedSecret=secret
RequestTimeout=2000
IdCacheTimeout=9000
SocketDeleteTimeout=60000
RequestRetransmissions=2
AppendCiscoAttributes=0          
IncludeTerminalAliases=0          
IncludeEndpointIP=1
 
[RadAliasAuth]
Servers=1.2.3.4
SharedSecret=secret
RequestTimeout=2000
IdCacheTimeout=9000
SocketDeleteTimeout=60000
RequestRetransmissions=2
AppendCiscoAttributes=0
IncludeTerminalAliases=0
IncludeEndpointIP=1
FixedPassword='123'                  
 
-------------------voipuser---------------------
22476;"19";"2011";"1";"FALSE";"FALSE";"123";"''";"2011";"1.1.1.1";"bbbbb";"''";"f"
22477;"20";"2010";"1";"FALSE";"FALSE";"$^";"$^";"''";"";"aaa";"''";"f"
22478;"21";"2012";"2";"FALSE";"FALSE";"$^";"$^";"''";"";"bbb";"Home";"f"
30648;"22";"2025";"2";"FALSE";"FALSE";"123";"''";"2025";"2.2.2.2";"eeeeee";"''";"f"
30650;"23";"2026";"5";"FALSE";"FALSE";"123";"''";"''";"3.3.3.3";"ccccc";"''";"f"
------------------------------------------------------
 
---------radius log-------------------------
rad_recv: Access-Request packet from host 1.2.3.4:56619, id=213, length=75
        User-Name = "2011"
        NAS-IP-Address = 1.2.3.4
        NAS-Identifier = "Sanet"
        NAS-Port-Type = Virtual
        Service-Type = Login-User
        Framed-IP-Address = 1.2.3.4
        User-Password = "'123'"
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 100
  modcall[authorize]: module "preprocess" returns ok for request 100
radius_xlat:  '/usr/local/var/log/radius/radacct/1.2.3.4/auth-detail-20041213'
rlm_detail: /usr/local/var/log/radius/radacct/%{Client-IP-Address}/auth-detail-%Y%m%d expands to /usr/local/var/log/radius/radacct/1.2.3.4/auth-detail-20041213
  modcall[authorize]: module "auth_log" returns ok for request 100
  modcall[authorize]: module "chap" returns noop for request 100
    rlm_realm: No '@' in User-Name = "2011", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 100
radius_xlat:  '2011'
rlm_sql (sql): sql_set_user escaped user --> '2011'
radius_xlat:  'SELECT id, '2011', attrname, attrvalue, attrop FROM ??radius_get_check_attrs('2011', NULLIF(1.2.3.4, '')::INET, ???CASE ????WHEN '' = '' THEN TRUE ????ELSE FALSE ???END, ???CASE WHEN 'Login-User' = 'Call-Check' THEN TRUE ELSE FALSE END, ???NULLIF('',''), NULLIF('',''), ???'' ???)'
rlm_sql (sql): Reserving sql socket id: 9
rlm_sql_postgresql: query: SELECT id, '2011', attrname, attrvalue, attrop FROM ??radius_get_check_attrs('2011', NULLIF(1.2.3.4, '')::INET, ???CASE ????WHEN '' = '' THEN TRUE ????ELSE FALSE ???END, ???CASE WHEN 'Login-User' = 'Call-Check' THEN TRUE ELSE FALSE END, ???NULLIF('',''), NULLIF('',''), ???'' ???)
rlm_sql_postgresql: Status: PGRES_TUPLES_OK
rlm_sql_postgresql: affected rows =
radius_xlat:  ''
radius_xlat:  'SELECT id, '2011', attrname, attrvalue, attrop FROM ??radius_get_reply_attrs('2011', NULLIF(1.2.3.4, '')::INET, ???CASE ????WHEN '' = '' THEN TRUE ????ELSE FALSE ???END, ???CASE WHEN 'Login-User' = 'Call-Check' THEN TRUE ELSE FALSE END, ???NULLIF('',''), NULLIF('',''), ???'' ???)'
rlm_sql_postgresql: query: SELECT id, '2011', attrname, attrvalue, attrop FROM ??radius_get_reply_attrs('2011', NULLIF(1.2.3.4, '')::INET, ???CASE ????WHEN '' = '' THEN TRUE ????ELSE FALSE ???END, ???CASE WHEN 'Login-User' = 'Call-Check' THEN TRUE ELSE FALSE END, ???NULLIF('',''), NULLIF('',''), ???'' ???)
rlm_sql_postgresql: Status: PGRES_TUPLES_OK
rlm_sql_postgresql: affected rows =
radius_xlat:  ''
rlm_sql (sql): No matching entry in the database for request from user [2011]
rlm_sql (sql): Released sql socket id: 9
  modcall[authorize]: module "sql" returns notfound for request 100
modcall: group authorize returns ok for request 100
auth: No authenticate method (Auth-Type) configuration found for the request: Rejecting the user
auth: Failed to validate the user.
Login incorrect: [2011/'123'] (from client Sanet port 0)
Sending Access-Reject of id 213 to 1.2.3.4:56619
 
---------------------Postgresql log:-----------------------------------
LOG:  statement: SELECT id, '2011', attrname, attrvalue, attrop FROM           radius_get_check_attrs('2011', NULLIF(1.2.3.4, '')::INET,              CASE                             WHEN '' = '' THEN TRUE                         ELSE FALSE                       END,                    CASE WHEN 'Login-User' = 'Call-Check' THEN TRUE ELSE FALSE END,                         NULLIF('',''), NULLIF('',''),                   ''                      )
LOG:  statement: SELECT id, '2011', attrname, attrvalue, attrop FROM           radius_get_reply_attrs('2011', NULLIF(1.2.3.4, '')::INET,              CASE                             WHEN '' = '' THEN TRUE                         ELSE FALSE                       END,                    CASE WHEN 'Login-User' = 'Call-Check' THEN TRUE ELSE FALSE END,                         NULLIF('',''), NULLIF('',''),                   ''                      )
------------------------------------

Many Thanks,
Regards,
Serge.

[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux