Sophie

Sophie

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

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
 <TITLE>The GNU Gatekeeper: Advanced Configuration</TITLE>
 <LINK HREF="manual-13.html" REL=next>
 <LINK HREF="manual-11.html" REL=previous>
 <LINK HREF="manual.html#toc12" REL=contents>
</HEAD>
<BODY>
<A HREF="manual-13.html">Next</A>
<A HREF="manual-11.html">Previous</A>
<A HREF="manual.html#toc12">Contents</A>
<HR>
<H2><A NAME="s12">12.</A> <A HREF="manual.html#toc12">Advanced Configuration</A></H2>


<H2><A NAME="calltable"></A> <A NAME="ss12.1">12.1</A> <A HREF="manual.html#toc12.1">Section [CallTable]</A>
</H2>

<P>
<UL>
<LI><CODE>GenerateNBCDR=0</CODE><BR>
Default: <CODE>1</CODE><BR>
<P>Generate CDRs for calls from neighbor zones.
The IP and endpoint ID of the calling party is printed as empty.
This is usually used for debugging purposes.</P>

</LI>
<LI><CODE>GenerateUCCDR=0</CODE><BR>
Default: <CODE>0</CODE><BR>
<P>Generate CDRs for calls that are unconnected. This is usually
used for debugging purposes. Note that a call is considered unconnected
only if the gatekeeper uses routed mode and a Q.931 "Connect" message is not
received by the gatekeeper. In direct mode, a call is always considered
connected.</P>

</LI>
<LI><CODE>DefaultCallDurationLimit=3600</CODE><BR>
Default: <CODE>0</CODE><BR>
<P>Default maximum call duration limit (seconds).
Set it to <CODE>0</CODE> to disable this feature and not limit
call duration.</P>

</LI>
<LI><CODE>AcctUpdateInterval=60</CODE><BR>
Default: <CODE>0</CODE><BR>
<P>A time interval (seconds) for accounting updates to be logged
for each call in progress. The exact details of the accounting updates
depend on accounting logger modules selected (see section
<A HREF="manual-9.html#gkacct">[Gatekeeper::Acct]</A>). In general, the accounting
update is to provide back-end services with incrementing call duration
for connected calls.
The default value "0" disables accounting updates.
Please note that setting this to a short interval may decrease gatekeeper performance.</P>

</LI>
<LI><CODE>TimestampFormat=Cisco</CODE><BR>
Default: <CODE>RFC822</CODE><BR>
<P>Format of timestamp strings printed inside CDRs. You can use the same list of formats as specified in the 
<A HREF="manual-4.html#gkmain">[Gatekeeper::Main]</A> section.</P>

</LI>
<LI><CODE>IRRFrequency=60</CODE><BR>
Default: <CODE>120</CODE><BR>
<P>Set the irrFrequency in ACF messages. 0 turns it off.</P>

</LI>
<LI><CODE>IRRCheck=TRUE</CODE><BR>
Default: <CODE>FALSE</CODE><BR>
<P>Check if both endpoints in a call send the requested IRRs.
A call will be terminated if one of the endpoints didn't send
an IRR after 2 * irrFrequency.</P>

</LI>
<LI><CODE>SingleFailoverCDR=FALSE</CODE><BR>
Default: <CODE>TRUE</CODE><BR>
<P>When failover is active, more than one gateway may be tried to
establish a call. This switch defines if one or multiple CDRs
are generated for such a call.</P>

</LI>
<LI><CODE>DisabledCodecs=g711Alaw64k;g711Ulaw64k;h263VideoCapability;</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Filter out certain codecs. Please note the trailing semicolon. Calls must be
H.245 routed or proxied for codec filtering to work.
This setting can be overridden on a per-call basis by using the Radius attribute 'disable-codec'.</P>

</LI>
</UL>
</P>

