Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release > by-pkgid > aa0a0c745bf74bd0c70c4944117a40d3 > files > 59

gnugk-2.3.1-1mdv2010.1.x86_64.rpm

; Sample configuration file

; VoIP Billing Platform for GnuGk
; Copyright (c) 2004, Michal Zygmuntowicz

; This work is published under the GNU Public License (GPL)
; see file COPYING for details

[Gatekeeper::Main]
Fourtytwo=42
Name=OpenH323GK

[RoutedMode]
GKRouted=1
H245Routed=0
DropCallsByReleaseComplete=1
SendReleaseCompleteOnDRQ=1
ForwardOnFacility=0

[Proxy]
Enable=0

[RasSrv::RRQFeatures]
OverwriteEPOnSameAddress=1
AcceptEndpointIdentifier=0

[RasSrv::ARQFeatures]
ArjReasonRouteCallToSCN=0
ArjReasonRouteCallToGatekeeper=1

[GkStatus::Auth]
rule=allow
Shutdown=1

[Gatekeeper::Auth]
RadAuth=required;RRQ,ARQ
;SQLPasswordAuth=optional;RRQ
;SQLAliasAuth=required;RRQ
default=allow

[Gatekeeper::Acct]
RadAcct=required;start,update,stop,on,off
;SQLAcct=required;start,update,stop

[RadAuth]
Servers=localhost
SharedSecret=testing
AppendCiscoAttributes=1
IncludeTerminalAliases=1
IncludeEndpointIP=1

[RadAcct]
Servers=localhost
SharedSecret=testing
AppendCiscoAttributes=1
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)