<jan@willamowius.de>
OpenH323 Gatekeeper - The GNU Gatekeeper is an open-source project that implements an H.323 gatekeeper. A gatekeeper provides call control services to the H.323 endpoints. It is an integral part of most usefull internet telephony installations that are based on the H.323 standard.
According to Recommendation H.323, a gatekeeper shall provide the following services:
The GNU Gatekeeper implements most of these functions based on the OpenH323 protocol stack.
Recommendation H.323 is an international standard published by the ITU. It is a communications standard for audio, video, and data over the Internet. See also Paul Jones' primer on H.323.
For a detailed description of what a gatekeeper does, see here.
It is covered by the GNU General Public License (GNU GPL). In addition to that, we explicitely grant the right to link this code to the OpenH323 and OpenSSL library.
Generally speaking, the GNU GPL allows you to copy, distribute, resell or modify the softwares, but it requires that all derived works must be published under GNU GPL also. That means that you must publish full source for all extensions to the gatekeeper and for all programs you include the gatekeeper into. See the file COPYING for details.
If that's not what you want, you must interface to the gatekeeper through the status port and communicate via TCP with it. That way you only have to integrate the basic funtionality into the gatekeeper (and provide source for that) and can keep other parts of your application private.
The formal name of this project is OpenH323 Gatekeeper - The GNU Gatekeeper, short GnuGk. Please don't confuse it with other gatekeeper projects.
There are several open-source gatekeeper projects based on the OpenH323 protocol stack.
A full featured gatekeeper freely available under MPL. The project has been inactive for a period of time now. There is an H.323 proxy based on OpenGatekeeper, see OpenH323Proxy.
Only in a very primary grades.
To have different gatekeepers with very similar names is really
confusing for most users.
Since our "OpenH323 Gatekeeper" was the first on the scene,
it is not our fault that others have chosen similar names.
But to make the destinction a little more clear without confusing
people even more, we have decided to give the project a
subtitle "OpenH323 Gatekeeper - The GNU Gatekeeper" and start
using gnugk
as name for executables.
The version 2.2.1 contains the following new features and bugfixes:
.
) matches any digit.
.
) matches any digit,
!
at the beginning disables the prefix.
.
) matches any digit,
!
at the beginning disables the prefix.
Screen...
options are enabled.
UseDialedNumber
config option
for
RadAuth/
RadAliasAuth
/
RadAcct modules, new %{Dialed-Number} variable
for
SQLAcct and
FileAcct modules.
TimestampFormat
config
variables for main,
[SqlAcct],
[RadAcct],
[FileAcct]
and
[CallTable] sections.
TcpKeepAlive
option to solve the problem with network errors
and calls hanging in the call table. See docs/keepalive.txt for more
details.
RouteToGateway
command.
The version 2.2.0 contains the following new features and bugfixes:
RoundRobinGateways
config option.
EP::
config sections for per-endpoint configuration settings (see
Per-Endpoint Configuration Settings).
RtpHandlerNumber
config option.
LogFile
config section, new setlog
and rotatelog
status interface commands.
The version 2.2beta4 contains the following new features and bugfixes:
ExternalPasswordAuth
module finally removed (although
the source code is only commented out for those who need this module).
SimplePasswordAuth
section instead of Password
section.
Fixed MySQLPasswordAuth module to accept CacheTimeout parameter.
Default CacheTimeout for MySQLPasswordAuth and MySQLAliasAuth set to 0
(do not cache passwords/aliases at all).
The version 2.2beta3 contains the following new features and bugfixes:
The version 2.2beta2 contains the following new features and bugfixes:
The version 2.2beta1 contains the following new features:
The version 2.0.6 has became a base for the new 2.2 gatekeeper version.
The version 2.0.6 is a bugfix release, plus the following enchancements:
The version 2.0.6 is a bugfix release, plus the following enchancements:
The version 2.0.5 is a bugfix release, plus the following enchancements:
The version 2.0.3 is a bugfix release, plus a little enhancement:
The new features added to version 2.0.2 are:
Of course, the major functions in version 2.0 are also included:
reload
command via status port, or on
receiving HUP
signal (Unix platform).
The newest stable and a development version are available at the download page.
The very latest source code is in the CVS at Sourceforge ( Web-GUI). Beware - that's the bleeding edge.
You can also download some executables from the download page. Only some versions are made available as executables.
There are two mailing list for the project, one for the developers and one for the users.
General user questions should be send to the users mailing list. You can find the list archive here. To join this mailing list, click here.
To report problems or submit bugs/patches, send mails to the developers mailing list. The list archive is here. Please send user questions to the users mailinglist and keep this list to development! If you want to contribute to the project, please join the mailing list.
Note: Please don't send your questions as private emails to individual developer. We are usually busy. We would not like to be your private consultant, unless you'd like to pay us. Send your problems to the appropriate public mailing list so everybody can help you.
Also please don't send the GnuGk specific problems to the OpenH323 mailing list, or vice versa. They are different projects, though closely related.
Before you sending an email, make sure you have read the related documents carefully. Describe your problems clearly and precisely. Show us the error messages or logs if there is any.
The current project coordinator is
Jan Willamowius
<jan@willamowius.de>
The main features and functions of version 2.0 are contributed by
Chih-Wei Huang
<cwhuang@linux.org.tw>
and
Citron Network Inc.,
including thread-safe registration and call tables,
new routed mode architecture, H.323 proxy,
H.235 authentication and MySQL backend.
Michal Zygmuntowicz
<m.zygmuntowicz@onet.pl>
has done some great work on Radius support and other improvements.
The initial version of the gatekeeper has been developed by Xiang Ping Chen, Joe Metzger and Rajat Todi.
To build the gatekeeper you need at least PWLib 1.5.0 and OpenH323 1.12.0 or later. The development version of the gatekeeper usually needs the most recent OpenH323 version available. These libraries are available at OpenH323 Download Page. See the instructions on how to compile the OpenH323 code.
Order of compiling:
On Unix do a configure
and make debug
or make opt
in the gatekeeper directory to build debug or release version, respectively.
Use make both
to build both versions.
Note you have to use GCC 3.3.x or later. The older version may not work.
Good practice is to do a make debugdepend
or make optdepend
in the gatekeeper directory before starting actual compilation (make debug or
make opt) - these commands build approtiate dependency lists, so after
you will update your sources from CVS, all affected files will get recompiled.
Otherwise you can finish with the Gatekeeper partially compiled with the older
headers and partially with the updated headers - a very bad thing.
On Windows just open and compile the provided project (gk.dsw
) for
Microsoft Visual C++ 6.0 or 7.0 (Visual C++ 5.0 is too old).
Type configure --help
to see a detailed list of all compile time
options. You can use them to enable or disable some features of the gatekeeper.
For example, if you do not need RADIUS just type: configure --disable-radius
.
To build the gatekeeper that is statically linked with system and OpenH323 libraries,
make optnoshared
or make debugnoshared
has to be used.
In order to use the gatekeeper under heavy load, enabling LARGE_FDSET feature is recommended (configure --with-large-fdset=1024). Most systems also need kernel reconfiguration/recompilation in order to allow more than 1024 sockets to be allocated for a single process. Note that the PWLib library starting from version 1.5.3 supports a similar feature too, so you can choose between LARGE_FDSET GnuGk and PWLib implementation. GnuGk native implementation gives better performance results. Maximum LARGE_FDSET value should be calculated based upon predicted maximum sockets usage. A rule of thumb may be:
MAX_NUMBER_OF_CONCURRENT_CALLS * 10 * 120%
Where:
10 = 2 sockets for Q.931 + 2 sockets for H.245 + 6 sockets for RTP and other stuff
So for 100 concurrent calls you don't need more than ca. 1024 sockets in the
LARGE_FDSET.
There is no special installation procedure needed.
Just copy the executable to the directory you like
and create a config file for it.
There are several config examples in the etc/
subdirectory
of source tree. See section
Configuration File
for detailed explanations.
For example, in Linux x86 platform, the optimized executable gnugk
is produced in obj_linux_x86_r/
subdirectory.
You may copy it to /usr/sbin/
, create a config in
/etc/gnugk.ini
and start it by
$ /usr/sbin/gnugk -c /etc/gnugk.ini -o /var/log/gnugk.log -ttt
See section
Command Line Options for details.
If you do not wish to compile the gatekeeper from source, there are several pre-built `packages' available from SourceForge. Not all versions will be made available as binaries - check what is avilable.
Tar packages (.tgz or .tar.gz)
Download the tar file and enter the following command as root
,
substitute in the name of the file you downloaded.
$ tar xvzf gnugk-x.x.x.tar
Debian packages (.deb)
Debian includes the gatekeeper as openh323gk package.
You can install it by using the following command as root
:
$ apt-get install openh323gk
To see that all components are up and running, get 2 Linux workstations, both connected to the LAN. Make sure you have at least version 1.1 of OpenH323 and OhPhone installed. On the first machine run the gatekeeper and ohphone (on different consoles):
jan@machine1 > gnugk -ttt
Now the gatekeeper is running in direct mode.
The "-ttt
" option tells the gatekeeper to do a lot of debug output
on the console (you can direct that output to a file with "-o logfile
").
jan@machine1 > ohphone -l -a -u jan
Now this OhPhone is listening (-l
) for calls and will automatically
accept them (-a
). It has registered as user jan with the gatekeeper
that it will automatically detect. (If the auto detect fails for some
reason use "-g 1.2.3.4
" to specify the IP number the gatekeeper
is running on.)
On the second machine run ohphone only:
peter@machine2 > ohphone -u peter jan
The second instance of OhPhone registers with the auto detected gatekeeper as user peter and tries to call user jan. The gatekeeper will resolve the username to the IP number from where user jan has registered (machine1 in this case) and OhPhone will call the other instance of OhPhone on machine one.
The first instance of OhPhone will accept that call and Peter and Jan can chat.
Now we try to see which messages are handled by the gatekeeper. On a new console on machine1 we use telnet to connect to the gatekeeper:
jan@machine1 > telnet machine1 7000
Most probably we'll get an "Access forbidden!" message, because not everybody is allowed to spy.
Now we create a file called gatekeeper.ini
and put it in the
directory where we start the gatekeeper.
gatekeeper.ini
only contains 4 lines:
[Gatekeeper::Main]
Fourtytwo=42
[GkStatus::Auth]
rule=allow
Stop the gatekeeper with Ctrl-C and restart it. When we do the telnet again, we stay connected with the gatekeeper. Now repeat the first experiment where Peter calls Jan and see which messages are handled by the gatekeeper in non-routed mode. There is a number of commands that can be issued in this telnet session: Type "help" to see them. To end the telnet session with the gatekeeper type "quit" and hit Enter.
Starting the gatekeeper in routed mode means that the gatekeeper uses "gatekeeper routed signalling" for all calls. In this mode the gatekeeper all signalling messages go through the gatekeeper and it has much greater control over the calls.
jan@machine1 > gnugk -r
Now the gatekeeper is running in routed mode. Telnet to the status port and make a call to see what messages are now handled by the gatekeeper.
Note that all media packets (audio and video) are still sent directly between the endpoints (the 2 instances of ohphone).
Since gatekeeper routed signalling is much more complicated you are much more likely to hit a bug n the gatekeeper in this mode. But if it breaks, you get to keep the pieces. ;-)
Until now the gatekeeper has only acted as a mechanism to resolve symbolic names to IP addresses. Thats an important function but hardly exciting.
Since the gatekeeper has a lot of control over the calls,
it can terminate them for example. When we are
connected to the status port, we can list all active calls
with "PrintCurrentCalls
". To terminate a call, we can
say "Disconnectip 1.2.3.4
" for one of its endpoints.
One could for example write a simple script that connects to the status port and listens for all ongoing calls and terminates them after 5 minutes, so no user can over use system resources.
Take a look at the other telephony functions like TransferCall to see what else is available.
Without using a gateway you can only call other people with an IP phone over the Internet. To reach people with ordinary telephones you must use a gateway.
_________________ ______________
| endpoint "jan"| | |
| 192.168.88.35 |--------->| Gatekeeper |
|_______________| | |
_________________ | |
| gateway "gw1" | outgoing | |
| 192.168.88.37 |<---------|____________|
|_______________|
The gatekeeper has to know which calls are supposed to be routed over the gateway and what numbers shall be called directly. Use the [RasSrv::GWPrefixes] section of the config file to tell the gatekeeper the prefix of numbers that shall be routed over the gateway.
[RasSrv::GWPrefixes]
gw1=0
This entry tells the gatekeeper to route all calls to E.164 numbers starting with 0 to the gateway that has registered with the H.323 alias "gw1". If there is no registered gateway with that alias the call will fail. (Note that you must use the gateway alias - you can't just tell the gatekeeper the IP number of the gateway.)
A prefix can contain digits 0-9
, #
and *
. It can also
contain a special character .
(a dot) that matches any digit
and can be prefixed with !
(an exclamation mark) to disable the prefix.
Prefix matching is done accordingly to the longest matching prefix rule,
with ! rules having higher priority if lengths are equal. Some examples:
[RasSrv::GWPrefixes]
; This entry will route numbers starting with 0048 (but not with 004850 and 004860)
; to the gw1
gw1=0048,!004850,!004860
; This entry will match only 001 with 10 digits following
gw2=001..........
When using a gateway you often have to use different numbers internally and rewrite them before sending them over a gateway into the telephone network. You can use the RasSrv::RewriteE164 section to configure that.
Example: You want to call number 12345 with you IP Phone and would like to reach number 08765 behind a gateway called "gw1".
[RasSrv::GWPrefixes]
gw1=0
[RasSrv::RewriteE164]
12345=08765
You can also configure rewriting of E.164 numbers based on which gateway you are receiving a call from or sending a call to using the RasSrv::GWRewriteE164 section.
Example: You have two different gateways ("gw1" and "gw2") which you are sending calls with prefix 0044 to, but which require a different prefix to be added to the number after the routing has selected the gateway. This might be for identification purposes for example.
[RasSrv::GWPrefixes]
gw1=0044
gw2=0044
[RasSrv::GWRewriteE164]
gw1=out=0044=77770044
gw2=out=0044=88880044
Example: You want to identify calls from a particular gateway "gw1" with a specific prefix before passing these calls to another gateway "gw2".
[RasSrv::GWPrefixes]
gw2=1
[RasSrv::GWRewriteE164]
gw1=in=00=123400
Rewrite expressions accept dot '.'
and percent sign '%'
wildcard
characters to allow building more general rules. The dot character can occur
at both left and right hand sides of expressions, the percent sign can occur
only at the left side only. Use '.'
to match any character and copy it
to the rewritten string and '%'
to match any character and skip it.
A few simple examples:
[RasSrv::RewriteE164]
; Rewrite 0044 + min. 7 digits to 44 + min. 7 digits
0044.......=44.......
; Rewrite numbers starting with 11 + 4 digits + 11 to 22 + 4 digits + 22 (like 11333311 => 22333322, 110000112345 => 220000222345)
11....11=22....22
; strip the first four digits from all numbers (11114858345 => 4858345)
; this is equivalent of 10 rules %%%%1=1, %%%%2=2, ...
%%%%.=.
; insert two zeros in the middle of the number (111148581234 => 11110048581234)
....48=....0048
; even this is possible (415161 => 041051061)
4.5.6=04.05.06
The behavior of the gatekeeper is completely determined by the command line
options and configuration file. Some command line options may override
the setting of the configuration file.
For example, the option -l
overrides the setting TimeToLive
in the configuration file.
Almost every option has a short and a long format, e.g.,
-c
is the same as --config
.
-h --help
Show all available options and quit the program.
-c --config filename
Specify the configuration file to use.
-s --section section
Specify which main section to use in the configuration file. The default is [Gatekeeper::Main].
-i --interface IP
Specify the interface (IP number) that the gatekeeper listens to. You should leave out this option to let the gatekeeper automatically determine the IP it listens to, unless you want the gatekeeper only binds to a specified IP.
-l --timetolive n
Specify the time-to-live timer (in seconds) for endpoint registration.
It overrides the setting TimeToLive
in the configuration file.
See
there for detailed explanations.
-b --bandwidth n
Specify the total bandwidth available for the gatekeeper. Without specifying this option, the bandwidth management is disable by default.
--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 versions.
The options in this subsection override the settings in the [RoutedMode] section of the configuration file.
-d --direct
Use direct endpoint call signalling.
-r --routed
Use gatekeeper routed call signalling.
-rr --h245routed
Use gatekeeper routed call signalling and H.245 control channel.
-o --output filename
Write trace log to the specified file.
-t --trace
Set trace verbosity. The more -t
you add, the more verbose to output.
For example, use -ttttt
to set the trace level to 5.
The 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 the 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 runtime.
Once you modify the configuration file, you may issue reload
command
via status port, or send a signal HUP
to the gatekeeper process on Unix.
For example,
kill -HUP `cat /var/run/gnugk.pid`
Note Some section names in GnuGk 2.0.0 are named [RasSrv::*], while others are named [RasSvr::*]. This inconsistency confused users. In 2.0.1 all sections are corrected to [RasSrv::*]. If you upgrade from 2.0.0 or earlier version, remember to change the section names, or GnuGk will refuse to start.
Fourtytwo=42
N/A
This setting is used to test the presence of the config file. If it is not found, a warning is issued. Make sure it's in all your config files.
Name=OpenH323GK
OpenH323GK
Gatekeeper identifier of this gatekeeper. The gatekeeper will only respond to GRQs for this ID and will use it in a number of messages to its endpoints.
Home=192.168.1.1
0.0.0.0
The gatekeeper will listen for requests on this IP number. By default, the gatekeeper listens on all interfaces of your host. You should leave out this option, unless you want the gatekeeper only to bind to a specified IP.
NetworkInterfaces=192.168.1.1/24,10.0.0.1/0
N/A
Specify the network interfaces of the gatekeeper. By default the gatekeeper will detect the interfaces of your host automatically. There are two situations that you may want to use this option. One is automatical detection failed, another is the gatekeeper is behind an NAT box and allow endpoints with public IPs to register with. In this case you should set the option just as the gatekeeper is running on the NAT box.
EndpointIDSuffix=_gk1
_endp
The gatekeeper will assign a unique identifier to each registered endpoint. This option can be used to specify a suffix to append to the endpoint identifier. This is only usefull when using more than one gatekeeper.
TimeToLive=300
-1
An endpoint's registration with a gatekeeper may have a limited life span. The gatekeeper specifies the registration duration of an endpoint by including a timeToLive field in the RCF message. After the specified time, the registration has expired. The endpoint shall periodically send an RRQ having the keepAlive bit set prior to the expiration time. Such a message may include a minimum amount of information as described in H.225.0. This is called a lightweight RRQ.
This configuration setting specifies the time-to-live timer in seconds until the registration expires. Note the endpoint may request a shorter timeToLive in the RRQ message to the gatekeeper. To avoid an overload of RRQ messages, the gatekeeper automatically adjusts this timer to 60 seconds if you give a lesser value!
After the expiration time, the gatekeeper will subsequently send two IRQ messages to query if the endpoint is still alive. If the endpoint responds with an IRR, the registration will be extended. Otherwise the gatekeeper will send a URQ with reason ttlExpired to the endpoint. The endpoint must then re-register with the gatekeeper using a full RRQ message.
To disable this feature, set it to -1
.
TotalBandwidth=100000
-1
Total bandwidth available to be given to endpoints. By default this feature is off. Be carefull when using it, because many endpoints have buggy implementations.
RedirectGK=Endpoints > 100 || Calls > 50
N/A
This option allow you to redirect endpoints to alternate gatekeepers when the gatekeeper overloaded. For example, with the above setting the gatekeeper will reject an RRQ if registered endpoints exceed 100, or reject an ARQ if concurrent calls exceed 50.
Furthermore, you may explicitly redirect all endpoints by
setting this option to temporary
or permanent
.
The gatekeeper will return an RAS rejection message with a list of
alternate gatekeepers defined in AlternateGKs
.
Note that a permanent
redirection means that the redirected endpoints
will not register with this gatekeeper again.
Please also note the function only takes effect to H.323 version 4
compliant endpoints.
AlternateGKs=1.2.3.4:1719:false:120:OpenH323GK
N/A
We allow for existence of another gatekeeper to provide redundancy. This is implemented in a active-active manner. Actually, you might get into a (valid !) situation where some endpoints are registered with the first and some are registered with the second gatekeeper. You should even be able use the two gatekeepers in a round_robin fashion for load-sharing (that's untested, though :-)). If you read on, "primary GK" refers to the gatekeeper you're currently configuring and "alternate GK" means the other one. The primary GK includes a field in the RCF to tell endpoints which alternate IP and gatekeeper identifier to use. But the alternate GK needs to know about every registration with the primary GK or else it would reject calls. Therefore our gatekeeper can forward every RRQ to an alternate IP address.
The AlternateGKs config option specifies the fields contained in the primary GK's RCF. The first and second fields of this string define where (IP, port) to forward to. The third tells endpoints whether they need to register with the alternate GK before placing calls. They usually don't because we forward their RRQs, so they get registered with the alternate GK, too. The fourth field specified the priority for this GK. Lower is better, usually the primary GK is considered to have priority 1. The last field specifies the alternate gatekeeper's identifier.
SendTo=1.2.3.4:1719
N/A
Although this information is contained in AlternateGKs, you must still specify which address to forward RRQs to. This might differ from AlternateGK's address, so it's a separate config option (think of multihomed machines).
SkipForwards=1.2.3.4,5.6.7.8
N/A
To avoid circular forwarding, you shouldn't forward RRQs you get from the other GK (this statement is true for both, primary and alternate GK). Two mechanisms are used to identify whether a request should be forwarded. The first one looks for a flag in RRQ. Since few endpoints implement this, we need a second, more reliable way. Specify the other gatekeeper's IP in this list.
StatusPort=7000
7000
Status port to monitor the gatekeeper. See this section for details.
StatusTraceLevel=2
2
Default output trace level for new status interface clients. See this section for details.
TimestampFormat=ISO8601
Cisco
Control default format of timestamp strings generated by the gatekeeper.
This option affects
[SqlAcct],
[RadAcct],
[FileAcct]
and other modules, except
[CallTable].
You can further customize timestamp formatting per-module by configuring
per-module TimestampFormat
setting.
There are four predefined formats:
RFC822
- a default format used by the gatekeeper (example: Wed, 10 Nov 2004 16:02:01 +0100)ISO8601
- standard ISO format (example: 2004-11-10 T 16:02:01 +0100)Cisco
- format used by Cisco equipment (example: 16:02:01.534 CET Wed Nov 10 2004)MySQL
- simple format that MySQL can understand (example: 2004-11-10 16:02:01)If you need another format, you can build your own format string, using
rules known from strftime
C function (see man strftime or search MSDN for strftime).
In general, the format string consists of regular character and format codes, preceeded
by a percent sign. Example: "%Y-%m-%d and percent %%" will result in "2004-11-10 and percent %".
Some common format codes:
%a
- abbreviated weekday name%A
- full weekday name%b
- abbreviated month name%B
- full month name%d
- day of month as decimal number%H
- hour in 24-hour format%I
- hour in 12-hour format%m
- month as decimal number%M
- minute as decimal number%S
- second as decimal number%y
- year without century%Y
- year with century%u
- microseconds as decimal number (this is a GnuGk extension)%z
- time zone abbreviation (+0100)%Z
- time zone name%%
- percent sign
Most users will never need to change any of the following values. They are mainly used for testing or very sophisticated applications.
UseBroadcastListener=0
1
Defines whether to listen to broadcast RAS requests. This requires binding to all interfaces on a machine so if you want to run multiple instances of gatekeepers on the same machine you should turn this off.
UnicastRasPort=1719
1719
The RAS channel TSAP identifier for unicast.
MulticastPort=1718
1718
The RAS channel TSAP identifier for multicast.
MulticastGroup=224.0.1.41
224.0.1.41
The multicast group for the RAS channel.
EndpointSignalPort=1720
1720
Default port for call signalling channel of endpoints.
ListenQueueLength=1024
1024
Queue length for incoming TCP connection.
SignalReadTimeout=1000
1000
Time in miliseconds for read timeout on call signalling channels (Q931).
StatusReadTimeout=3000
3000
Time in miliseconds for read timeout on status channel.
StatusWriteTimeout=5000
5000
Time in miliseconds for write timeout on status channel.
This section defines log file related parameters. Currently it allows users to specify log file rotation options.
Rotate=Hourly | Daily | Weekly | Monthly
N/A
If set, the log file will be rotated based on this setting. Hourly rotation
enables rotation once per hour, daily - once per day, weekly - once per week
and monthly - once per month. An exact rotation moment is determined by a combination
of RotateDay
and RotateTime
variables. During rotation, an existing
file is renamed to CURRENT_FILENAME.YYYYMMDD-HHMMSS, where YYYYMMDD-HHMMSS
is replaced with the current timestamp, and new lines are logged to an empty
file. To disable the rotation, do not set Rotate
parameter or set it to 0.
[LogFile]
Rotate=Hourly
RotateTime=45
[LogFile]
Rotate=Daily
RotateTime=23:00
[LogFile]
Rotate=Weekly
RotateDay=Sun
RotateTime=00:59
[LogFile]
Rotate=Monthly
RotateDay=31
RotateTime=23:00
Call signalling messages may be passwd in two ways. The first method is Direct Endpoint Call Signalling, in which case the call signalling messages are passed directly between the endpoints. The second method is Gatekeeper Routed Call Signalling. In this method, the call signalling messages are routed through the gatekeeper between the endpoints. The choice of which methods is used is made by the gatekeeper.
When Gatekeeper Routed call signalling is used, the gatekeeper may choose whether to route the H.245 control channel and logical channels.
The gatekeeper doesn't route them. The H.245 control channel and logical channels are established directly between the endpoints.
The H.245 control channel is routed between the endpoints through the gatekeeper, while the logical channels are established directly between the endpoints.
The gatekeeper routes the H.245 control channel, as well as all logical channels, including RTP/RTCP for audio and video, and T.120 channel for data. In this case, no traffic is passed directly between the endpoints. This is usually called an H.323 Proxy, which can be regarded as an H.323-H.323 gateway.
This section defines the gatekeeper routed mode options (case I & II). The proxy feature is defined in the next section. All settings in this section are affected by reloading.
GKRouted=1
0
Whether to enable the gatekeeper routed mode.
H245Routed=1
0
Whether to route the H.245 control channel. Only takes effect if GKRouted=1
.
CallSignalPort=0
1721
The port of call signalling for the gatekeeper.
The default port is 1721
. We don't use the well-known port 1720
so you can run an H.323 endpoint in the same machine of the gatekeeper.
You may set it to 0
to let the gatekeeper choose an arbitrary port.
CallSignalHandlerNumber=2
1
The number of call signalling handler. You may increase this number in a heavy loaded gatekeeper. The number can only be increased at runtime. If you have a SMP machine, you can set this number to your number of CPUs.
RtpHandlerNumber=2
1
The number of RTP proxy handling threads.
AcceptNeighborsCalls=1
1
With this feature enabled, the call signalling thread will accept calls without a pre-existing CallRec found in the CallTable, provided an endpoint corresponding to the destinationAddress in Setup can be found in the RegistrationTable, and the calling party is its neighbors or parent GK. The gatekeeper will also use it's own call signalling address in LCF in responding to an LRQ. That means, the call signalling will be routed to GK2 in GK-GK calls. As a result, the CDRs in GK2 can correctly show the connected time, instead of 'unconnected'.
AcceptUnregisteredCalls=1
0
With this feature enabled, the gatekeeper will accept calls from any unregistered endpoint. However, it raises security risks. Be careful to use it.
RemoveH245AddressOnTunneling=1
0
Some endpoints send h245Address in the UUIE of Q.931 even when h245Tunneling is set to TRUE. This may cause interoperability problems. If the option is TRUE, the gatekeeper will remove h245Address when h245Tunneling flag is TRUE. This enforces the remote party to stay in tunnelling mode.
RemoveCallOnDRQ=0
1
With this option turning off, the gatekeeper will not disconnect a call if it receives a DRQ for it. This avoids potential race conditions when a DRQ overtakes a Release Complete. This is only meaningful in routed mode because in direct mode, the only mechanism to signal end-of-call is a DRQ.
DropCallsByReleaseComplete=1
0
According to Recommendation H.323, the gatekeeper could tear down a call by sending RAS DisengageRequest to endpoints. However, some bad endpoints just ignore this command. With this option turning on, the gatekeeper will send Q.931 Release Complete instead of RAS DRQ to both endpoints to force them drop the call.
SendReleaseCompleteOnDRQ=1
0
On hangup, the endpoint sends both Release Complete within H.225/Q.931 and
DRQ within RAS. It may happen that DRQ is processed first, causing the
gatekeeper to close the call signalling channel, thus preventing the
Release Complete from being forwarding to the other endpoint.
Though the gatekeeper closes the TCP channel to the destination,
some endpoints (e.g. Cisco CallManager) don't drop the call even if
the call signalling channel is closed.
This results in phones that keep ringing if the caller hangs up
before the callee pickups.
Setting this parameter to 1
makes the gatekeeper always send
Release Complete to both endpoints before closing the call when
it receives DRQ from one of the parties.
SupportNATedEndpoints=1
0
Whether to allow an endpoint behind an NAT box register to the gatekeeper. If yes, the gatekeeper will translate the IP address in Q.931 and H.245 channel into the IP of NAT box.
Since 2.0.2, the GnuGk supports NAT outbound calls (from an endpoint behind NAT to public networks) directly without any necessary modification of endpoints or NAT box. Just register the endpoint with the GnuGk and you can make call now.
ScreenDisplayIE=MyID
N/A
Modify the DisplayIE of Q.931 to the specified value.
ScreenCallingPartyNumberIE=0965123456
N/A
Modify the CallingPartyNumberIE of Q.931 to the specified value.
ScreenSourceAddress=MyID
N/A
Modify the sourceAddress field of UUIE element from Q.931 Setup message.
ForwardOnFacility=1
1
If yes, on receiving Q.931 Facility with reason callForwarded, the gatekeeper will forwards call Setup directly to the forwarded endpoint, instead of passing the message back to the caller. If you have broken endpoints that can't handle Q.931 Facility with reason callForwarded, turn on this option.
ShowForwarderNumber=0
0
Whether to rewrite the calling party number to the number of forwarder.
It's usually used for billing purpose.
Only valid if ForwardOnFacility=1
.
Q931PortRange=20000-20999
N/A (let the OS allocate ports)
Specify the range of TCP port number for Q.931 signalling channels. Note the range size may limit the number of concurrent calls.
H245PortRange=30000-30999
N/A (let the OS allocate ports)
Specify the range of TCP port number for H.245 control channels. Note the range size may limit the number of concurrent calls.
ConnectTimeout=60000
180000
Timeout value in milliseconds to wait before removing unconnected calls from the call table. This is a guard timer that does not allow unconnected calls to hang forever in the call table. Note that making this value too short may result in calls dropped before answered.
TcpKeepAlive=0
1
Enable/disable keepalive feature on TCP signaling sockets. This can help to detect inactive signaling channels and prevent dead calls from hanging in the call table. For this option to work, you also need to tweak system settings to adjust keep alive timeout. See docs/keepalive.txt for more details.
The section defines the H.323 proxy features. It means the gatekeeper will route all the traffic between the calling and called endpoints, so there is no traffic between the two endpoints directly. Thus it is very useful if you have some endpoints using private IP behind an NAT box and some endpoints using public IP outside the box.
The gatekeeper can do proxy for logical channels of RTP/RTCP (audio and video) and T.120 (data). Logical channels opened by fast-connect procedures or H.245 tunnelling are also supported.
Note to make proxy work, the gatekeeper must have direct connection to both networks of the caller and callee.
Enable=1
0
Whether to enable the proxy function. You have to enable gatekeeper routed mode first (see the previous section). You don't have to specify H.245 routed. It will automatically be used if required.
InternalNetwork=10.0.1.0/24
N/A
Define the networks behind the proxy. Multiple internal networks are allow. The proxy route channels only of the communications between one endpoint in the internal network and one external. If you don't specify it, all calls will be proxied.
InternalNetwork=network address/netmask[,network address/netmask,...]
The netmask can be expressed in decimal dot notation or CIDR notation (prefix length), as shown in the example.
InternalNetwork=10.0.0.0/255.0.0.0,192.168.0.0/24
T120PortRange=40000-40999
N/A (let the OS allocate ports)
Specify the range of TCP port number for T.120 data channels. Note the range size may limit the number of concurrent calls.
RTPPortRange=50000-59999
N/A (let the OS allocate ports)
Specify the range of UDP port number for RTP/RTCP channels. Note the range size may limit the number of concurrent calls.
ProxyForNAT=1
1
If yes, the gatekeeper will proxy for calls to which one of the endpoints participated is behind an NAT box. This ensure the RTP/RTCP stream can penetrate into the NAT box without modifying it. However, the endpoint behind the NAT box must use the same port to send and receive RTP/RTCP stream. If you have bad or broken endpoints that don't satisfy the precondition, you have better to disable this feature and let the NAT box forward RTP/RTCP stream for you.
ProxyForSameNAT=0
0
Whether to proxy for calls between endpoints from the same NAT box. You do not need to enable this feature in general, since usually endpoints from the same NAT box can communicate with each other.
This section explains how the various possible routing policies within the gatekeeper work.
The incoming call requests can be routed using a number of routing providers:
explicit
The destination is explicitly specified in the routing request.
internal
The classical rule; search the destination in RegistrationTable
parent
Route the call using information sent by the parent GK in reply to an ARQ the gatekeeper will send.
neighbor
Route the call using neighbors by exchanging LRQ messages
dns
The destination is resolved from DNS, provided it is resolvable
vqueue
Use the virtual queue mechanism and generate a RouteRequest event to let an external application do the routing (can only be used OnARQ)
If one policy does not match, the next policy is tried.
These policies can be applied to a number of routing request types, and routing input data. The different types are: ARQ, LRQ, Setup and Facility (with the callForwarded reason) There is also the general routing policy, which is kind of a default for the other types.
[RoutingPolicy]
h323_ID=dns,internal
002=neighbor,internal
Default=internal,neighbor,parent
When one of the messages is received which calls for a routing decision, all calls to an alias of the h323_ID type will be resolved using DNS. If DNS fails to resolve the alias, it is matched against the internal registration table. If a call is requested to an alias starting with 002, first the neighbours are checked and then the internal registration table. If the requested alias is not an h323_ID or an alias starting with 002, the default policy is used by querying the internal registration table, then the neighbours, and if that fails the parent.
For the ARQ, LRQ, Setup and Facility messages one would use the [RoutingPolicy::OnARQ], [RoutingPolicy::OnLRQ], [RoutingPolicy::OnSetup] and [RoutingPolicy::OnFacility] sections using the syntax explained above.
Define a number of rules who is allowed to connect to the status port. Whoever has access to the status port has full control over your gatekeeper. Make sure this is set correctly.
rule=allow
forbid
Possible values are
forbid
- disallow any connection.allow
- allow any connectionexplicit
- reads the parameter ip=value
where ip
is the IP address of the peering client,
value
is 1,0
or allow,forbid
or yes,no
.
If ip
is not listed the parameter default
is used.regex
- the IP of the client is matched against the given regular expression.
To allow client from 195.71.129.0/24 and 195.71.131.0/24:
regex=^195\.71\.(129|131)\.[0-9]+$
password
- the user has to input appropriate username and password to login. The format of username/password is the same as
[SimplePasswordAuth] section.
Moreover, these rules can be combined by "|" or "&". For example,
rule=explicit | regex
explicit
or regex
rule.
rule=regex & password
regex
rule, and the user has to login by username and password.
default=allow
forbid
Only used when rule=explicit
.
Shutdown=forbid
allow
Whether to allow shutdown the gatekeeper via status port.
DelayReject=5
0
How long (in seconds) to wait before rejecting invalid username/password for the status line access.
This section lists what E.164 numbers are routed to a specific gateway.
gw-alias=prefix[,prefix,...]
Note you have to specify the alias of the gateway.
If a gateway registered with the alias, all numbers beginning with
the prefixes are routed to this gateway. Special characters .
and !
can be used here to match any digit and disable the prefix.
test-gw=02,03
This section defines the rewriting rules for dialedDigits (E.164 number).
[!]original-prefix=target-prefix[,target-prefix,...]
If the number is beginning with original-prefix
,
it is rewritten to target-prefix
. Multiple targets are possible.
If the `!
' flag precedes the original-prefix
, the sense is inverted
and the target-prefix is prepended to the dialed number. Special wildcard
characters ('.'
and '%'
) are available.
08=18888
If you dial 08345718
, it is rewritten to 18888345718
.
!08=18888
If you dial 09345718
, it is rewritten to 1888809345718
.
Option:
Fastmatch=08
N/A
Only rewrite dialDigits beginning with the specified prefix.
This section describes rewriting the dialedDigits E.164 number depending on the gateway a call has come from or is being sent to. This allows for more flexible manipulation of the dialedDigits for routing etc. In combination with the RasSrv::RewriteE164 you can have triple stage rewriting:
Call from "gw1", dialedDigits 0867822
|
|
V
Input rules for "gw1", dialedDigits now 550867822
|
|
V
Global rules, dialedDigits now 440867822
|
|
V
Gateway selection, dialedDigits now 440867822, outbound gateway "gw2"
|
|
V
Output rules for "gw2", dialedDigits now 0867822
|
|
V
Call to "gw2", dialedDigits 0867822
gw-alias=in|out=[!]original-prefix=target-prefix[;in|out...]
If the call matches the gateway, the direction and begins with
original-prefix
it is rewritten to target-prefix
.
If the `!
' flag precedes the original-prefix
, the sense is inverted.
Special wildcard characters ('.'
and '%'
) are available.
Multiple rules for the same gateway should be seperated by ';'.
gw1=in=123=321
If a call is received from "gw1" to 12377897
, it is rewritten to 32177897
before further action is taken.
In this section you can put endpoints that don't have RAS support
or that you don't want to be expired. The records will always
keep in registration table of the gatekeeper.
However, You can still unregister it via status port.
Special characters .
and !
can be used with prefixes here to match any digit and disable the prefix.
IP[:port]=alias[,alias,...;prefix,prefix,...]
For gateway,
10.0.1.5=Citron;009,008
For terminal,
10.0.1.10:1720=700
If the destination of an ARQ is unknown, the gatekeeper sends LRQs to
its neighbors to ask if they have the destination endpoint.
A neighbor is selected if one of its prefixes matches the destination
or it has ``*
'' prefix. More than one prefix can be specified.
You can use special characters ``.
'' and ``!
'' to do wildcard
matching and disable a specific prefix.
Conversely, the gatekeeper will only reply to LRQs sent from neighbors
defined in this section.
If you specify an empty prefix, no LRQ will be sent to that neighbor,
but the gatekeeper will accept LRQs from it. By the empty prefix it is meant
a single semicolon appended to the neighbor entry. Example:
GK1=192.168.0.5;
If you skip the semicolon, LRQs will be always sent to this neighbor.
The password
field is used to authenticate LRQs from that neighbor.
See section
[Gatekeeper::Auth] for details.
Neighbor handling has changed significantly from version 2.0 to version 2.2. Neighbors can be specified now in two ways - the old one and the new one.
GKID=ip[:port;prefixes;password;dynamic]
GK1=192.168.0.5;*
GK2=10.0.1.1:1719;035,036;gk2
GK3=gk.citron.com.tw;;gk3;1
GKID="GnuGK" | "CiscoGK" | "ClarentGK" | "GlonetGK"
[RasSrv::Neighbors]
GK1=CiscoGK
GK2=GnuGK
[Neighbor::GK1]
GatekeeperIdentifier=GK1
Host=192.168.1.1
SendPrefixes=02
AcceptPrefixes=*
ForwardLRQ=always
[Neighbor::GK2]
GatekeeperIdentifier=GK2
Host=192.168.1.2
SendPrefixes=03,0048
AcceptPrefixes=0049,001
ForwardHopCount=2
ForwardLRQ=depends
The new format specifies in [RasSrv::Neighbors]
section only gatekeeper
types and configuration for each neighbor is placed in a separate section.
Defines some features of LRQ and LCF.
NeighborTimeout=1
2
Timeout value in seconds to wait responses from neighbors. If no response from all neighbors after timeout, the gatekeeper will reply an ARJ to the endpoint sending the ARQ.
ForwardHopCount=2
N/A
If the gatekeeper receives an LRQ that the destination is either unknown, it may forward this message to its neighbors. When the gatekeeper receives an LRQ and decides that the message should be forwarded on to another gatekeeeper, it first decrements hopCount field of the LRQ. If hopCount has reached 0, the gatekeeper shall not forward the message. This options defines the number of gatekeepers through which an LRQ may propagate. Note it only affects the sender of LRQ, not the forwarder. This setting can be overriden with configuration of a particular neighbor.
AlwaysForwardLRQ=1
0
Force the gatekeeper to forward an LRQ even if there is no hopCount in the LRQ. To avoid LRQ loops, you should use this option very carefully. This option is used only for an old-style (2.0) neighbor configuration, the new one reads the settings from a neighbor-specific config section.
AcceptForwardedLRQ=1
1
Whether to accept an LRQ forwarded from neighbors. This setting can be overriden with configuration of a particular neighbor.
IncludeDestinationInfoInLCF=0
1
The gatekeeper replies LCFs containing destinationInfo and destinationType fields, the aliases and terminal type of the destination endpoint. The neighbor gatekeeper can then save the information to suppress later LRQs. However, some vendors' gatekeepers misuse the information, thus result in interoperability problems. Only turn off this option if you encounter problems upon communicating with a third-party gatekeeper.
ForwardResponse=0
0
If the gatekeeper forwards received LRQ message it can decide either to receive the LCF response or to let it travel back directly to the LRQ origintator. Set this option to 1, if the gatekeeper needs to receive LCF messages for forwarded LRQs. This setting can be overriden with configuration of a particular neighbor.
ForwardLRQ=always | never | depends
depends
This settings determines whether the received LRQ should be forwarded
or not. always
forwards LRQ unconditionally, never
blocks LRQ
forwarding, depends
tells the gatekeeper to forward LRQ only if its
hop count is greater than 1. This setting can be overriden with configuration
of a particular neighbor.
Sections starting with [Neighbor::
are for neighbor specific configuration.
GatekeeperIdentifier=GKID
N/A
Gatekeeper identifier for this neighbor. If this options is not specified,
the identifier is taken from the second part of this Neighbor::
section name.
Host=192.168.1.1
N/A
An IP address for this neighbor.
Password=secret
N/A
A password to be used to validate crypto tokens received from incoming LRQs.
It is not yet implemented
.
Dynamic=0
0
1 means that the IP address for this neighbor can change.
SendPrefixes=004,002:=1,001:=2
N/A
A list of prefixes that this neighbor expects LRQs to receive for.
If '*' is specified, LRQs will always be sent to this neighbor.
A priority can be given to each prefix for each neighbor (using := syntax),
so in case of multiple LCF received from multiple neighbor, the one
with the highest priority will be selected to route the call.
One can also direct the gatekeeper to send LRQ to this neighbor
based on an alias type:
SendPrefixes=h323_ID,dialedDigits,001
AcceptPrefixes=*
*
A list of prefixes that the gatekeeper will accept in LRQs received
from this neighbor. If '*' is specified, all LRQs will be accepted from this neighbor.
One can also direct the gatekeeper to accept LRQ from this neighbor
based on an alias type:
AcceptPrefixes=dialedDigits
ForwardHopCount=2
N/A
If the gatekeeper receives an LRQ that the destination is either unknown, it may forward this message to its neighbors. When the gatekeeper receives an LRQ and decides that the message should be forwarded on to another gatekeeeper, it first decrements hopCount field of the LRQ. If hopCount has reached 0, the gatekeeper shall not forward the message. This options defines the number of gatekeepers through which an LRQ may propagate. Note it only affects the sender of LRQ, not the forwarder.
AcceptForwardedLRQ=1
1
Whether to accept an LRQ forwarded from this neighbor.
ForwardResponse=0
0
If the gatekeeper forwards received LRQ message it can decide either to receive the LCF response or to let it travel back directly to the LRQ origintator. Set this option to 1, if the gatekeeper needs to receive LCF messages for forwarded LRQs.
ForwardLRQ=always | never | depends
depends
This settings determines whether the received LRQ should be forwarded
or not. always
forwards LRQ unconditionally, never
blocks LRQ
forwarding, depends
tells the gatekeeper to forward LRQ only if its
hop count is greater than 1. This setting can be overriden with configuration
of a particular neighbor.
AcceptEndpointIdentifier=1
1
Whether to accept endpointIdentifier specified in a full RRQ.
AcceptGatewayPrefixes=1
1
A gateway can register its prefixes with the gatekeeper by containing supportedPrefixes in the terminalType field of RRQ. This option defines whether to accept the specified prefixes of a gateway.
OverwriteEPOnSameAddress=1
0
In some networks an endpoint's IP address may change unexpectedly. This may happen when an endpoint is using a PPP connection (e.g. modem or ADSL). This option defines how to handle a registration request (RRQ) from an IP address which does not match what we have stored. The default action is to reject the request. With this option enabled the conflicting request will cause an unregister request (URQ) to be sent for the existing IP address and the entry to be removed allowing the endpoint to register with the new address.
ArjReasonRouteCallToSCN=0
1
If yes, the gatekeeper rejects a call from a gateway to itself by reason routeCallToSCN.
ArjReasonRouteCallToGatekeeper=1
1
If yes, the gatekeeper rejects an answered ARQ without a pre-existing CallRec found in the CallTable by reason routeCallToGatekeeper in routed mode. The endpoint shall release the call immediately and re-send call Setup to the gatekeeper.
CallUnregisteredEndpoints=0
1
With this option set on, the gatekeeper will accept an ARQ from a registered endpoint with destCallSignalAddress, no matter the address is belongs to a registered endpoint or not. That means you can explicitly specify the IP of endpoint (registered or not) you want to call.
RemoveTrailingChar=#
N/A
Specify the trailing character to be removed in destinationInfo. For example, if your endpoint incorrectly contains the termination character like `#' in destinationInfo, you may remove it by this option.
RoundRobinGateways=0
1
Enable/disable round-robin gateway selection, if more than one gateway matches a dialed number. If disabled, the first available gateway will be selected. Otherwise, subsequent calls will be sent to gateways in round-robin fashion.
GenerateNBCDR=0
1
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 debug purpose.
GenerateUCCDR=0
0
Generate CDRs for calls that are unconnected. This is usually used for debug purpose. Note 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.
DefaultCallDurationLimit=3600
0
Default maximum call duration limit (seconds).
Set it to 0
to disable this feature and not limit
calls duration.
AcctUpdateInterval=60
0
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 [Gatekeeper::Acct]). In general, the accounting update is to provide backend services with incrementing call duration for connected calls. The default value 0 tells the gatkeeper to not send accounting updates at all. Please note that setting short periods may decrease GK performance.
TimestampFormat=Cisco
RFC822
Format of timestamp strings printed inside CDRs.
The gatekeeper can work as an endpoint by registering with another gatekeeper. With this feature, you can easily build gatekeeper hierarchies. The section defines the endpoint features for the gatekeeper.
Gatekeeper=10.0.1.1
no
Define a parent gatekeeper for the endpoint(gatekeeper) to register with.
Don't try to register with yourself, unless you want to be confusing.
To disable this feature, set the field to be no
.
Type=Gateway
Gateway
Define the terminal type for the endpoint.
The valid values are Gateway
or Terminal
.
H323ID=CitronProxy
<Name>
Specify the H.323 ID aliases for the endpoint. Multiple aliases can be separated by comma.
E164=18888600000,18888700000
N/A
Define the E.164 (dialedDigits) aliases for the endpoint. Multiple aliases can be separated by comma.
Password=123456
N/A
Specify a password to be sent to the parent gatekeeper. All RAS requests will contain the password in the cryptoTokens field (MD5 & HMAC-SHA1-96) and the tokens field (CAT). To send RAS requests without both cryptoTokens and tokens fields, set the password to be empty.
Besides, the password is also used in LRQs sent to neighbor gatekeepers.
Prefix=188886,188887
N/A
Register the specified prefixes with the parent gatekeeper.
Only takes effect when the Type is Gateway
.
TimeToLive=900
60
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 replied to the RRQ.
RRQRetryInterval=10
3
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.
ARQTimeout=2
2
Define the timeout value in second for ARQs.
UnregisterOnReload=1
0
Defines whether the child gatekeeper unregisters and re-registers with it's parent when receiving a Reload command.
NATRetryInterval=60
60
How long to wait before trying to reconnect TCP NAT signalling socket (seconds). This can happen when either the connection cannot be established or it has been broken.
NATKeepaliveInterval=86400
86400
Define how often the TCP NAT signalling connection with a parent gatekeeper is refreshed. As NAT boxes usually keep TCP mappings for a definite time only, it is good to set this to some value a bit shorter than NAT box mapping timeout. Refreshing is done by sending a special Q.931 IncomingCallProceeding message. If you NAT performs TCP port translation, you may need to set it to a values as short as 60 seconds.
Discovery=0
1
Decide whether to discover the parent gatekeeper by sending GRQ first.
UseAlternateGK=0
1
Enable alternate gatekeepers feature. If GRJ/GCF/RFC messages received
from a parent gatekeeper contain a list of alternate gatekeepers, this
information is stored and can be used to reregister with another gatekeeper
in case of any failure. If you don't want to use this feature, set this
variable to 0
.
GatekeeperIdentifier=ParentGK
Not set
Define it if you want to accept only such 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 indentifiers set.
EndpointIdentifier=OpenH323GK
Not set
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.
Once you specify prefix(es) for your gatekeeper endpoint, the parent gatekeeper will route calls with dialedDigits beginning with that prefixes. The child gatekeeper can rewrite the destination according to the rules specified in this section. By contrast, when an internal endpoint calls an endpoint registered to the parent gatekeeper, the source will be rewritten reversely.
external prefix=internal prefix
For example, if you have the following configuration,
[Parent GK]
ID=CitronGK
/ \
/ \
/ \
/ \
[Child GK] [EP3]
ID=ProxyGK E164=18888200
Prefix=188886
/ \
/ \
/ \
[EP1] [EP2]
E164=601 E164=602
With this rule:
188886=6
When EP1 calls EP3 by 18888200
, the CallingPartyNumber in the Q.931 Setup
will be rewritten to 18888601
. Conversely, EP3 can reach EP1 and EP2
by calling 18888601
and 18888602
, respectively. In consequence, an
endpoint registered to the child GK with prefix '6
' will appear
as an endpoint with prefix '188886
', for endpoints registered to
the parent gatekeeper.
The section does not relate to the section RasSrv::RewriteE164, though the later will take effect first.
The section defines the authentication mechanism for the gatekeeper.
authrule=actions
<authrule> := SimplePasswordAuth | AliasAuth | PrefixAuth | RadAuth | RadAliasAuth | ...
<actions> := <control>[;<ras>|<q931>,<ras>|<q931>,...]
<control> := optional | required | sufficient
<ras> := GRQ | RRQ | URQ | ARQ | BRQ | DRQ | LRQ | IRQ
<q931> := Setup | SetupUnreg
ok
- The request is authenticated by this module.fail
- The authentication fails and should be rejected.next
- The rule cannot determine the request.optional
- If the rule cannot determine the request, it is passed to next rule.required
- The requests should be authenticated by this module, or it would be rejected. The authenticated request would then be passwd to next rule.sufficient
- If the request is authenticated, it is accepted, or it would be rejected. That is, the rule determines the fate of the request. No rule should be put after a sufficient rule, since it won't take effect.Currently supported modules:
SimplePasswordAuth/SQLPasswordAuth/LDAPPasswordAuth
These modules check the tokens or cryptoTokens fields of RAS message.
The tokens should contain at least generalID and password.
For cryptoTokens, cryptoEPPwdHash tokens hashed by simple MD5 and
nestedcryptoToken tokens hashed by HMAC-SHA1-96 (libssl must be installed!)
are supported now. For tokens tokens hashed by CAT (Cisco Access Token)
and a clear text username/password are supported now.
The ID and password are read from
[SimplePasswordAuth] section,
an SQL database or LDAP
for SimplePasswordAuth
, SQLPasswordAuth
and LDAPPasswordAuth
modules, respectively. MySQLPasswordAuth
module is supported for backward compatibility.
AliasAuth/SQLAliasAuth/LDAPAliasAuth
The module can only be used to authenticate RegistrationRequest (RRQ).
The IP of an endpoint with a given alias should match a specified pattern.
For AliasAuth
the pattern is defined in
[RasSrv::RRQAuth] section.
For SQLAliasAuth
, the pattern is retrieved from an SQL database,
defined in
[SQLAliasAuth] section.
For LDAPAliasAuth
the alias (default: mail attribute) and IP
(default: voIPIpAddress attribute) must be found in one LDAP entry.
Support for MySQLAliasAuth
is maintained for backward compatibility.
PrefixAuth
Originally known as GkAuthorize
.
The IP or aliases of a request with a given prefix must match a specified
pattern. See section
[PrefixAuth] for details.
Currently the module can only authorize
AdmissionRequest (ARQ) and LocationRequest (LRQ).
RadAuth
Provides authentication based on H.235 username/password
security scheme. Authenticates RRQ, ARQ and Q.931 Setup through remote
RADIUS servers. It passes to RADIUS servers usernames and passwords
extracted from CAT (Cisco Access Tokens) tokens carried
inside RRQ, ARQ or Setup packets. Therefore if your endpoints do not
support CATs or you do not need authentication scheme based on
individually assigned usernames/password - this module will not
work for you (but you may check RadAliasAuth
module).
See section
[RadAuth] for details.
RadAliasAuth
Provides authentication based on endpoint aliases
and/or call signalling IP addresses with remote RADIUS servers.
It does not need any H.235 tokens inside RAS messages,
so it can be used on a wider range of systems as compared to RadAuth
.
RRQ, ARQ and Q.931 Setup messages can be authenticated using this module.
See section
[RadAliasAuth] for details.
You can also configure a rule to check only for some particular RAS messages.
The following example configures SimplePasswordAuth
as an optional rule
to check RRQ and ARQ. If an RRQ is not checked (not contains
tokens or cryptoTokens fields), it is checked by AliasAuth
.
The default is to accept all requests.
SimplePasswordAuth=optional;RRQ,ARQ
AliasAuth=sufficient;RRQ
The example below authenticates all calls, checking signalling Setup message details, using RadAliasAuth module.
RadAliasAuth=required;Setup
default=allow
This example checks endpoint registrations (RRQ) and call admissions (ARQ) either by means of username/password (RadAuth) or alias/IP (RadAliasAuth). Additionally, if the call is from an unregistered endpoint (and therefore no RRQ or ARQ authentication has been performed), Setup message authentication using RadAliasAuth takes place (SetupUnreg).
RadAuth=optional;RRQ,ARQ
RadAliasAuth=required;RRQ,ARQ,SetupUnreg
default=allow
The section defines the userid and password pairs used by
SimplePasswordAuth
module.
Use `make addpasswd
' to generate the utility addpasswd
.
Usage:
addpasswd config userid password
Options:
KeyFilled=123
0
Default value to initialize the encryption key.
CheckID=1
0
Check if the aliases match the ID in the tokens.
PasswordTimeout=120
-1
The module SimplePasswordAuth
and all its descendants will cache an
authenticated password. This field define the cache timeout value in second.
0
means never cache the password, while a negative value
means the cache never expires.
Authenticate H.235 enabled endpoints using passwords stored in the SQL database. This section defines SQL driver to use, SQL database connection parameters and the query to use to retrieve passwords.
Driver=MySQL | PostgreSQL
SQL database driver to use. Currently, MySQL
and PostgreSQL
drivers
are implemented.
Host=DNS[:PORT] | IP[:PORT][;DNS[:PORT] | IP[:PORT]]...
localhost
SQL server host address. Can be in the form of DNS[:PORT]
or IP[:PORT]
.
Like sql.mycompany.com
or sql.mycompany.com:3306
or 192.168.3.100
.
Multiple hosts, separated by the semicolon, may be specified to support failover.
Database=billing
billing
The database name to connect to.
Username=gnugk
The username used to connect to the database.
Password=secret
The password used to connect to the database. If the password is not specified, a database connection attempt without any password will be made.
CacheTimeout=120
0
This field defines how long (alias;password) pairs retrieved from the database
will be cached in the local memory. The cache timeout value is expressed in seconds.
0
means to not cache passwords, while a negative value
means the cache never expires (only reload
command will refresh the cache).
MinPoolSize=5
1
Define the number of active SQL connections. This allows better peformance
under heave load, because more than 1 concurrent query can be executed
at the same time. MinPoolSize=1
setting simulates old behaviour,
when access to the SQL database is serialized (one query at time).
Query=SELECT ...
N/A
Defines SQL query used to retrieve H.235 password from the database. The query
is parametrized - that means parameter replacement is made before each query
is executed. Parameter placeholders are denoted by %1, %2, ... strings.
Specify %% to embed a percent character before a digit into string (like %%1),
specify %{1} to allow expansion inside complex expressions like %{1}123.
For SQLPasswordAuth
two parameters are defined:
%1
- the actual alias to query the password for%2
- the gatekeeper identifierSample query strings:
SELECT h235password FROM users WHERE alias = '%1' AND active
SELECT h235password FROM users WHERE alias = '%1' AND gk = '%2'
Define the MySQL database, table and fileds to retrieve the userid and password. This is obsolete, use [SQLPasswordAuth] instead.
Host=localhost
localhost
Host name or IP of the MySQL server.
Port=5353
5353
Port the MySQL server is listening on (if different for the default).
Database=billing
billing
The database to connect.
User=cwhuang
Password=123456
The user name and password used to connect to the database.
Table=customer
The table in the database to query.
KeyField=IPN
A name for the column that contains user alias.
DataField=Password
A name for the column that contains user password.
ExtraCriterion=Kind > 0
N/A
Specify extra criterion.
CacheTimeout=30
0
Timeout value after username/password pairs cached in memory will be refreshed from the database. Default is to not cache passwords at all (CacheTimeout=0). -1 means the cache does not expire - it will be refreshed only when the gatekeeper is reloaded.
The SQL command will be issused:
SELECT $DataField FROM $Table WHERE $KeyField = %id [AND $ExtraCriterion]
Specify the action on RRQ reception (confirm or deny) for AliasAuth
module.
The first alias (this will mostly be an H323ID) of the endpoint to
register is looked up in this section. If a parameter is found the value will
apply as a rule. A rule consists of conditions separated by "&".
A registration is accepted when all conditions apply.
<authrules> := empty | <authrule> "&" <authrules>
<authrule> := <authtype> ":" <authparams>
<authtype> := "sigaddr" | "sigip"
<autparams> := [!&]*
The notation and meaning of <authparams>
depends on
<authtype>
:
sigaddr
- extended regular expression that has to match agains the
``PrintOn(ostream)'' representation of the signal address of the request.
Example:
sigaddr:.*ipAddress .* ip = .* c0 a8 e2 a5 .*port = 1720.*
sigip
- specialized form of `sigaddr
'.
Write the signalling ip adresse using (commonly used) decimal notation:
``byteA.byteB.byteC.byteD:port
''.
Example:
sigip:192.168.242.165:1720
allow
- always accept the alias.
deny
- always reject the alias.
Authenticate endpoints using rules stored in the SQL database (the rules conform to the format defined in the [RasSrv::RRQAuth] section). This section defines SQL driver to use, SQL database connection parameters and the query to use to retrieve the patterns.
Driver=MySQL | PostgreSQL
SQL database driver to use. Currently, MySQL
and PostgreSQL
drivers
are implemented.
Host=DNS[:PORT] | IP[:PORT][;DNS[:PORT] | IP[:PORT]]...
localhost
SQL server host address. Can be in the form of DNS[:PORT]
or IP[:PORT]
.
Like sql.mycompany.com
or sql.mycompany.com:3306
or 192.168.3.100
.
Multiple hosts, separated by the semicolon, may be specified to support failover.
Database=billing
billing
The database name to connect to.
Username=gnugk
The username used to connect to the database.
Password=secret
The password used to connect to the database. If the password is not specified, a database connection attempt without any password will be made.
CacheTimeout=120
0
This field defines how long (alias;authrule) pairs retrieved from the database
will be cached in the local memory. The cache timeout value is expressed in seconds.
0
means to not cache rules, while a negative value
means the cache never expires (only reload
command will refresh the cache).
MinPoolSize=5
1
Define the number of active SQL connections. This allows better peformance
under heave load, because more than 1 concurrent query can be executed
at the same time. MinPoolSize=1
setting simulates old behaviour,
when access to the SQL database is serialized (one query at time).
Query=SELECT ...
N/A
Defines SQL query used to retrieve alias rule from the database. The query
is parametrized - that means parameter replacement is made before each query
is executed. Parameter placeholders are denoted by %1, %2, ... strings.
Specify %% to embed a percent character before a digit into string (like %%1),
specify %{1} to allow expansion inside complex expressions like %{1}123.
For SQLAliasAuth
two parameters are defined:
%1
- the actual alias to query the rule for%2
- the gatekeeper identifierSample query strings:
SELECT authrule FROM users WHERE alias = '%1' AND active
SELECT 'sigip:' || host(ip) || port FROM users WHERE alias = '%1'
Define the MySQL database, table and fileds to retrieve a pattern for an alias. This section is OBSOLETE and provided only for backward compatibility. Please use [SQLAliasAuth] instead.
Host=localhost
localhost
Host name or IP of the MySQL server.
Port=5353
5353
Port the MySQL server is listening on (if different for the default).
Database=billing
billing
The database to connect.
User=cwhuang
Password=123456
The user name and password used to connect to the database.
Table=customer
The table in the database to query.
KeyField=alias
A name for the column that contains user alias.
DataField=IPADDR
A name for the column that contains a AuthAlias rule. This can be an IP number or any other rule, see section [RasSrv::RRQAuth]..
ExtraCriterion=Kind > 0
N/A
Specify extra criterion.
CacheTimeout=30
0
Timeout value after username/password pairs cached in memory will be refreshed from the database. Default is to not cache passwords at all (CacheTimeout=0). -1 means the cache does not expire - it will be refreshed only when the gatekeeper is reloaded.
The SQL command will be issused:
SELECT $DataField FROM $Table WHERE $KeyField = %alias [AND $ExtraCriterion]
The section defines the authentication rule for PrefixAuth
module.
Currently, only ARQs and LRQs can be authorized by this module.
First, a most specific prefix is selected according to the destinationInfo
field of the received request. Then the request is accepted or rejected
according to the matched rules with most specific netmask.
If no matched prefix is found,
and the default
option is specified, the request is accepted
or rejected according to that. Otherwise
it is rejected or passed to next authentication module
according to the module requirement.
prefix=authrule[|authrule|...]
<authrule> := <result> <authrule>
<result> := deny | allow
<authrule> := [!]ipv4:<iprule> | [!]alias:<aliasrule>
<iprule>
can be specified in decimal dot notation or
CIDR notation, <aliasrule>
is expressed in regular expression.
If the `!
' flag precedes the rule, the sense is inverted.
555=deny ipv4:10.0.0.0/27|allow ipv4:0/0
5555=allow ipv4:192.168.1.1|deny ipv4:192.168.1.0/255.255.255.0
86=deny !ipv4:172.16.0.0/24
09=deny alias:^188884.*
ALL=allow ipv4:ALL
In this configuration, all endpoints except from network 10.0.0.0/27
are allow to call prefix 555 (except 5555).
Endpoints from 192.168.1.0/24
are not allowed to call prefix 5555,
except 192.168.1.1
.
Endpoints not from 172.16.0.0/24
are denied to call prefix 86.
Endpoints having an alias beginning with 188884 are not allowed to call
prefix 09. All other situations are allowed.
This section defines configuration settings that enable RADIUS authentication based on H.235 CATs (Cisco Access Tokens) present in RRQ, ARQ RAS requests and Q.931 Setup messages.
Servers=SERVER1[:AUTH_PORT[:ACCT_PORT[:SECRET]]];SERVER2[:AUTH_PORT[:ACCT_PORT[:SECRET]]];...
N/A
RADIUS servers to be used for authentication. The list can contain an arbitrary
number of servers. The order of servers is important, because servers will
be queried by the RADIUS module in the given order. If no port information
is provided, port number from DefaultAuthPort
will be used. If no secret is set,
the default shared secret from SharedSecret
is taken.
Servers names can be IP addresses or DNS names.
Servers
lines:Servers=192.168.1.1
Servers=192.168.1.1:1645
Servers=192.168.1.1:1645:1646:secret1
Servers=radius1.mycompany.com:1812
Servers=radius1.mycompany.com;radius2.mycompany.com
Servers=radius1.mycompany.com:1812:1813:secret1;radius2.mycompany.com:1812:1813:secret2
LocalInterface=IP_OR_FQDN
N/A
Particular local network interface that RADIUS client should use in order to communicate with RADIUS servers. This parameter can be useful on NAT machines to restrict number of network interfaces used for RADIUS communication. By default this value is empty and allows RADIUS requests to be sent on any (best suitable) network interface. If you are not sure what you are doing, it is better to leave this option unset.
RadiusPortRange=10000-11000
N/A
By default (if this option is not set) RADIUS client allocates ports dynamically as specified by the operating system. If you want to restrict RADIUS client to use ports from a particular range only - set this parameter.
DefaultAuthPort=PORT_NO
1812
Default port number to be used for RADIUS authentication requests
(Access-Request packets), if not overriden by Servers
attribute.
SharedSecret=SECRET
N/A (empty string)
Secret used to authenticate this GnuGk (NAS client) to RADIUS
server. It should be a cryptographically strong password. This is the default
value used, if no server-specific secret is set in the Servers
.
RequestTimeout=TIMEOUT_MS
2000
(miliseconds)
Timeout (miliseconds) for RADIUS server response to a request sent by GnuGk. If no response is received within this time period, next RADIUS server is queried.
IdCacheTimeout=TIMEOUT_MS
9000
(miliseconds)
Timeout (miliseconds) for RADIUS request 8-bit identifiers to be unique. If all 8-bit identifier range is exhausted within this period, new client socket (UDP socket) is allocation by RADIUS module. Let's take the example: we have approximatelly 60 RRQs/sec - after ca. 4 seconds 8-bit identifiers range gets exhausted - new socket allocated - after next 4 seconds the second 8-bit identifiers range gets exhauted - third socket allocated - after 9th second identifiers from the pool 1 are available again - ... . In general, too long timeout - too much resources consumed, too short timeout - RADIUS server may take incoming packets as duplicated and therefore drop it.
SocketDeleteTimeout=TIMEOUT_MS
60000
(miliseconds) - 60 s
Timeout for unused RADIUS sockets to be closed. It is used
in conjunction with IdCacheTimeout
- additional sockets
created during heavy GK load time periods for serving incoming
requests are closed during idle periods.
RequestRetransmissions=NUMBER
2
How many times a single RADIUS request is transmissed to every
configured RADIUS server (if no response is received). 1 means
no retransmission, 2 - single retransmission, ... . Exact retransmission
method is defined by RoundRobinServers
attribute.
RoundRobinServers=BOOLEAN
1
RADIUS requests retransmission method.
If set to 1, RADIUS request is transmitted in the following way (until response is received):
Server #1 Attempt #1, Server #2 Attempt #1, ..., Server #N Attempt #1
...
Server #1 Attempt #RequestRetransmissions, ..., Server #1 Attempt #RequestRetransmissions
If set to 0, the following sequence is preserved:
Server #1 Attempt #1, ..., Server #1 Attempt #RequestRetransmissions
...
Server #N Attempt #1, ..., Server #N Attempt #RequestRetransmissions
AppendCiscoAttributes=BOOLEAN
0
If set, Cisco Vendor Specific RADIUS attibutes are included in RADIUS requests (h323-conf-id,h323-call-origin,h323-call-type).
IncludeTerminalAliases=BOOLEAN
1
If set, Cisco VSA 'h323-ivr-out' attribute is sent with a list of aliases the endpoint is registering (RRQ.m_terminalAlias). This attribute is provided in order to provide fine control over the list of aliases the endpoint is allowed to register with. Format of this attribute is:
Cisco-AV-Pair = "h323-ivr-out=terminal-alias:" alias [,alias] [;]
Example:
Cisco-AV-Pair = "h323-ivr-out=terminal-alias:helpdesk,support,77771;"
UseDialedNumber=BOOLEAN
0
Select Called-Station-Id number type between the original one (as dialed
by the user) - UseDialedNumber=1
- and the rewritten one - UseDialedNumber=0
.
This section defines configuration settings that enable RADIUS authentication based on endpoint aliases and/or IP adresses present in RRQ RAS requests, ARQ RAS request or Q.931 Setup request. This authentication scheme is useful both for endpoints registered at the gatekeeper (ARQ,RRQ) and calls from unregistered endpoints (Setup).
Servers=SERVER1[:AUTH_PORT[:ACCT_PORT[:SECRET]]];SERVER2[:AUTH_PORT[:ACCT_PORT[:SECRET]]];...
N/A
RADIUS servers to be used for RAS requests authentication.
This list can contain an arbitrary number of servers. The order of servers
is important, because servers will be queried by the RADIUS module
in the given order. If no port information is specified, port number from
DefaultAuthPort
will be used. If no secret is set,
the default shared secret from SharedSecret
is used.
Servers can be IP addresses or DNS names.
Servers=192.168.3.1:1645;192.168.3.2:1812:1813:mysecret;radius.mycompany.com
LocalInterface=IP_OR_FQDN
N/A
Particular local network interface that RADIUS client should use in order to communicate with RADIUS servers. This parameter can be useful on NAT machines to restrict number of network interfaces used for RADIUS communication. By default this value is empty and allows RADIUS requests to be sent on any (best suitable) network interface. If you are not sure what you are doing, it is better to leave this option unset.
RadiusPortRange=10000-11000
N/A
By default (if this option is not set) RADIUS client allocates ports dynamically as specified by the operating system. If you want to restrict RADIUS client to use ports from a particular range only - set this parameter.
DefaultAuthPort=PORT_NO
1812
Default port number to be used for RADIUS authentication requests
(Access-Request packets), if not overriden by Servers
attribute.
SharedSecret=SECRET
N/A (empty string)
Secret used to authenticate this GNU GK (NAS client) to RADIUS
server. It should be a cryptographically strong password. This is the default
value used, if no server-specific secret is set in the Servers
.
RequestTimeout=TIMEOUT_MS
2000
(miliseconds)
Timeout (miliseconds) for RADIUS server response to a request sent by GNU GK. If no response is received within this time period, next RADIUS server is queried.
IdCacheTimeout=TIMEOUT_MS
9000
(miliseconds)
Timeout (miliseconds) for RADIUS request 8-bit identifiers to be unique. If all 8-bit identifier range is exhausted within this period, new client socket (UDP socket) is allocation by RADIUS module. Let's take the example: we have approximatelly 60 RRQs/sec - after ca. 4 seconds 8-bit identifiers range gets exhausted - new socket allocated - after next 4 seconds the second 8-bit identifiers range gets exhauted - third socket allocated - after 9th second identifiers from the pool 1 are available again - ... . In general, too long timeout - too much resources consumed, too short timeout - RADIUS server may take incoming packets as duplicated and therefore drop it.
SocketDeleteTimeout=TIMEOUT_MS
60000
(miliseconds) - 60 s
Timeout for unused RADIUS sockets to be closed. It is used
in conjunction with IdCacheTimeout
- additional sockets
created during heavy GK load time periods for serving incoming
requests are closed during idle periods.
RequestRetransmissions=NUMBER
2
How many times a single RADIUS request is transmissed to every
configured RADIUS server (if no response is received). 1 means
no retransmission, 2 - single retransmission, ... . Exact retransmission
method is defined by RoundRobinServers
attribute.
RoundRobinServers=BOOLEAN
1
RADIUS requests retransmission method.
If set to 1, RADIUS request is transmitted in the following way (until response is received):
Server #1 Attempt #1, Server #2 Attempt #1, ..., Server #N Attempt #1
...
Server #1 Attempt #RequestRetransmissions, ..., Server #1 Attempt #RequestRetransmissions
If set to 0, the following sequence is preserved:
Server #1 Attempt #1, ..., Server #1 Attempt #RequestRetransmissions
...
Server #N Attempt #1, ..., Server #N Attempt #RequestRetransmissions
AppendCiscoAttributes=BOOLEAN
1
If set, Cisco Vendor Specific RADIUS attibutes are included in RADIUS requests (h323-conf-id,h323-call-origin,h323-call-type).
IncludeTerminalAliases=BOOLEAN
1
If set, Cisco VSA 'h323-ivr-out' attribute is sent with a list of aliases the endpoint is registering (RRQ.m_terminalAlias). This attribute is provided in order to provide fine control over the list of aliases the endpoint is allowed to register with. Format of this attribute is:
Cisco-AV-Pair = "h323-ivr-out=terminal-alias:" alias [,alias] [;]
Example:
Cisco-AV-Pair = "h323-ivr-out=terminal-alias:helpdesk,support,77771;"
FixedUsername
N/A
If this parameter is set, it overwrites a value of User-Name RADIUS attribute
for outgoing RADIUS request. That means every Access-Request will be
authenticated as for user FixedUsername
.
FixedPassword
N/A
If not set, User-Password is a copy of User-Name. For example, if User-Name
is 'john' then User-Password will also be set to 'john'. Setting this
parameter overrides this behavious and User-Password attribute will be
always set to the value of FixedPassword
.
(Neither FixedUsername nor FixedPassword set)
All endpoints will be authenticated using their alias as the username
and the password. That means, for example, endpoint 'EP1' will be authenticated
with the username 'EP1 and the password 'EP1'.
(FixedUsername not set)
FixedPassword=ppp
All endpoints will be authenticated using their alias and the password 'ppp'.
FixedUsername=ppp
FixedPassword=ppp
All endpoints will be authenticated using the username 'ppp'
and the password 'ppp'.
UseDialedNumber=BOOLEAN
0
Select Called-Station-Id number type between the original one (as dialed
by the user) - UseDialedNumber=1
- and the rewritten one - UseDialedNumber=0
.
This section defines which LDAP attribute names to use.
H323ID
The endpoint's H.323 alias. Needs to be unique within the used LDAP tree (this i why we use the mail address by default).
TelephonNo
The endpoint's E.164 alias.
voIPIpAddress
The IP address to be compared against when using LDAPAliasAuth
For now, only a single value is allowed here.
H235PassWord
The plain text password to be compared against when using H.235
(LDAPPasswordAuth
in Gatekeeper::Auth).
For now, only a single value is allowed here.
This section defines the LDAP server and standard LDAP client operating parameters to be used.
ServerName
ldap
The LDAP server's DNS name.
ServerPort
389
The LDAP server's TCP port (usually 389).
SearchBaseDN
o=University of Michigan, c=US
Entry point into the server's LDAP tree structure. Searches are only made below this root node.
BindUserDN
cn=Babs Jensen,o=University of Michigan, c=US
The distinguished name the gatekeeper uses to bind to the LDAP server. Leave empty if you want to access the LDAP server anonymously.
BindUserPW
ReallySecretPassword
If you specified BindUserDN
, then specify the corresponding
password to be used for binding here.
sizelimit
0
Maximum number of results the server may return in response to a single search query. The gatekeeper expects each LDAP to only yields one or zero results anyway, so this parameter is rather useless.
timelimit
0
Maximum number of seconds a query may take until it's considered as "failed".
The section defines a list of modules that will be performing accounting. The accounting is for logging gatekeeper on/off events and call start/stop/update events. Each accounting module logs received events to a module specific storage. Such storage can be a plain text file or a RADIUS server and many more. The configuration is very similar to the one for gatekeeper authentication (see [Gatekeeper::Auth]).
All CDRs are also sent to the status port and can be used by external applications.
acctmod=actions
<acctmod> := FileAcct | RadAcct | SQLAcct | ...
<actions> := <control>[;<event>,<event>,...]
<control> := optional | required | sufficient | alternative
<event> := start | stop | connect | update | on | off
start
- a call has been started and a Setup message has been received (only available in routed mode),connect
- a call has been connected (only available in routed mode),update
- a call is active and the periodic update is performed
to reflect the new call duration. Frequency of such updates is determined
by AcctUpdateInterval variable from
[CallTable]
section,stop
- a call has been disconnected (removed from the GK call table),on
- the gatekeeper has been started,off
- the gatekeeper has been shut down.ok
- the event has been logged successfully by this module,fail
- the module failed to log the event,next
- the event has not been logged by this module, because the module
is not configured for/does not support this event type.required
- if the module fails to log an event, the final status
is set to failure and the event is passed down to any remaining
modules,optional
- the module tries to log an event, but the final status
is not affected by success or failure (except when the module
is last on the list). The event is always passed down
to any remaining modules,sufficient
- the module determines the final status. If an event
is logged successfully, no remaining modules are processed.
Otherwise the final status is set to failure and the event
is passed down to any remaining modules,alternative
- if the module logs an event successfully, no remaining
modules are processed. Otherwise the final status is
not modified and the event is passed down to any remaining
modules.Currently supported accounting modules:
FileAcct
A plain CDR text file logger. It outputs status line like CDR lines to a specified text file. This module supports only stop accounting event. Configuration settings are read from [FileAcct] section.
RadAcct
This module performs RADIUS accounting. It supports all event types (start, stop, update, on, off). See the section [RadAcct] for configuration details.
SQLAcct
This module performs direct SQL accounting. It supports (start, stop, update) event types. See the section [SQLAcct] for configuration details.
default
This is a special pseudo module - it is used to set the final status if preceeding modules have not determined it. The format is as follows:
default=<status>[;<event>,<event>,...]
<status> := accept | fail
<event> := start | stop | update | on | off
The sample configuration #1 (try to log call start/stop with RADIUS server, and always write a CDR to a text file):
RadAcct=optional;start,stop
FileAcct=required
The sample configuration #2 (try to log call start/stop with RADIUS server, if it fails use a CDR log file):
RadAcct=alternative;start,stop
FileAcct=sufficient;stop
default=accept
The sample configuration #3 (always log call start and stop events with RADIUS server, if it fails for call stop event, use a CDR file to store call info):
RadAcct=alternative;start,stop
FileAcct=sufficient;stop
default=fail;start
This accounting module writes CDR lines to a specified text file. The CDR format can be a standard one (the same as displayed by the status interface) or a customized one (using parametrized query string).
DetailFile=FULL_PATH_AND_FILENAME
A full path to the CDR plain text file. If a file with the given name already exists, new CDRs will be appended at the end of the file.
StandardCDRFormat=0
1
Use a CDR format compatible with the status interface CDR format (1
)
or build a custom CDR strings from the CDRString parametrized string.
CDRString=%s|%g|%u|%{Calling-Station-Id}|%{Called-Station-Id}|%d|%c
If StandardCDRFormat is disabled (0) or not specified at all,
this paramterized string instructs the gatekeeper how to build a custom
CDRs. Parameters are specified using %
character and can be one letter
(like %n
) or longer (like %{CallId}
). Any remaining characters that
are not parameter names are simply copied to a final CDR string. The following
parameters are recognized:
%g
- gatekeeper name%n
- call number (not unique after gatekeeper restart)%d
- call duration (seconds)%c
- Q.931 disconnect cause (decimal integer)%s
- unique (for this gatekeeper) session identifier (Acct-Session-Id)%u
- H.323 ID of the calling party%{CallId}
- H.323 call identifier (16 hex 8-bit digits)%{ConfId}
- H.323 conference identifier (16 hex 8-bit digits)%{setup-time}
- timestamp string for Q.931 Setup message%{connect-time}
- timestamp string for a call connected event%{disconnect-time}
- timestamp string for a call disconnect event%{caller-ip}
- signaling IP addres of the caller%{caller-port}
- signaling port of the caller%{callee-ip}
- signaling IP addres of the called party%{callee-port}
- signaling port of the called party%{src-info}
- a colon separated list of source aliases%{dest-info}
- a colon separated list of destination aliases%{Calling-Station-Id}
- calling party number%{Called-Station-Id}
- called party number (rewritten)%{Dialed-Number}
- dialed number (as received from the calling party)
TimestampFormat=Cisco
N/A
Format of timestamp strings printed in CDR strings. If this setting is not specified, a global one from the main gatekeeper section is applied.
Rotate=hourly | daily | weekly | monthly | L... | S...
If set, the CDR file will be rotated based on this setting. Hourly rotation
enables rotation once per hour, daily - once per day, weekly - once per week
and monthly - once per month. An exact rotation moment is determined by a combination
of RotateDay and RotateTime. During rotation, an existing file is renamed
to CURRENT_FILENAME.YYYYMMDD-HHMMSS, where YYYYMMDD-HHMMSS is replaced with
the current timestamp, and new CDRs are logged to an empty file.
In addition, rotation per number of CDRs written (L...) and per file size (S...)
is supported. The L
prefix specifies a number of CDR lines written,
the S
prefix specifies CDR file size. k
and m
suffixes can
be used to speficy throusands (kilobytes) and millions (megabytes).
See the examples for more details.
[FileAcct]
DetailFile=/var/log/gk/cdr.log
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=hourly
RotateTime=45
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=daily
RotateTime=23:00
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=weekly
RotateDay=Sun
RotateTime=00:59
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=monthly
RotateDay=31
RotateTime=23:00
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=L10000
[FileAcct]
DetailFile=/var/log/gk/cdr.log
Rotate=S10k
This accounting module sends accounting data to a RADIUS server. Module configuration is almost the same as for RADIUS authenticators (see [RadAuth] and [RadAliasAuth] for more details on the parameters).
Servers=SERVER1[:AUTH_PORT:ACCT_PORT[:SECRET]];SERVER2[:AUTH_PORT:ACCT_PORT[:SECRET]];...
N/A
RADIUS servers to send accounting data to. If no port information is given,
port number from DefaultAcctPort
is be used. If no secret is set,
the default shared secret from SharedSecret
is used. Server names could
be either IP addresses or DNS names.
Servers
lines:Servers=192.168.1.1
Servers=192.168.1.1:1645:1646
Servers=192.168.1.1:1645:1646:secret1
Servers=radius1.mycompany.com:1812:1813
Servers=radius1.mycompany.com;radius2.mycompany.com
Servers=radius1.mycompany.com:1812:1813:secret1;radius2.mycompany.com:1812:1813:secret2
LocalInterface=IP_OR_FQDN
N/A
Particular local network interface that RADIUS client should use in order to communicate with RADIUS servers.
RadiusPortRange=10000-11000
N/A
By default (if this option is not set) RADIUS client allocates ports dynamically as specified by the operating system. If you want to restrict RADIUS client to use ports from a particular range only - set this parameter.
DefaultAcctPort=PORT_NO
1813
Default port number to be used for RADIUS accounting requests,
if not overriden by Servers
attribute.
SharedSecret=SECRET
N/A (empty string)
A secret used to authenticate this GnuGk (NAS client) to RADIUS
server. It should be a cryptographically strong password. This is the default
value used, if no server-specific secret is set in the Servers
.
RequestTimeout=TIMEOUT_MS
2000
(miliseconds)
Timeout (miliseconds) for RADIUS server response to a request sent by GnuGk. If no response is received within this time period, next RADIUS server is queried.
IdCacheTimeout=TIMEOUT_MS
9000
(miliseconds)
Timeout (miliseconds) for RADIUS request 8-bit identifiers to be unique.
SocketDeleteTimeout=TIMEOUT_MS
60000
(miliseconds) - 60 s
Timeout for unused RADIUS sockets to be closed.
RequestRetransmissions=NUMBER
2
How many times a single RADIUS request is transmissed to every configured RADIUS server (if no response is received).
RoundRobinServers=BOOLEAN
1
RADIUS requests retransmission method.
AppendCiscoAttributes=BOOLEAN
0
If set, Cisco Vendor Specific RADIUS attibutes are included in RADIUS requests (h323-conf-id,h323-call-origin,h323-call-type).
TimestampFormat=ISO8601
N/A
Format of timestamp strings sent in RADIUS attributes. If this setting is not specified, a global one from the main gatekeeper section is applied.
UseDialedNumber=BOOLEAN
0
Select Called-Station-Id number type between the original one (as dialed
by the user) - UseDialedNumber=1
- and the rewritten one - UseDialedNumber=0
.
This accounting module stores accounting information directly to an SQL database. Many configuration settings are common with other SQL modules.
Driver=MySQL | PostgreSQL
SQL database driver to use. Currently, MySQL
and PostgreSQL
drivers
are implemented.
Host=DNS[:PORT] | IP[:PORT][;DNS[:PORT] | IP[:PORT]]...
localhost
SQL server host address. Can be in the form of DNS[:PORT]
or IP[:PORT]
.
Like sql.mycompany.com
or sql.mycompany.com:3306
or 192.168.3.100
.
Multiple hosts, separated by the semicolon, may be specified to support failover.
Database=billing
billing
The database name to connect to.
Username=gnugk
The username used to connect to the database.
Password=secret
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 EncryptAllPasswords
is enabled, or a KeyFilled
variable is defined
in this section, the password is in an encrypted form and should be created
using the addpasswd
utility.
StartQuery=INSERT ...
N/A
Defines SQL query used to insert a new call record to the database. The query
is parametrized - that means parameter replacement is made before each query
is executed. Parameter placeholders are denoted by % character and can be one
letter (like %u) or whole strings (like %{src-info}). Specify %% to embed
a percent character inside the query string (like %%).
For SQLAcct
the following parameters are defined:
%g
- gatekeeper name%n
- call number (not unique after gatekeeper restart)%d
- call duration (seconds)%c
- Q.931 disconnect cause (hexadecimal integer)%s
- unique (for this gatekeeper) call (Acct-Session-Id)%u
- H.323 ID of the calling party%{gkip}
- IP address of the gatekeeper%{CallId}
- H.323 call identifier (16 hex 8-bit digits)%{ConfId}
- H.323 conference identifier (16 hex 8-bit digits)%{setup-time}
- timestamp string for Q.931 Setup message%{connect-time}
- timestamp string for a call connected event%{disconnect-time}
- timestamp string for a call disconnect event%{caller-ip}
- signaling IP addres of the caller%{caller-port}
- signaling port of the caller%{callee-ip}
- signaling IP addres of the called party%{callee-port}
- signaling port of the called party%{src-info}
- a colon separated list of source aliases%{dest-info}
- a colon separated list of destination aliases%{Calling-Station-Id}
- calling party number%{Called-Station-Id}
- called party number (rewritten Dialed-Number)%{Dialed-Number}
- dialed number (as received from the calling party)Sample query string:
INSERT INTO call (gkname, sessid, username, calling, called)
VALUES ('%g', '%s', '%u', '%{Calling-Station-Id}', '%{Called-Station-Id}')
StartQueryAlt=INSERT ...
N/A
Defines SQL query used to insert a new call record to the database in case
the StartQuery
failed for some reason (the call already exists, for example).
The syntax and parameters are the same as for StartQuery
.
UpdateQuery=UPDATE ...
N/A
Defines SQL query used to update call record in the database with the current
call state. The syntax and parameters are the same as for StartQuery
.
Sample query string:
UPDATE call SET duration = %d WHERE gkname = '%g' AND sessid = '%s'
StopQuery=UPDATE ...
N/A
Defines SQL query used to update call record in the database when the call
is finished (disconnected). The syntax and parameters are the same
as for StartQuery
.
Sample query string:
UPDATE call SET duration = %d, dtime = '%{disconnect-time}' WHERE gkname = '%g' AND sessid = '%s'
StopQueryAlt=INSERT ...
N/A
Defines SQL query used to update call record in the database when the call
is finished (disconnected) in case the regular StopQuery
failed (because
the call record does not yet exist, for example). The syntax and parameters
are the same as for StartQuery
.
Sample query string:
INSERT INTO call (gkname, sessid, username, calling, called, duration)
VALUES ('%g', '%s', '%u', '%{Calling-Station-Id}', '%{Called-Station-Id}', %d)
TimestampFormat=MySQL
N/A
Format of timestamp strings used in queries. If this setting is not specified, a global one from the main gatekeeper section is applied.
The gatekeeper can automatically detect whether an endpoint is behind NAT. However, if the detection fails, you can specify it manually in this section.
alias=true,yes,1,...
Specify an endpoint with alias 601 is behind NAT.
601=true
This section allows the configuration of a so called virtual queues 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.
Upon arrival of an ARQ on a virtual queue, the gatekeeper signals a RouteRequest on the status port and waits for an external application to respond with either a RouteReject (then the ARQ will be rejected) or with RouteToAlias/RouteToGateway which leads to the ARQ being rewritten so the call will be routed to the alias (eg. call center agent) specified by the external application.
If no answer is received after a timeout period, the call is terminated.
You can specify virtual queues in three ways:
exact alias name
- a list of aliases is given. If an ARQ destination
alias matches one these names, the virtual queue is activated,prefix
- a list of prefixes is given. If an ARQ destination alias
starts with one these prefixes, the virtual queue is activated,regular expression
- a regular expression is given. If an ARQ destination
alias matches the expression, the virtual queue is activated.See the monitoring section for details on the messages and responses.
VirtualQueueAliases
This defines a list of H.323 aliases for the virtual queues (used with the vqueue RoutingPolicy).
VirtualQueueAliases=sales,support
VirtualQueuePrefixes
This defines a list of prefixes for the virtual queues (used with the vqueue RoutingPolicy).
VirtualQueuePrefixes=001215,1215
VirtualQueueRegex
This defines a regular expression for the virtual queues (used with the vqueue RoutingPolicy).
VirtualQueueRegex=^(001|1)215[0-9]*$
RequestTimeout
10
Timeout in seconds for the external application to answer the RouteRequest.
If no answer is received during this time an ARJ will be sent to
the caller.
In addition to the standard configuration file options, per-endpoint configuration settings can be specified in the config file. The syntax is as follows:
[EP::ALIAS]
Key Name=Value String
ALIAS
is replaced with an actual alias for an endpoint the settings
should apply to. Currently, the following options are recognized:
Capacity=10
-1
Call capacity for an endpoint. No more than Capacity
concurrent
calls will be sent to this endpoint. In case of gateways, if more than one
gateway matches a dialed number, a call will be sent to the first available
gateway (that has available capacity).
GatewayPriority=1
1
Apply only to gateways. Allow priority based routing in case, when more
than one gateway matches a dialed number. The smaller value the higher priority
is assigned to a gateway. A call is routed to the first available gateway
(that has available capacity) with the highest priority (the smallest
GatewayPriority
values).
GatewayPrefixes=0048,0049,0044
N/A
Additional prefixes for this gateway. Apply only to gateways.
Special characters .
and !
can be used here to match any digit
and disable the prefix.
Example:
[RasSrv::PermanentEndpoints]
192.168.1.1=gw1;48
192.168.1.2=gw2;48,!4850,!4860,!4869,!4888
[EP::gw1]
Capacity=60
GatewayPriority=1
[EP::gw2]
Capacity=30
GatewayPriority=2
In this example, calls will be sent to the gateway gw1
until its
capacity is fully utilized (60 concurrent calls) and then to the gateway gw2
.
The status port is the external interface for monitoring and controlling the gatekeeper. The gatekeeper will send out messages about ongoing calls to all connected clients and it can receive commands via this interface.
The messages sent by the gatekeeper to the status port are groupped into three output trace levels:
Reload notifications and direct replies to entered commands.
Reload notifications, direct replies to entered commands, CDRs and Route Requests.
Output everything (reload notifications, direct replies to entered commands, CDRs, Route Requests, RAS, ...). This is the default output level.
The interface is a simple TCP port (default: 7000), you can connect to with telnet or another client. One example of a different client is the Java GUI, aka GkGUI. Another example is the Automatic Call Distribution application, aka GnuGk ACD.
What you do with the powers of the Status Interface is up to you, but here are a few ideas:
See GkGUI.
See GnuGk ACD.
Analyse the CDR messages and forward them to a billing application.
If you don't want to publish the source code to additinal features, just publish the core functionality and interface to it through the status interface and keep the external part private.
Suppose you are just interested in the CDRs (call details records) and want to process them as a batch at regular intervals.
Here is a simple Perl script (gnugk_cdr.pl
) that starts the gatekeeper and also forks a very simple client for the Status Interface and writes just the CDRs into a logfile. You'll have to modify it a little to fit your needs.
#!/usr/bin/perl # sample program that demonstrates how to write the CDRs to a log file use strict; use IO::Socket; use IO::Handle; my $logfile = "/home/jan/cdr.log"; # CHANGE THIS my $gk_host = "localhost"; my $gk_port = 7000; my $gk_pid; if ($gk_pid = fork()) { # parent will listen to gatekeeper status sleep(1); # wait for gk to start my $sock = IO::Socket::INET->new(PeerAddr => $gk_host, PeerPort => $gk_port, Proto => 'tcp'); if (!defined $sock) { die "Can't connect to gatekeeper at $gk_host:$gk_port"; } $SIG{HUP} = sub { kill 1, $gk_pid; }; # pass HUP to gatekeeper $SIG{INT} = sub { close (CDRFILE); kill 2, $gk_pid; }; # close file when terminated open (CDRFILE, ">>$logfile"); CDRFILE->autoflush(1); # don't buffer output while (!$sock->eof()) { my $msg = $sock->getline(); $msg = (split(/;/, $msg))[0]; # remove junk at end of line my $msgtype = (split(/\|/, $msg))[0]; if ($msgtype eq "CDR") { print CDRFILE "$msg\n"; } } close (CDRFILE); } else { # child starts gatekeeper exec("gnugk"); }
Keep in mind that this is just an example to show the usage of the status port. You can use the FileAcct module to log CDRs in a production system.
There are several Graphical User Interface (GUI) frontends for the gatekeeper.
Developed by Jan Willamowius. You can monitor the registrations and calls that go through the gatekeeper. A right-click on a button gives you a popup menu for that endpoint.
This GUI works with Java 1.0 built into most web browsers. For security reasons the GUI must be run as a standalone application or served by a web server on the same IP number as the gatekeeper (you cannot run it as an applet via a local file).
The program is available at http://www.gnugk.org/h323gui.html
A new standalone Java program developed by Citron Network Inc. It requires Java 1.4. New features include:
The GkGUI is released under GNU General Public License, available at http://www.gnugk.org/h323develop.html#java
This section lists all commands that you can isue to the status port (manually or with an external application). All commands are case-insensitive. But some parameters may be case-sensitive.
The command help
or h
will show you a list of all available commands.
Reload
Reload the configuration.
Version
, v
Show the version and OS information of the gatekeeper.
Statistics
, s
Show the statistics information of the gatekeeper.
Statistics
-- Endpoint Statistics --
Total Endpoints: 21 Terminals: 17 Gateways: 4 NATed: 2
Cached Endpoints: 1 Terminals: 1 Gateways: 0
-- Call Statistics --
Current Calls: 1 Active: 1 From Neighbor: 0 From Parent: 0
Total Calls: 1539 Successful: 1076 From Neighbor: 60 From Parent: 5
Startup: Fri, 21 Jun 2002 10:50:22 +0800 Running: 11 days 04:22:59
;
PrintAllRegistrations
, r
, ?
Show all registered endpoints.
AllRegistrations
RCF|IP:Port|Aliases|Terminal_Type|EndpointID
...
Number of Endpoints: n
;
AllRegistrations
RCF|10.1.1.10:1720|800:dialedDigits=Wei:h323_ID|terminal|1289_endp
RCF|10.0.1.43:1720|613:dialedDigits=Jacky Tsai:h323_ID|terminal|1328_endp
RCF|10.0.1.55:1720|705:dialedDigits=Sherry Liu:h323_ID|terminal|1333_endp
Number of Endpoints: 3
;
PrintAllRegistrationsVerbose
, rv
, ??
Show details of all registered endpoints.
AllRegistrations
RCF|IP:Port|Aliases|Terminal_Type|EndpointID
Registration_Time C(Active_Call/Connected_Call/Total_Call) <r>
[Prefixes: ##] (gateway only)
...
Number of Endpoints: n
;
AllRegistrations
RCF|10.0.1.8:1720|Accel-GW2:h323_ID|gateway|1322_endp
Wed, 26 Jun 2002 16:40:03 +0800 C(1/5/33) <1>
Prefixes: 09,002
RCF|10.1.1.10:1720|800:dialedDigits=Wei:h323_ID|terminal|1289_endp
Wed, 26 Jun 2002 16:40:55 +0800 C(0/32/39) <1>
RCF|10.0.1.66:1720|716:dialedDigits=Vicky:h323_ID|terminal|1425_endp
Wed, 26 Jun 2002 16:40:58 +0800 C(1/47/53) <1>
Number of Endpoints: 2
;
PrintCurrentCalls
, c
, !
Show all current calls using the same ACF syntax as in call establishment.
CurrentCalls
Call No. # | CallID | Call_Duration | Left_Time
Dialed_Number
ACF|Caller_IP:Port|Caller_EPID|CRV|DestinationInfo|SrcInfo|IsAnswered;
ACF|Callee_IP:Port|Callee_EPID|CRV|DestinationInfo|SrcInfo|IsAnswered;
...
Number of Calls: Current_Call Active: Active_Call From Neighbor: Call_From_Neighbor \
From Parent: Call_From_Parent
;
CurrentCalls
Call No. 29 | CallID bd c6 17 ff aa ea 18 10 85 95 44 45 53 54 77 77 | 109 | 491
Dial 0953378875:dialedDigits
ACF|10.0.1.49:1720|4048_CGK1|25263|frank:h323_ID|gunter:h323_ID|false;
ACF|10.1.1.1:1720|4037_CGK1|25263|gunter:h323_ID|frank:h323_ID|true;
Call No. 30 | CallID 70 0e dd c0 9a cf 11 5e 00 01 00 05 5d f9 28 4d | 37 | 563
Dial 0938736860:dialedDigits
ACF|10.0.1.48:1032|4041_CGK1|11896|sue:h323_ID|peter:h323_ID|false;
ACF|10.1.1.1:1720|4037_CGK1|11896|peter:h323_ID|sue:h323_ID|true;
Number of Calls: 2 Active: 2 From Neighbor: 0 From Parent: 0
;
PrintCurrentCallsVerbose
, cv
, !!
Show details of all current calls.
CurrentCalls
Call No. # | CallID | Call_Duration | Left_Time
Dialed_Number
ACF|Caller_IP:Port|Caller_EPID|CRV|DestinationInfo|SrcInfo|IsAnswered;
ACF|Callee_IP:Port|Callee_EPID|CRV|DestinationInfo|SrcInfo|IsAnswered;
# Caller_Aliases|Callee_Aliases|Bandwidth|Connected_Time <r>
...
Number of Calls: Current_Call Active: Active_Call From NB: Call_From_Neighbor
;
CurrentCalls
Call No. 48 | CallID 7d 5a f1 0a ad ea 18 10 89 16 00 50 fc 3f 0c f5 | 30 | 570
Dial 0225067272:dialedDigits
ACF|10.0.1.200:1720|1448_endp|19618|frank:h323_ID|gunter:h323_ID|false;
ACF|10.0.1.7:1720|1325_endp|19618|gunter:h323_ID|frank:h323_ID|true;
# Sherry:h323_ID|Accel-GW1:h323_ID|200000|Wed, 26 Jun 2002 17:29:55 +0800 <2>
Number of Calls: 1 Active: 1 From NB: 0
;
Find
, f
Find a registered endpoint by an alias or a prefix.
Find Alias
RCF|IP:Port|Aliases|Terminal_Type|EndpointID
;
f 800
RCF|10.1.1.10:1720|800:dialedDigits=Wei:h323_ID|terminal|1289_endp
;
f 801
SoftPBX: alias 801 not found!
FindVerbose
, fv
Find details of a registered endpoint by an alias or a prefix.
FindVerbose Alias
RCF|IP:Port|Aliases|Terminal_Type|EndpointID
Registration_Time C(Active_Call/Connected_Call/Total_Call) <r>
[Prefixes: ##] (gateway only)
;
fv 02
RCF|10.0.1.100:1720|TFN:h323_ID|gateway|4037_CGK1
Wed, 26 Jun 2002 17:47:29 +0800 C(0/84/120) <1>
Prefixes: 02,09
;
UnregisterIP
Forcedly unregister an endpoint by IP and call signalling port.
UnregisterIP IP[:Port]
UnregisterIP 10.0.1.31:1720
URQ|10.0.1.31:1032|1326_endp|maintenance;
SoftPBX: Endpoint 10.0.1.31:1720 unregistered!
UnregisterAlias
Forcedly unregister an endpoint by one of its aliases.
UnregisterAlias Alias
UnregisterAlias 601
URQ|10.0.1.31:1032|1326_endp|maintenance;
SoftPBX: Endpoint 601 unregistered!
UnregisterAllEndpoints
Forcedly unregister all registered endpoints.
UnregisterAllEndpoints
URQ|10.0.1.7:1024|1325_endp|maintenance;
URQ|10.0.1.8:1024|1322_endp|maintenance;
URQ|10.0.1.32:1032|1324_endp|maintenance;
URQ|10.0.1.36:1032|1323_endp|maintenance;
URQ|10.0.1.42:1032|1318_endp|maintenance;
Done
;
DisconnectCall
Disconnect a call with given number.
DisconnectCall Number
DisconnectCall 1533
DisconnectIP
Disconnect all calls of an endpoint by IP and call signalling port.
DisconnectIP IP[:Port]
DisconnectIP 10.0.1.31:1720
DisconnectAlias
Disconnect all calls of an endpoint by one of its aliases.
DisconnectAlias Alias
DisconnectAlias 601
ClearCalls
Disconnect all calls on the gatekeeper.
GK
Show the information of the parent gatekeeper.
Trace
Set the status interface output trace level. It controls which messages are sent to this client:
trace 0
or trace min
Only direct responses to commands and reload notifications.
trace 1
CDRs, direct responses to commands and reload notifications.
trace 2
or trace max
Show all (RAS, CDRs, direct responses to commands, reload notifications, etc).
Debug
Only used for debug purpose. Options:
trc [+|-|n]
Show/modify trace level.
cfg SEC PAR
Read and print a config parameter in a section.
set SEC PAR VAL
Write a config value parameter in a section.
remove SEC PAR
Remove a config value parameter in a section.
remove SEC
Remove a section.
printrm VERBOSE
Print all removed endpoint records.
debug trc 3
debug set RoutedMode H245Routed 1
Who
Show all people on the status port.
RouteReject
Terminate this call on a virtual queue. This command is used as a response to a RouteRequest event (see below).
RouteReject CallingEndpointID CallRef
RouteReject endp_4711 1234
RouteToAlias
, rta
Route this call on a virtual queue to the specified alias. This command is used as a response to a RouteRequest event (see below).
RouteToAlias Alias CallingEndpointID CallRef
RouteToAlias Suzi endp_4711 1234
RouteToGateway
, rtg
Route this call on a virtual queue to the specified alias and set the destinationSignallAddress. This command is used as a response to a RouteRequest event (see below). You can use this command to route calls to out-of-zone gateways or MCUs not registered with the gatekeeper. Make sure that the 'vqueue' and 'explicit' policy is in effect for these calls.
RouteToGateway Alias IP:Port CallingEndpointID CallRef
RouteToGateway Suzi 192.168.0.50 endp_4711 1234
Exit
, q
Quit the status port.
TransferCall
Transfer an established call from alias A to alias B. When before alias A is talking with alias X, then alias A is talking with alias B after the TransferCall.
Currently this works only with endpoints that properly support Q.931 Facility messages (so it doesn't work with Netmeeting).
TransferCall Source-Alias New-Destination-Alias
TransferCall Frank Peter
The section describes the messages output to the status interface.
GCF|IP|Aliases|Endpoint_Type;
The gatekeeper receives a GatekeeperRequest (GRQ) and responds with a GatekeeperConfirm (GCF).
GRJ|IP|Aliases|Endpoint_Type|RejectReason;
The gatekeeper receives a GatekeeperRequest (GRQ) and responds with a GatekeeperReject (GRJ).
RCF|IP:Port|Aliases|Endpoint_Type|EndpointID;
The gatekeeper receives a RegistrationRequest (RRQ) and responds with a RegistrationConfirm (RCF).
RRJ|IP|Aliases|Endpoint_Type|RejectReason;
The gatekeeper receives a RegistrationRequest (RRQ) and responds with a RegistrationReject (RRJ).
ACF|Caller_IP:Port|Caller_EndpointID|CRV|DestinationInfo|SrcInfo|IsAnswered;
The gatekeeper receives an AdmissionRequest (ARQ) and responds with an AdmissionConfirm (ACF).
ARJ|Caller_IP:Port|DestinationInfo|SrcInfo|IsAnswered|RejectReason;
The gatekeeper receives an AdmissionRequest (ARQ) and responds with an AdmissionReject (ARJ).
DCF|IP|EndpointID|CRV|DisengageReason;
The gatekeeper receives a DisengageRequest (DRQ) and responds with a DisengageConfirm (DCF).
DRJ|IP|EndpointID|CRV|RejectReason;
The gatekeeper receives a DisengageRequest (DRQ) and responds with a DisengageReject (DRJ).
LCF|IP|EndpointID|DestinationInfo|SrcInfo;
The gatekeeper receives a LocationRequest (LRQ) and responds with a LocationConfirm (LCF).
LRJ|IP|DestinationInfo|SrcInfo|RejectReason;
The gatekeeper receives a LocationRequest (LRQ) and responds with a LocationReject (LRJ).
BCF|IP|EndpointID|Bandwidth;
The gatekeeper receives a BandwidthRequest (BRQ) and responds with a BandwidthConfirm (BCF).
BRJ|IP|EndpointID|Bandwidth|RejectReason;
The gatekeeper receives a BandwidthRequest (BRQ) and responds with a BandwidthReject (BRJ).
UCF|IP|EndpointID;
The gatekeeper receives an UnregistrationRequest (URQ) and responds with an UnregistrationConfirm (UCF).
URJ|IP|EndpointID|RejectReason;
The gatekeeper receives an UnregistrationRequest (URQ) and responds with an UnregistrationReject (URJ).
IRQ|IP:Port|EndpointID;
The gatekeeper sends an InfoRequest (IRQ) to an endpoint to query if it is still alive. The endpoint shall respond with an InfoRequestResponse (IRR) immediately.
URQ|IP:Port|EndpointID|Reason;
The gatekeeper sends an UnregistrationRequest (URQ) to an endpoint to cancel its registration. The endpoint shall respond with an UnregistrationConfirm (UCF).
CDR|CallNo|CallId|Duration|Starttime|Endtime|CallerIP|CallerEndId|
\CalledIP|CalledEndId|DestinationInfo|SrcInfo|GatekeeperID;
After a call disconnected, the call detail record is shown (in one line).
RouteRequest|CallerIP:Port|CallerEndpointId|CallRef|VirtualQueue|CallerAlias;
Request for an external application to route an incomming call on a virtual queue. This can be done with a RouteToAlias or RouteReject command.