Re: SQLBill problem.

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

 



Use FixedPassword in the GnuGk config
and set all passwords in the database equal to this string.

----- Original Message ----- 
From: "Farid Adigamov" <farid.adigamov@xxxxxxxxx>
Sent: Thursday, November 10, 2005 3:09 PM


> I have a problem with using sqlbill.
> GnuGK : 2.2.3-2
> I also download the sqlbill module from CVS ( as mentioned in maillists )
> The calls are made in this scheme:
>
> gateway X ( ip: X.X.X.X ) --> gateway Y ( ip: Y.Y.Y.Y ) --> gateway Z
> ( ip: Z.Z.Z.Z )
>
> All calls are made by FastStart procedure ( without RAS ).
>
> So I need to authenticate them ONLY by IP addresses. In this case
> according to the manual I'm using 'RadAliasAuth' and
> 'framedip' field in table voipuser.
>
>
> The config file gnugk.ini:
>
> [Gatekeeper::Main]
> Fourtytwo=42
> Name=OpenH323GK
> StatusTraceLevel=3
> Home=Y.Y.Y.Y
> UseBroadcastListener=0
>
> [RoutedMode]
> GKRouted=1
> H245Routed=0
> CallSignalPort=1720
> DropCallsByReleaseComplete=1
> SendReleaseCompleteOnDRQ=1
> ForwardOnFacility=0
> SupportNATedEndpoints=1
> Q931PortRange=30000-39999
> H245PortRange=40000-49999
>
> [Proxy]
> Enable=0
>
> [RasSrv::RRQFeatures]
> OverwriteEPOnSameAddress=1
> AcceptEndpointIdentifier=0
>
> [RasSrv::ARQFeatures]
> ArjReasonRouteCallToSCN=0
> ArjReasonRouteCallToGatekeeper=1
>
> [RasSrv::PermanentEndpoints]
> X.X.X.X:1720=addpack;
> Z.Z.Z.Z:1720=test;000
>
> [GkStatus::Auth]
> rule=allow
> Shutdown=1
>
> [Gatekeeper::Auth]
> RadAliasAuth=required;RRQ,ARQ,Setup
> default=allow
>
> [Gatekeeper::Acct]
> RadAcct=required;start,update,stop,on,off
>
> [RadAliasAuth]
> Servers=localhost
> SharedSecret=testing
> AppendCiscoAttributes=0
> IncludeTerminalAliases=0
> IncludeEndpointIP=1
>
> [RadAcct]
> Servers=localhost
> SharedSecret=testing
> AppendCiscoAttributes=0
> IncludeEndpointIP=1
>
> [SQLPasswordAuth]
> Driver=PostgreSQL
> Host=localhost
> Database=voipdb
> Username=gkradius
> Password=gkradius
> Query=SELECT u.chappassword FROM voipuser u JOIN voipaccount a ON
> u.accountid = a.id WHERE u.h323id = '%1' AND NOT u.disabled AND NOT
> a.disabled AND a.closed IS NULL
>
> [SQLAliasAuth]
> Driver=PostgreSQL
> Host=localhost
> Database=voipdb
> Username=gkradius
> Password=gkradius
> Query=SELECT CASE WHEN u.framedip IS NULL THEN 'allow' ELSE 'sigip:'
> || host(u.framedip) END FROM voipuser u JOIN voipaccount a ON
> u.accountid = a.id WHERE u.h323id = '%1' AND NOT u.disabled AND NOT
> a.disabled AND a.closed IS NULL
>
> [SQLAcct]
> Driver=PostgreSQL
> Host=localhost
> Database=voipdb
> Username=gkradius
> Password=gkradius
> StartQuery=INSERT INTO voipcall (id, h323id, acctsessionid,
> h323confid, gkip, gkid, callingstationip, callingstationid,
> calledstationip, calledstationid, setuptime, acctstarttime,
> acctstartdelay, acctupdatetime) VALUES (DEFAULT, '%u', '%s',
> '%{ConfId}', '%{gkip}', '%g', NULLIF('%{caller-ip}', '')::INET,
> '%{Calling-Station-Id}', NULLIF('%{callee-ip}', '')::INET,
> '%{Called-Station-Id}', NULLIF('%{setup-time}', '')::TIMESTAMP(0) WITH
> TIME ZONE, now(), 0, now())
> UpdateQuery=UPDATE voipcall SET duration = '%d', connecttime =
> NULLIF('%{connect-time}','')::TIMESTAMP(0) WITH TIME ZONE,
> acctupdatetime = now() WHERE acctsessionid = '%s' AND gkid = '%g' AND
> acctstoptime IS NULL
> StopQuery=UPDATE voipcall SET acctstoptime = now(), duration = '%d',
> terminatecause = '%c', acctstopdelay = 0, setuptime =
> NULLIF('%{setup-time}', '')::TIMESTAMP(0) WITH TIME ZONE, connecttime
> = NULLIF('%{connect-time}', '')::TIMESTAMP(0) WITH TIME ZONE,
> disconnecttime = NULLIF('%{disconnect-time}', '')::TIMESTAMP(0) WITH
> TIME ZONE WHERE acctsessionid = '%s' AND gkid = '%g' AND acctstoptime
> IS NULL
> StopQueryAlt=INSERT INTO voipcall (id, h323id, acctsessionid,
> h323confid, gkip, gkid, callingstationip, callingstationid,
> calledstationip, calledstationid, setuptime, connecttime,
> disconnecttime, terminatecause, duration, acctstarttime,
> acctstartdelay, acctupdatetime, acctstoptime, acctstopdelay) VALUES
> (DEFAULT,'%u', '%s', '%{ConfId}', '%{gkip}', '%g',
> NULLIF('%{caller-ip}', '')::INET, '%{Calling-Station-Id}',
> NULLIF('%{callee-ip}', '')::INET, '%{Called-Station-Id}',
> NULLIF('%{setup-time}','')::TIMESTAMP(0) WITH TIME ZONE,
> NULLIF('%{connect-time}','')::TIMESTAMP(0) WITH TIME ZONE,
> NULLIF('%{disconnect-time}','')::TIMESTAMP(0) WITH TIME ZONE, '%c',
> '%d', (now() - '%d'::INTERVAL), 0, now(), now(), 0)
>
> EOF
>
>
>
> All calls are terminated by cause # 10.
> I prevent to use the h323 ID of originating gateways ( in our example
> is X.X.X.X ) by setting to 'false' value of field in table voipuser:
> voipdb=> select * from voipuser;
> id|h323id|accountid|disabled|checkh323id|chappassword|allowedaliases|assignaliases|framedip|terminating|nasaddress
> 2|addpack|2|f|f|addpack|^$||X.X.X.X|f|Y.Y.Y.Y
>
> Is it necessary to set the aliases in fields
> 'allowedaliases','assignaliases' or I can set them in
> RasSrv::PermanentEndpoints section of config?
>
>
>
> GnuGK log:
>
>
> 2005/11/09 23:34:58.670 3           radproto.cxx(2141)  RADIUS
> Sending PDU to RADIUS server localhost (127.0.0.1:1812) from
> port:47743[
> active requests: 0, ID space: 115-116], PDU: {
>        code = 1 (Access-Request)
>        id = 115
>        length = 124 octets
>        authenticator = 16 octets {
>          db 5e e9 fd 97 95 53 75  a0 61 8f 8f ff 9c 9b c6   .^....Su.a......
>        }
>        attributes = 9 elements {
>          [0]= {
>            type = 1 (User-Name)
>            length = 19 octets
>            value = 17 octets {
>              76 6f 69 70 2e 31 39 32  2e 31 36 38 2e 30 2e 34
> voip.192.168.0.4
>              30                                                 0
>            }
>          }
>          [1]= {
>            type = 4 (NAS-IP-Address)
>            length = 6 octets
>            value = 4 octets {
>              е1 41 06 d9                                        Q...
>            }
>          }
>          [2]= {
>            type = 32 (NAS-Identifier)
>            length = 12 octets
>            value = 10 octets {
>              4f 70 65 6e 48 33 32 33  47 4b                     OpenH323GK
>            }
>          }
>          [3]= {
>            type = 61 (NAS-Port-Type)
>            length = 6 octets
>            value = 4 octets {
>              00 00 00 05                                        ....
>            }
>          }
>          [4]= {
>            type = 6 (Service-Type)
>            length = 6 octets
>            value = 4 octets {
>              00 00 00 01                                        ....
>            }
>          }
>          [5]= {
>            type = 8 (Framed-IP-Address)
>            length = 6 octets
>            value = 4 octets {
>              d2 11 35 92                                        .U8.
>            }
>          }
>          [6]= {
>            type = 31 (Calling-Station-Id)
>            length = 5 octets
>            value = 3 octets {
>              32 30 30                                           200
>            }
>          }
>          [7]= {
>            type = 30 (Called-Station-Id)
>            length = 10 octets
>            value = 8 octets {
>              30 30 30 30 35 36 35 35                            00005655
>            }
>          }
>          [8]= {
>            type = 2 (User-Password)
>            length = 34 octets
>            value = 32 octets {
>              76 f0 43 f2 0a f7 19 4c  e1 24 47 43 0a b9 21 c3
> v.C....L.$GC..!.
>              74 44 89 44 f3 1c 52 ee  0c df 88 6c 63 a6 22 3b
> tD.D..R....lc.";
>            }
>          }
>        }
>     }
>
> 2005/11/09 23:34:58.689 3           radproto.cxx(2180)  RADIUS
> Received PDU from RADIUS server localhost (127.0.0.1:1812) by socket
> por
> t:47743[active requests: 0, ID space: 115-116], PDU: {
>        code = 3 (Access-Reject)
>        id = 115
>        length = 20 octets
>        authenticator = 16 octets {
>          eb f9 5a d3 0e 21 e5 9c  70 f7 55 a0 46 a1 44 ce   ..Z..!..p.U.F.D.
>        }
>        attributes = <<null>>
>     }
>
> 2005/11/09 23:34:58.689 3             gkauth.cxx(1051)  GKAUTH
> RadAliasAuth Setup check failed
> 2005/11/09 23:34:58.689 3       ProxyChannel.cxx(1496)  Q931s
> Dropping call CRV=1386 from X.X.X.X:14103 due to Setup authentication
> failure
>
> Thanks.
> /Farid



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________________

Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_id┘49
Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users
Homepage: http://www.gnugk.org/

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

  Powered by Linux