H.323 ISDN Gateway (isdngw)

This ISDN gateway converts H.323 calls into ISDN audio calls. It does not handle H.320 video calls.

Currently the gateway only works with isdn4linux and not with the newer mISDN.

The gateway was originally written by Bertrand Croq.


Version 0.4.0SizeUnix tar archive
Source Code40 KBDownload
Version 0.3.5SizeUnix tar archive
Source Code40 KBDownload
Linux Executable (static)2 MBDownload



isdngw is a gateway between telephony on ISDN and telephony on IP networks using H.323. It is based on OpenH323 and ISDN4Linux. The gateway uses ISDN to make and receive calls but any type of phone (pots, mobiles...) can call and be called.


This software is released under the GNU General Public License.


  • make calls from H.323 endpoints on an ISDN line
  • receive calls from an ISDN line and connect to H.323 endpoints
  • conversion between H.323 user input strings and ISDN touch tones
  • can register to a gatekeeper using prefixes
  • filter authorized endpoint from their IP
  • send the caller's phone number to the H.323 endpoint when receiving a call
  • can play a message to the H.323 endpoint while make an outgoing call ("please wait...")
  • more to come...

isdn2h323 has some least cost routing features but I have never used it; the code is still here in isdngw but it has never been tested.


isdngw is a PWLib application, with a standard PWLib Makefile. You have to build PWLib and OpenH323 first (following their build instructions).

Then, move into the isdngw directory and do a make depend to compute the dependencies. Now, you are ready to compile different versions of the software:

  • make opt builds the optimized and stripped version
  • make debug builds the ready to debug version
  • make optnoshared builds the optimized version statically linked to PWLib and OpenH323 libraries
  • make debugnoshared builds the debug version statically linked to PWLib and OpenH323 libraries


The configuration is quite long and complete. It uses the PWLib configuration files format with sections and key values (just like Windows .ini files).

There are two such configuration files: /etc/isdngw/isdngw.conf(the configuration of the gateway) and a directory file (its path is given in isdngw configuration). The directory file lists the associations between H.323 aliases and ISDN MSN, used when receiving calls.

isdngw's configuration file format

Section [System]
admin = string The email address of the administrator.
default value: empty
directory filename = string The path to the directory configuration file.
default value: no directory file
name = string The name of the gateway.
default value: ISDN Gateway
status filename = string The path to an HTML file dynamically generated by the gateway. This files gives the status of the different ISDN and some other information.
default value: empty
Section [Network]
gatekeeper = string Address of the gatekeeper to use. If a gatekeeper is needed (see "need gatekeeper") and this value is left empty, the gateway tries to discover a gatekeeper on the network.
default value: empty
listener interface = string Address of the network interface to use to listen for incoming H.323 calls.
default value: empty
listener port = integer UDP port used to listen for incoming H.323 calls.
default value: 1720
need gatekeeper = boolean Indicates if gatekeeper registration is mandatory. If set to yes, the gateway will stop if there is a problem while registering to the gatekeeper.
default value: yes
ras interface = string Address of the interface used to communicate with the gatekeeper. This value must be defined due to recent changes in PWLib/OpenH323 libraries. If no value is given, the value is taken from "listener interface".
default value: empty
Section [ISDN]
atd timeout = string Time to wait (in seconds) on the ISDN line to get an answer when making a call.
default value: 30
default msn = string The default phone number of the gateway that will be sent when making calls. This value mustn't have any special prefix: for example, in France, the first digit is not given because it represents the phone operator used.
default value: none (mandatory value)
Section [H323]
agc = boolean Indicates if automatic gain control must be used.
default value: no
echo compensation = boolean Try to remove the echo before sending audio data to the ISDN line.
default value: no
Section [Log]
traces = string The path of the log file, where the PTRACE() calls are outputted. If the path is left empty, there is no output.
default value: empty
level = integer The maximum trace level (from 0 to 5).
default value: 0
Section [Messages]
This section contains a list of sound files played by the gateway at different moments of the communications. The format of these file is quite simple: these are raw 8000samp/sec. with 16bit signed mono samples.

The easiest bay to build your samples is to use sox, for example:

sox inputfile.wav -t raw -r 8000 -s -w -c1 outputfile

connecting = string Path to a file that is played when an H.323 endpoint make a call through the gateway (until the call is answered). If no file is given, the gateway is silent until it gets an answer from the ISDN device.

The format of the
default value: empty

Section [Devices]
This section contains the list of the ISDN4Linux devices to use. The name of the keys has no importance, but there mustn't be two keys with the same name.


Section [Allowed IP]
This section contains the list of endpoint IP prefixes that are allowed to use the gateway. Like in the previous section, two keys mustn't have the same name but their name has no other importance.


[Allowed IP]
Section [Prefixes]
This section contains the list of the phone prefixes that the gateway handles. This is used when registering to the gatekeeper, so that it can decide which gateway must be used when an endpoint wants to call a phone. Like in the previous section, two keys mustn't have the same name but their name has no other importance.



There is a configuration sample in the download archive.

isdngw's directory file format

Section [alias]
number = integer The ISDN MSN associated with the alias given in the section name.
The directory file is composed of sections with only one key: number. Each section name is an alias to be associated with the ISDN MSN given to the "number" key.


number = 1031

number = 1032

There is a sample directory in the download archive.


isdngw is a PWLib PServiceProcess application so it can be run as a daemon or as a console application. To have some help, you can do isdngw -h.

To start the gateway as a daemon, use isdngw -d, which will return once it is started, and to stop the daemon you just have to do isdngw -t (you have to wait a few seconds or more before it really ends).

To start the gateway as a standard application, use isdngw -cx. This way, you will get the system messages on the standard output.

Last updated: 04. May 2017