<H2><A NAME="h225toq931"></A> <A NAME="ss12.2">12.2</A> <A HREF="manual.html#toc12.2">Section [H225toQ931]</A>
</H2>

<P>When converting between H.225 reasons and Q.931 cause codes, GnuGk
uses a conversion table. Using this section you can change this mapping.</P>
<P>
<BLOCKQUOTE>
<CODE>[H225toQ931]<BR>
;0=34 # noBandwidth<BR>
;1=47 # gatekeeperResources<BR>
2=34 # unreachableDestination => NoCircuitChannelAvailable (default 3)<BR>
;3=16 # destinationRejection<BR>
;4=88 # invalidRevision<BR>
;5=111 # noPermission<BR>
;6=38 # unreachableGatekeeper<BR>
;7=42 # gatewayResources<BR>
;8=28 # badFormatAddress<BR>
;9=41 # adaptiveBusy<BR>
;10=17 # inConf<BR>
;11=31 # undefinedReason<BR>
;12=16 # facilityCallDeflection<BR>
;13=31 # securityDenied<BR>
14=34 # calledPartyNotRegistered => NoCircuitChannelAvailable (default 20)<BR>
;15=31 # callerNotRegistered<BR>
;16=47 # newConnectionNeeded<BR>
;17=127 # nonStandardReason<BR>
;18=31 # replaceWithConferenceInvite<BR>
;19=31 # genericDataReason<BR>
;20=31 # neededFeatureNotSupported<BR>
;21=127 # tunnelledSignallingRejected<BR></CODE>
</BLOCKQUOTE>
</P>

<H2><A NAME="gkqosmonitor"></A> <A NAME="ss12.3">12.3</A> <A HREF="manual.html#toc12.3">Section [GkQoSMonitor]</A>
</H2>

<P>Use H.460.9 to collect quality of service information from endpoints. 
Endpoints must support H.460.9 for this service to function.</P>
<P>
<UL>
<LI><CODE>Enable=1</CODE><BR>
Default: <CODE>0</CODE><BR>
<P>Defines whether to enable or disable the feature. If enabled, this function
with respond to supportedFeature requests from clients so clients know to
send QoS statistics to the gatekeeper.</P>

</LI>
<LI><CODE>CallEndOnly=0</CODE><BR>
Default: <CODE>1</CODE><BR>
<P>Define whether to collect the information via IRR messages or to only collect 
QoS information at the end of a call. </P>

</LI>
<LI><CODE>DefaultFile=qos.txt</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Define the output file for QoS logs. If a file is not defined the
QoS information is output as an item in the Trace File at trace level 4</P>
</LI>
</UL>
</P>

<H2><A NAME="ss12.4">12.4</A> <A HREF="manual.html#toc12.4">Section [GkQoSMonitor::SQL]</A>
</H2>

<P>This section allows you to store QoS information in a database.
You can use the same database parameters as defined in 
<A HREF="manual-8.html#sqlpasswordauth">[SQLPasswordAuth]</A>.</P>
<P>
<UL>
<LI><CODE>Query=INSERT ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Defines the SQL query used to store the QoS information.</P>
<P>The following parameters are defined:
<UL>
<LI><CODE>%g</CODE> - gatekeeper ID</LI>
<LI><CODE>%{ConfId}</CODE> - conference ID</LI>
<LI><CODE>%{session}</CODE> - session</LI>
<LI><CODE>%{caller-ip}</CODE> - caller IP</LI>
<LI><CODE>%{caller-port}</CODE> - caller port</LI>
<LI><CODE>%{caller-nat}</CODE> - is caller NATted (0 or 1)</LI>
<LI><CODE>%{callee-ip}</CODE> - caller IP</LI>
<LI><CODE>%{callee-port}</CODE> - caller port</LI>
<LI><CODE>%{avgdelay}</CODE> - average delay</LI>
<LI><CODE>%{packetloss}</CODE> - packet loss</LI>
<LI><CODE>%{packetloss-percent}</CODE> - packet loss percentage</LI>
<LI><CODE>%{avgjitter}</CODE> - average jitter</LI>
<LI><CODE>%{bandwidth}</CODE> - bandwidth</LI>
<LI><CODE>%t</CODE> - timestamp
</LI>
</UL>
</P>
<P>Sample query string:
<BLOCKQUOTE><CODE>
<PRE>
INSERT INTO qos SET caller_ip="%{caller-ip}", bandwidth="%{bandwidth}, timestamp=%t
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
</UL>
</P>

