The completed system must support SIP clients connected to Asterisk, and H323 clients that connect to GNUGK (GNU Gatekeeper). Calls between H323 and SIP clients must be supported, in both directions.
This guide is mainly for building the Asterisk and associated RPMs. Rolling out these packages to other servers is a fairly simple task.
GNUGK is used for H323 as Asterisk 1.4.* does not support video codecs. The ‘oh323′ module is used in Asterisk, to interface with GNUGK. The ‘ooh323′ connected but the connection was unreliable and the sound quality poor, so this wasn’t used.
Additional packages required for building:
yum -y install gcc gcc-c++ kernel-devel bison openssl-devel \
libtermcap-devel ncurses-devel doxygen curl-devel newt-devel \
mlocate lynx tar wget nmap bzip2 mod_ssl crontabs vixie-cron \
speex speex-devel unixODBC unixODBC-devel libtool-ltdl \
libtool-ltdl-devel make readline-devel mysql-connector-odbc mysql mysql-devel \
mysql-server php-mysql pwlib pwlib-devel openldap-devel SDL SDL-devel \
sqlite sqlite-devel flex bison libtiff-devel bridge-utils rpm-build speex speex-devel
Before building Asterisk, the following packages must be built:
Build process:
-
./configure --prefix=/usr --sysconfdir=/etc --with-postgres=no
-
make menuselect
-
make
-
make
-
make install
- checkinstall
The ‘make’ command may have to be repeated if it is a clean build.
Optional post-compile steps:
- make samples
- make progdocs
- make config
- Asterisk-addons (version 1.4.10) may be installed, and provides the ‘h323′ module which I do not use.
Asterisk-oh323 should be compiled and installed.
Asterisk 1.4.30 is now built.
The following packages should be installed on target servers before installing the packaged RPMs:
- SDL
- esound
- audiofile
- speex
- speex-devel
The following RPMs which have been constructed during this process, should be installed in the following order:
- pwlib_v1_10_2-1.10.2-1.i386.rpm
- openh323_v1_18_0-1.18.rpm
- gnugk-2.3.1-1.i386.rpm
- asterisk-1.4.30-1.i386.rpm
- asterisk-oh323-1.i386.rpm
My servers have suffered from poor Postgresql libraries and bad ooh323 experiences. The following two commands prevented my Asterisk daemon from repeatedly crashing:
- rm /usr/lib/asterisk/modules/chan_ooh323.so
- rm /usr/lib/asterisk/modules/res_config_pgsql.so
Configuration:
To configure and route H323 calls from GNUGK into Asterisk, edit the /etc/asterisk/oh323.conf file and set the ‘alias’ and the ‘gwprefix’ under the ‘register’ section. For example:
alias=asterisk
gwprefix=9
All calls from H323 clients starting with a ‘9′ will be routed into Asterisk. Asterisk can now process and forward these calls by adding the following line in /etc/asterisk/extensions.conf:
exten=>9X.,1,Dial(SIP/${EXTEN:1})
which will strip away the ‘9′.
For SIP calls to be routed out over H323, enter the following into /etc/asterisk/extensions.conf:
exten=>8X.,1,Dial(OH323/${EXTEN:1})
which will route all calls starting with an ‘8′ into the OH323 module, and strip off the leading digit.