This is the manual for GNU Gatekeeper 4.5.
A manual for your version is in your GnuGk download archive.
A PDF version can be found in the download section.

Chapters: Contents · Introduction · Installation · Getting started · Basic Config · Routed Mode & Proxy · Routing · RAS Config · Authentication · Accounting · Neighbors · Per Endpoint Config · Advanced Config · Monitoring · Advanced Topics

Download GnuGk    Join the community    Get support

The GNU Gatekeeper Manual Chapter 14

14. Advanced Topics

This portion of the manual will cover advanced topics, such as compiling and debugging the GNU Gatekeeper.

14.1 Compiling GnuGk from CVS

The following instructions are an example of how to compile GnuGk from source on an Ubuntu platform.

First make sure your system is up-to-date and install the tools needed for the compile

sudo apt-get update
sudo apt-get install flex bison build-essential subversion cvs pkg-config automake linuxdoc-tools
Also make sure the "...-devel" packages for all databases or LDAP servers you want to use are installed.

NOTE: It's recommended that you do not use PTLib SVN; it is undergoing many changes that are incompatible with GnuGk. Use our patched version PTLib 2.10.9.

Get and compile PTLib from SourceForge:

cd ~
wget -O ptlib-v2.10.9-gnugk.tgz http://openh323gk.cvs.sourceforge.net/viewvc/openh323gk/ptlib/?view=tar
tar xvzf ptlib-v2.10.9-gnugk.tgz
cd ptlib
export PTLIBDIR=~/ptlib
./configure --enable-ipv6 --disable-odbc --disable-sdl --disable-lua --disable-expat
make optnoshared

Get and compile H323Plus:

cd ~
cvs -d:pserver:anonymous@h323plus.cvs.sourceforge.net:/cvsroot/h323plus login

(just press enter when prompted for password)

cvs -z3 -d:pserver:anonymous@h323plus.cvs.sourceforge.net:/cvsroot/h323plus co -P h323plus

cd h323plus
export OPENH323DIR=~/h323plus
./configure --enable-h235 -enable-h46017 --enable-h46026
make optnoshared

Get and compile GnuGk:

cd ~
cvs -d:pserver:anonymous@openh323gk.cvs.sourceforge.net:/cvsroot/openh323gk login

(just press enter when prompted for password)

cvs -z3 -d:pserver:anonymous@openh323gk.cvs.sourceforge.net:/cvsroot/openh323gk co -P openh323gk

cd openh323gk
./configure --enable-h46018
make optnoshared

Once the compile is finished, the binary can be found in the obj_linux_x86_s subdirectory.

In order to stay up-to-date, run the following:

cd ~/h323plus
cvs update
cd ~/openh323gk
cvs update
If any of the source files are changed, you have to recompile.

14.2 Tracing GnuGk

If GnuGk doesn't handle calls like you expect, you can enable tracing to see what GnuGk does internally. This should not be confused with connection to the status port and looking at the events ("telnet 127.0.0.1 7000"). Creating a trace file will reveal a lot more of the internal workings.

On the command line, start GnuGk with -ttttt and -o to write the trace to a file:

gnugk -c gnugk.ini -ttttt -o trace.log

If you have a lot of calls, trace.log can grow quite large, so make sure you disable it after you are done with testing, or at least reduce the trace level to 2 or 3 for production.

You can also enable tracing in your config file:

[Gatekeeper::Main]
TraceLevel=5

[LogFile]
Filename=trace.log

Or you can enable tracing through the status port:

setlog trace.log
debug trc 5

Doing it through the status port has the advantage that you won't interrupt ongoing calls and you can quickly turn it on or off.

The trace file will contain information detailing everything GnuGk does. To reduce it to a single call, you can search for the callID or write a small Perl script to extract only those messages you are interested in.

14.3 Debugging GnuGk (on Linux)

In order to use gdb with GnuGk, the software and libraries must be compiled with debug support.

You may follow the instructions above in obtaining the software, but the compile in each subdirectory must be:

make debugnoshared

Allow unlimited core dumps:

ulimit -c unlimited

Run GnuGk:

~/openh323/obj_linux_x86_64_d_s/gnugk -c your.ini

Then wait for the crash and run GDB to get a stack backtrace:

gdb obj_linux_x86_64_d_s/gnugk core
bt

Once you've obtained a backtrace, post it to the mailing list.

Note: On some systems, the core dump is named "core.xxx" where xxx is the process number of the GnuGk process that crashed.


Next Previous Contents

Chapters: Contents · Introduction · Installation · Getting started · Basic Config · Routed Mode & Proxy · Routing · RAS Config · Authentication · Accounting · Neighbors · Per Endpoint Config · Advanced Config · Monitoring · Advanced Topics



Last updated: 20. Aug 2017
Page maintained by Jan Willamowius