<H2><A NAME="endpoint"></A> <A NAME="ss12.5">12.5</A> <A HREF="manual.html#toc12.5">Section [Endpoint]</A>
</H2>

<P>The gatekeeper can function as an endpoint by registering with another gatekeeper, allowing
you to build gatekeeper hierarchies.
This section defines the endpoint features for the gatekeeper.</P>
<P>
<UL>
<LI><CODE>Gatekeeper=10.0.1.1</CODE><BR>
Default: <CODE>no</CODE><BR>
<P>Define a parent gatekeeper for GnuGk to register with.
When call in the routing process reaches the 'parent' routing policy,
it will route all calls to this gatekeeper.</P>
<P>Make sure you don't register with yourself, the results can be very confusing.</P>

</LI>
<LI><CODE>Type=Gateway</CODE><BR>
Default: <CODE>Gateway</CODE><BR>
<P>Define the terminal type GnuGk will use when it registers.
Valid options are <CODE>Gateway</CODE> or <CODE>Terminal</CODE>.</P>

</LI>
<LI><CODE>Vendor=Cisco | GnuGk | Generic</CODE><BR>
Default: <CODE>GnuGk</CODE><BR>
<P>Choose parent gatekeeper type to enable vendor specific
extensions.</P>

</LI>
<LI><CODE>H323ID=ProxyGK</CODE><BR>
Default: <CODE>&lt;Name&gt;</CODE><BR>
<P>Specify the H.323 ID aliases for the endpoint.
Multiple aliases can be separated by comma.</P>

</LI>
<LI><CODE>E164=18888600000,18888700000</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Define the E.164 (dialedDigits) aliases for the endpoint.
Multiple aliases can be separated by comma.</P>

</LI>
<LI><CODE>Password=123456</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Specify a password to be sent to the parent gatekeeper.</P>
<P>All RAS requests will contain the password in the <B>cryptoTokens</B> field
(MD5 &amp; HMAC-SHA1-96) and the <B>tokens</B> field (CAT).
To send RAS requests without the <B>cryptoTokens</B> and <B>tokens</B> fields,
set the password to be empty.
If <CODE>EncryptAllPasswords</CODE> is enabled, or a <CODE>KeyFilled</CODE> variable is defined
in this section, the password is in encrypted form and should be created using
the <CODE>addpasswd</CODE> utility.</P>
<P>The password will be used in LRQs sent to neighbor gatekeepers.</P>

</LI>
<LI><CODE>Prefix=188886,188887</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Register the specified prefixes with the parent gatekeeper.
Only takes effect when the Type is <CODE>Gateway</CODE>.</P>

</LI>
<LI><CODE>TimeToLive=900</CODE><BR>
Default: <CODE>60</CODE><BR>
<P>Suggest a time-to-live value in seconds for the registration.
Note that the real time-to-live timer is assigned by the parent
gatekeeper in the RCF is sends to us in response to our RRQ.</P>

</LI>
<LI><CODE>RRQRetryInterval=10</CODE><BR>
Default: <CODE>3</CODE><BR>
<P>Define a retry interval in seconds for resending an RRQ if no response 
is received from the parent gatekeeper. This interval is doubled with each
failure, up to a maximum RRQRetryInterval * 128 timeout.</P>

</LI>
<LI><CODE>ARQTimeout=2</CODE><BR>
Default: <CODE>2</CODE><BR>
<P>Define the timeout value in seconds for ARQs.</P>

