Next Previous Contents

4. Basic Gatekeeper Configuration

The behavior of the gatekeeper is determined by the command line options and configuration file. Some command line options may override a setting from the configuration file. For example, the option -l overrides the setting TimeToLive in the configuration file.

4.1 Command Line Options

Almost every option has a short and a long format, e.g., -c is the same as --config.

Basic

-h --help

Show all available options and quit the program.

-c --config filename

Specify the configuration file to use.

--strict

Strict configuration check (don't start with config errors)

-s --section section

Specify which main section to use in the configuration file. The default is [Gatekeeper::Main].

-l --timetolive n

Specify the time-to-live timer (in seconds) for endpoint registration. Overrides the setting TimeToLive in the configuration file. See there for detailed explanations.

-b --bandwidth n

Specify the total bandwidth available for the gatekeeper in units of 100 bits per second. Without this option, bandwidth management is disabled.

--pid filename

Specify the pid file. Only valid for Unix version.

-u --user name

Run the gatekeeper process as this user. Only valid for Unix version.

--core n

Enable writing core dump files when the application crashes. A core dump file will not exceed n bytes in size. A special constant "unlimited" may be used to not enforce any particular limit. Only valid on Linux.

--mlock

Lock GnuGk into memory to prevent it being swaped out. Only valid on Linux.

Gatekeeper Mode

The options in this subsection override the settings in the [RoutedMode] section of the configuration file.

-d --direct

Use direct endpoint call signaling.

-r --routed

Use gatekeeper routed call signaling.

-rr --h245routed

Use gatekeeper routed call signaling and H.245 control channel.

Debug Information

-o --output filename

Write trace log to the specified file.

-t --trace

Set trace verbosity. Each additional -t adds additional verbosity to the output. For example, use -ttttt to set the trace level to 5.

4.2 Configuration File

The GNU Gatekeeper configuration file is a standard text file. The basic format is:

[Section String]
Key Name=Value String

Comments are marked with a hash (#) or a semicolon (;) at the beginning of a line.

The file complete.ini contains all available sections for GnuGk. In most cases it doesn't make sense to use them all at once. The file is just meant as a collection of examples for many settings.

The configuration file can be changed at run time. Once you modify the configuration file, you may issue the reload command via the status port, or send the HUP signal to the gatekeeper process:

kill -HUP `cat /var/run/gnugk.pid`

4.3 Database Configuration

All GnuGk modules that use a database (eg. [SQLAuth], [SQLAcct] etc.) support a common set of configuration parameters that is described here. You have to repeat all settings for each module, even if they are the same. But you are also free to use differend database drivers and options for each module.

Placeholders in queries

Many SQL modules provide a set of placeholders that you can use in your queries, like %{CallId} in SqlAcct.

Placeholders allways start with the percent sign. Beware that you must escape the percent sign if you need it for something else in your queries (eg. in a LIKE). One way to do so is to use CHAR(37), eg. concat(alias,CHAR(37)) instead of concat(alias,'%').

Stored Procedures

Stored procedures work very well when using MySQL.

When using ODBC, you can not call stored procedures which use parameters using the "CALL ProcedureName" syntax, but you can call them with "EXEC ProcedureName".

4.4 Regular Expressions

In a few places in the configuration file, GnuGk allows regular expressions. The syntax for these regular expressions is "extended POSIX 1003.2 regular expressions". On Unix systems you can usually get a manual page explaining the syntax with "man 7 regex" or see it online at http://www.kernel.org/doc/man-pages/online/pages/man7/regex.7.html.

4.5 Section [Gatekeeper::Main]

Most users will never need to change any of the following values. They are mainly used for testing or very sophisticated applications.

4.6 Section [GkStatus::Auth]

Defines a number of rules regarding who is allowed to connect to the status port. Access to the status port provides full control over your gatekeeper. Ensure that this is set correctly. The status port is active on all IPs GnuGk listens to. You should block as many status ports in your firewall as your setup allows. If you rely on password rules to secure the status port, you should add additional IP based rules ('explicit' or 'regex') to limit the IP range where logins are allowed from.

4.7 Section [GkStatus::Filtering]

See Status Port Filtering.

4.8 Section [LogFile]

This section defines log file related parameters. Currently, it allows users to specify log file rotation options.


Next Previous Contents