</LI>
<LI><CODE>UnregisterOnReload=1</CODE><BR>
Default: <CODE>0</CODE><BR>
<P>Defines whether the child gatekeeper unregisters and re-registers with
its parent after receiving a Reload command from the status port.</P>

</LI>
<LI><CODE>NATRetryInterval=60</CODE><BR>
Default: <CODE>60</CODE><BR>
<P>How long to wait before trying to reconnect TCP NAT signaling socket (seconds).
This can happen when either the connection cannot be established or it has
been broken.</P>

</LI>
<LI><CODE>NATKeepaliveInterval=86400</CODE><BR>
Default: <CODE>86400</CODE><BR>
<P>Define how often the TCP NAT signaling connection with a parent gatekeeper
is refreshed. As NAT boxes usually keep TCP mappings for a certain duration,
it's strongly suggested to set this to a value slightly shorter than the NAT box mapping timeout.
Refreshing is done by sending a special Q.931 IncomingCallProceeding message.
If your NAT performs TCP port translation, you may need to set it to a value
as short as 60 seconds.</P>

</LI>
<LI><CODE>Discovery=0</CODE><BR>
Default: <CODE>1</CODE><BR>
<P>Configures GnuGk to attempt to discover the parent gatekeeper by first sending a GRQ.</P>

</LI>
<LI><CODE>UseAlternateGK=0</CODE><BR>
Default: <CODE>1</CODE><BR>

<P>Enable alternate gatekeepers feature. If GRJ/GCF/RCF messages received 
from a parent gatekeeper contain a list of alternate gatekeepers, this
information is stored and can be used to re-register with another gatekeeper
in case of failure. If you don't want to use this feature, set this
variable to <CODE>0</CODE>.</P>

</LI>
<LI><CODE>GatekeeperIdentifier=ParentGK</CODE><BR>
Default: <CODE>Not set</CODE><BR>
<P>Define this parameter if you only want to accept parent gatekeepers that match
this gatekeeper identifier. Useful with GRQ discovery and can prevent 
an accidental gatekeeper match. Do not set this variable if you do not
care about gatekeeper identifiers or you use alternate gatekeepers that
can have different gatekeeper identifiers.</P>

</LI>
<LI><CODE>EndpointIdentifier=ChildGK</CODE><BR>
Default: <CODE>Not set</CODE><BR>
<P>Set this if you want to use a specific endpoint identifier for this child
gatekeeper. If this option is not set (default), the identifier is assigned
by a parent gatekeeper in a GCF/RCF message.</P>

</LI>
<LI><CODE>ForwardDestIp=0</CODE><BR>
Default: <CODE>1</CODE><BR>
<P>Forward the destCallSignalAddress in ARQs to the parent gatekeeper.</P>

</LI>
<LI><CODE>DisableH.460.23=0</CODE><BR>
Default: <CODE>1</CODE><BR>
<P>By default H.460.23 is disabled when acting as an endpoint; set this switch to turn it on.</P>

</LI>
</UL>
</P>

<H2><A NAME="ss12.6">12.6</A> <A HREF="manual.html#toc12.6">Section [CTI::Agents]</A>
</H2>

<P>This section allows the configuration of a so called virtual queue to
allow inbound call distribution by an external application via the
status port.
A virtual queue has an H.323 alias that can be called like an endpoint
or it can answer to a set of aliases.</P>
<P>Once a call arrives on the virtual queue, the gatekeeper signals
a RouteRequest on the status port and waits for an external application
to respond with either a RouteReject (which will cause the call to be rejected)
or with RouteToAlias/RouteToGateway which leads to the destination being rewritten so the call
will be routed to the alias (eg. call center agent) specified by
the external application.</P>
<P>If no answer is received after a timeout period, the call is terminated.</P>
<P>You can specify virtual queues in three ways:
<UL>
<LI><CODE>exact alias name</CODE> - a list of aliases is given. If a request destination
alias matches one these names, the virtual queue is activated.</LI>
<LI><CODE>prefix</CODE> - a list of prefixes is given. If a request destination alias
starts with one these prefixes, the virtual queue is activated.</LI>
<LI><CODE>regular expression</CODE> - a regular expression is given. If a request destination
alias matches the expression, the virtual queue is activated.</LI>
</UL>
</P>
<P>See the monitoring section for details on the messages and responses.</P>
<P>
<UL>
<LI><CODE>VirtualQueueAliases</CODE><BR>
Default: <CODE>none</CODE><BR>
<P>This defines a list of H.323 aliases for the virtual queues (used with the vqueue RoutingPolicy).</P>
<P>
<DL>
<DT><B>Example:</B><DD><P>
<BLOCKQUOTE>
<CODE>VirtualQueueAliases=sales,support</CODE>
</BLOCKQUOTE>
<BR></P>
</DL>
</P>

</LI>
<LI><CODE>VirtualQueuePrefixes</CODE><BR>
Default: <CODE>none</CODE><BR>
<P>This defines a list of prefixes for the virtual queues (used with the vqueue RoutingPolicy).</P>
<P>
<DL>
<DT><B>Example:</B><DD><P>
<BLOCKQUOTE>
<CODE>VirtualQueuePrefixes=001215,1215</CODE>
</BLOCKQUOTE>
<BR></P>
</DL>
</P>

</LI>
<LI><CODE>VirtualQueueRegex</CODE><BR>
Default: <CODE>none</CODE><BR>
<P>This defines a regular expression for the virtual queues (used with the vqueue RoutingPolicy).</P>
<P>
<DL>
<DT><B>Example (numbers starting with 001215 or 1215):</B><DD><P>
<BLOCKQUOTE>
<CODE>VirtualQueueRegex=^(001|1)215[0-9]*$</CODE>
</BLOCKQUOTE>
<BR></P>
</DL>
</P>

</LI>
<LI><CODE>RequestTimeout</CODE><BR>
Default: <CODE>10</CODE><BR>
Timeout in seconds for the external application to answer the RouteRequest.
If no answer is received during this time the call will be rejected.</LI>
</UL>
</P>


<H2><A NAME="ctimakecall"></A> <A NAME="ss12.7">12.7</A> <A HREF="manual.html#toc12.7">Section [CTI::MakeCall]</A>
</H2>

<P>This section contains the settings for the status port command 
<A HREF="manual-13.html#makecall">MakeCall</A>.
<UL>
<LI><CODE>EndpointAlias=DialOut</CODE><BR>
Default: <CODE>InternalMakeCallEP</CODE><BR>
<P>This defines the endpoint alias for the pseudo endpoint used to dial.</P>

</LI>
<LI><CODE>UseH450=0</CODE><BR>
Default: <CODE>1</CODE><BR>
<P>Use a H.450.2 transfer instead of a Facility message to transfer the call from the pseudo endpoint to the actual destination.</P>

</LI>
<LI><CODE>Gatekeeper=192.168.1.2</CODE><BR>
Default: <CODE>127.0.0.1</CODE><BR>
<P>Gatekeeper IP for the pseudo endpoint to register with.</P>

</LI>
<LI><CODE>Interface=192.168.1.1:1730</CODE><BR>
Default: <CODE>*:1722</CODE><BR>
<P>Interface and port to use for the pseudo endpoint.</P>

</LI>
<LI><CODE>DisableFastStart=1</CODE><BR>
Default: <CODE>0</CODE><BR>
<P>Disable FastStart for the pseudo endpoint.</P>

</LI>
<LI><CODE>DisableH245Tunneling=1</CODE><BR>
Default: <CODE>0</CODE><BR>
<P>Disable H.245 tunneling for the pseudo endpoint.</P>

</LI>
</UL>
</P>


<H2><A NAME="sqlconf"></A> <A NAME="ss12.8">12.8</A> <A HREF="manual.html#toc12.8">Section [SQLConfig]</A>
</H2>

<P>Load gatekeeper settings from a SQL database (in addition to settings
read from the config file). A generic <CODE>ConfigQuery</CODE> can be used
to read almost all setting from the database and/or one of <CODE>[RasSrv::RewriteE164]</CODE>,
<CODE>[RasSrv::PermanentEndpoints]</CODE>, <CODE>[RasSrv::Neighbors]</CODE>, 
<CODE>[RasSrv::GWPrefixes]</CODE> queries can be used to load particular settings.
Entries read from the SQL database take precedence over settings found
in the config file.</P>
<P>
<UL>
<LI><CODE>Driver=MySQL | PostgreSQL | Firebird | ODBC | SQLite</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>SQL database driver to use. Currently, <CODE>MySQL</CODE>, <CODE>PostgreSQL</CODE>, <CODE>Firebird</CODE>, <CODE>ODBC</CODE> and <CODE>SQLite</CODE> drivers
are implemented.</P>

</LI>
<LI><CODE>Host=DNS[:PORT] | IP[:PORT]</CODE><BR>
Default: <CODE>localhost</CODE><BR>
<P>SQL server host address. Can be in the form of <CODE>DNS[:PORT]</CODE> or <CODE>IP[:PORT]</CODE>.
Like <CODE>sql.mycompany.com</CODE> or <CODE>sql.mycompany.com:3306</CODE> or <CODE>192.168.3.100</CODE>.</P>

</LI>
<LI><CODE>Database=gkconfig</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>The database name to connect to.</P>

</LI>
<LI><CODE>Username=gnugk</CODE><BR>
<P>The username used to connect to the database.</P>

</LI>
<LI><CODE>Password=secret</CODE><BR>
<P>The password used to connect to the database.
If the password is not specified, a database connection attempt 
without any password will be made.
If <CODE>EncryptAllPasswords</CODE> is enabled, or a <CODE>KeyFilled</CODE> variable is defined
in this section, the password is in encrypted form and should be created using
the <CODE>addpasswd</CODE> utility.</P>

</LI>
<LI><CODE>ConfigQuery=SELECT ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Define a SQL query used to read gatekeeper settings from the database. 
The query is parameterized - that means parameter replacement occurs before 
the query is executed. Parameter placeholders are denoted by <B>%1</B>, <B>%2</B>, ... 
strings. Specify %% to embed a percent character before a digit in a string 
(like <B>%%1</B>), specify <B>%{1}</B> to allow expansion inside complex expressions 
like <B>%{1}123</B>. For <CODE>ConfigQuery</CODE> only one parameter is defined:
<UL>
<LI><CODE>%1</CODE> - the gatekeeper identifier</LI>
</UL>

It is expected that the query returns zero or more rows of data,
with each row consisting of <B>three</B> columns:
<UL>
<LI><CODE>column at index 0</CODE> - config section name</LI>
<LI><CODE>column at index 1</CODE> - config key (option name)</LI>
<LI><CODE>column at index 2</CODE> - config value (option value)</LI>
</UL>
</P>
<P>Sample query strings:
<BLOCKQUOTE><CODE>
<PRE>
ConfigQuery=SELECT secname, seckey, secval FROM sqlconfig WHERE gk = '%1'
ConfigQuery=SELECT 'RasSrv::RRQAuth', alias, rule FROM rrqauth WHERE gk = '%1'
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
<LI><CODE>RewriteE164Query=SELECT ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Define a SQL query used to retrieve rewrite rules from the database
for the <CODE>[RasSrv::RewriteE164]</CODE> section. The query is parameterized 
- that means parameter replacement occurs before each query is executed. 
Parameter placeholders are denoted by <B>%1</B>, <B>%2</B>, ... strings. 
Specify %% to embed a percent character before a digit into string 
(like <B>%%1</B>), specify <B>%{1}</B> to allow expansion inside complex expressions 
like <B>%{1}123</B>. For <CODE>RewriteE164Query</CODE> only one parameter is defined:
<UL>
<LI><CODE>%1</CODE> - the gatekeeper identifier</LI>
</UL>

It is expected that the query returns zero or more rows of data,
with each row consisting of two columns:
<UL>
<LI><CODE>column at index 0</CODE> - rewrite rule key</LI>
<LI><CODE>column at index 1</CODE> - rewrite rule value</LI>
</UL>
</P>
<P>Sample query strings:
<BLOCKQUOTE><CODE>
<PRE>
RewriteE164Query=SELECT rkey, rvalue FROM rewriterule WHERE gk = '%1'
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
<LI><CODE>RewriteAliasQuery=SELECT ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Define a SQL query used to retrieve rewrite rules from the database
for the <CODE>[RasSrv::RewriteAlias]</CODE> section. The query is parameterized 
- that means parameter replacement occurs before each query is executed. 
Parameter placeholders are denoted by <B>%1</B>, <B>%2</B>, ... strings. 
Specify %% to embed a percent character before a digit into string 
(like <B>%%1</B>), specify <B>%{1}</B> to allow expansion inside complex expressions 
like <B>%{1}123</B>. For <CODE>RewriteAliasQuery</CODE> only one parameter is defined:
<UL>
<LI><CODE>%1</CODE> - the gatekeeper identifier</LI>
</UL>

It is expected that the query returns zero or more rows of data,
with each row consisting of two columns:
<UL>
<LI><CODE>column at index 0</CODE> - rewrite rule key</LI>
<LI><CODE>column at index 1</CODE> - rewrite rule value</LI>
</UL>
</P>
<P>Sample query strings:
<BLOCKQUOTE><CODE>
<PRE>
RewriteAliasQuery=SELECT rkey, rvalue FROM assignedalias WHERE gk = '%1'
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
<LI><CODE>AssignedAliasQuery=SELECT ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Define a SQL query used to retrieve rewrite rules from the database
for the <CODE>[RasSrv::AssignedAlias]</CODE> section. The query is parameterized 
- that means parameter replacement occurs before each query is executed. 
Parameter placeholders are denoted by <B>%1</B>, <B>%2</B>, ... strings. 
Specify %% to embed a percent character before a digit into string 
(like <B>%%1</B>), specify <B>%{1}</B> to allow expansion inside complex expressions 
like <B>%{1}123</B>. For <CODE>AssignedAliasQuery</CODE> only one parameter is defined:
<UL>
<LI><CODE>%1</CODE> - the gatekeeper identifier</LI>
</UL>

It is expected that the query returns zero or more rows of data,
with each row consisting of two columns:
<UL>
<LI><CODE>column at index 0</CODE> - rewrite rule key</LI>
<LI><CODE>column at index 1</CODE> - rewrite rule value</LI>
</UL>
</P>
<P>Sample query strings:
<BLOCKQUOTE><CODE>
<PRE>
AssignedAliasQuery=SELECT rkey, rvalue FROM assignedalias WHERE gk = '%1'
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
<LI><CODE>NeighborsQuery=SELECT ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Define a SQL query used to retrieve neighbor entries from the database
for the <CODE>[RasSrv::Neighbors]</CODE> section. The query is parameterized 
- that means parameter replacement occurs before each query
is executed. Parameter placeholders are denoted by <B>%1</B>, <B>%2</B>, ... 
strings. Specify %% to embed a percent character before a digit into string 
(like <B>%%1</B>), specify <B>%{1}</B> to allow expansion inside complex expressions 
like <B>%{1}123</B>. For <CODE>NeighborsQuery</CODE> one parameter is defined:
<UL>
<LI><CODE>%1</CODE> - the gatekeeper identifier</LI>
</UL>

It is expected that the query returns zero or more rows of data,
with each row consisting of six columns:
<UL>
<LI><CODE>column at index 0</CODE> - neighbor name (identifier)</LI>
<LI><CODE>column at index 1</CODE> - neighbor IP address</LI>
<LI><CODE>column at index 2</CODE> - neighbor port number</LI>
<LI><CODE>column at index 3</CODE> - optional prefixes (comma separated)</LI>
<LI><CODE>column at index 4</CODE> - optional password</LI>
<LI><CODE>column at index 5</CODE> - optional dynamic IP flag</LI>
</UL>
</P>
<P>Sample query strings:
<BLOCKQUOTE><CODE>
<PRE>
NeighborsQuery=SELECT nid, nip, nport, npfx, NULL, 0 FROM neighbor WHERE gk = '%1'
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
<LI><CODE>PermanentEndpointsQuery=SELECT ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Define a SQL query used to retrieve permanent endpoints from the database 
for the <CODE>[RasSrv::PermanentEndpoints]</CODE> section. The query is parameterized 
- that means parameter replacement occurs before each query
is executed. Parameter placeholders are denoted by <B>%1</B>, <B>%2</B>, ... 
strings. Specify %% to embed a percent character before a digit into string 
(like <B>%%1</B>), specify <B>%{1}</B> to allow expansion inside complex expressions 
like <B>%{1}123</B>. For <CODE>PermanentEndpointsQuery</CODE> only one parameter is defined:
<UL>
<LI><CODE>%1</CODE> - the gatekeeper identifier</LI>
</UL>

It is expected that the query returns zero or more rows of data,
with each row consisting of four columns:
<UL>
<LI><CODE>column at index 0</CODE> - permanent endpoint IP address</LI>
<LI><CODE>column at index 1</CODE> - permanent endpoint port number</LI>
<LI><CODE>column at index 2</CODE> - permanent endpoint alias</LI>
<LI><CODE>column at index 3</CODE> - optional permanent endpoint prefixes (comma separated)</LI>
</UL>
</P>
<P>Sample query strings:
<BLOCKQUOTE><CODE>
<PRE>
PermanentEndpointsQuery=SELECT peip, 1720, pealias, NULL FROM permanentep WHERE gk = '%1'
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
<LI><CODE>GWPrefixesQuery=SELECT ...</CODE><BR>
Default: <CODE>N/A</CODE><BR>
<P>Define a SQL query used to retrieve gateway prefixes from the database 
for the <CODE>[RasSrv::GWPrefixes]</CODE> section. The query is parameterized 
- that means parameter replacement is made before each query
is executed. Parameter placeholders are denoted by <B>%1</B>, <B>%2</B>, ... 
strings. Specify %% to embed a percent character before a digit into string 
(like <B>%%1</B>), specify <B>%{1}</B> to allow expansion inside complex expressions 
like <B>%{1}123</B>. For <CODE>GWPrefixesQuery</CODE> only one parameter is defined:
<UL>
<LI><CODE>%1</CODE> - the gatekeeper identifier</LI>
</UL>

It is expected that the query returns zero or more rows of data,
with each row consisting of two columns:
<UL>
<LI><CODE>column at index 0</CODE> - gateway alias</LI>
<LI><CODE>column at index 1</CODE> - gateway prefixes (comma separated)</LI>
</UL>
</P>
<P>Sample query strings:
<BLOCKQUOTE><CODE>
<PRE>
GWPrefixesQuery=SELECT gwalias, gwpfx FROM gwprefix WHERE gk = '%1'
</PRE>
</CODE></BLOCKQUOTE>
</P>

</LI>
</UL>
</P>

<HR>
<A HREF="manual-13.html">Next</A>
<A HREF="manual-11.html">Previous</A>
<A HREF="manual.html#toc12">Contents</A>
</BODY>
</HTML>