
On the one hand, we will need asterisk itself.
You can use one of the ready-made distributions such as Trixbox, Elastix, AsteriskNow, but I did not manage to achieve adequate work from the h323 module included in the first two distributions (at least when setting up trunks for avaya).
Who also failed or just wondering, please under the cat.
')
Let's use another driver, namely, OpenH323 from NuFone, since it does not exist in any of the ready-made distributions, then we will build it from the source, and we will build the asterisk for one.
But first we need the OS, for all of our "exercises".
I chose the latest (at the time of these actions) stable version of CentOS, namely 5.8 (thanks to centos.org and the mirror from Yandex).
Swing - Run - Set
Here, if you wish, you can install with the help of gui (then click next - then - yes - then - yes - set up the network - then - time zone - root password - you can choose the necessary additional packages, but after installation we will use yum, so further ).
Observe the installation process / go to drink tea / do other things.
After installation and reboot, the setup will start up once, in which you need to configure / disable selinux and the firewall.
If you have missed the moment you start setup, you can start it yourself by writing in the setup terminal
From there we need only the firewall configuration item, it starts system-config-securitylevel-tui (you can run it instead of setup).
There, to speed up the process, disable the firewall and selinux (setting up both topics for individual articles).
Everything, you can connect to the server via SSH and install asterisk with the necessary additions.
Install the necessary packages, namely
make
gcc-c ++
kernel-devel
openssl-devel
expat-devel
gnutls-devel
flex
bison
ncurses-devel
libxml2-devel
sqlite-devel
yum install make gcc-c++ kernel-devel openssl-devel expat-devel gnutls-devel flex bison ncurses-devel libxml2-devel sqlite-devel -y
Download the necessary libraries to the / root directory
Open H.323 v1.18.0
PWLib v1.10.0
cd /root wget http://www.voxgratia.org/releases/openh323-v1_18_0-src-tar.gz wget http://www.voxgratia.org/releases/pwlib-v1_10_0-src-tar.gz
Rename.
mv openh323-v1_18_0-src-tar.gz openh323-v1_18_0-src.tar.gz mv pwlib-v1_10_0-src-tar.gz pwlib-v1_10_0-src.tar.gz
Unpack
tar vfxz openh323-v1_18_0-src.tar.gz tar vfxz pwlib-v1_10_0-src.tar.gz
And once again renamed.
mv pwlib_v1_10_0 pwlib mv openh323_v1_18_0 openh323
Add the necessary compiler headers.
cp /usr/src/kernels/2.6.18-308.4.1.el5-i686/include/linux/compiler.h /usr/include/linux
Compile the library.
cd /root/pwlib ./configure make clean opt cd /root/openh323 ./configure make clean opt
Copy the compiled libraries with links to the right place.
cp /root/openh323/lib/libh323_linux_x86_r* /lib cp /root/pwlib/lib/libpt_linux_x86_r* /lib
We download the asterisk sources of the version we need, for example 10.4 (or on the old account 1.10.4).
cd /usr/src wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-10.4.0.tar.gz
Unpack
tar vfxz asterisk-10.4.0.tar.gz
Go to the source directory and specify the necessary paths.
cd asterisk-10.4.0 export OPENH323DIR=/root/openh323/ export PWLIBDIR=/root/pwlib/ export OPENH323_LIBDIR=/lib export PWLIB_LIBDIR=/lib
and run
./configure
If everything went well, we will see the asterisk logo made in pseudographics.
You can run.
make menuselect
There are channel drivers and at the very bottom we mark chan_h323, press s to save and exit further.
make make install make samples make config /sbin/chkconfig asterisk on
You can run asterisk.
/etc/init.d/asterisk start
TOTAL:
Working asterisk, with the h.323 channel driver from NuFone.
Create a trunk group on avaya:
add trunk-group next
page 1
Group Type: isdn Carrier Medium: H.323 Service Type: public-ntwrk Member Assignment Method: auto Number of Members: 2
change node-names ip asterisk XXXX
add signaling-group next
page 1
Group Type: h.323 Trunk Group for Channel Selection: " " Near-end Node Name: procr Near-end Listen Port: 1720 Far-end Node Name: asterisk Far-end Listen Port: 1720
At this, avaya tuning is over.
Go to asterisk.
cd /etc/asterisk/
First we need h323.conf:
[general] port = 1720 bindaddr = XXXX ; ip disallow=all allow=alaw dtmfmode=inband gatekeeper = DISABLE context=h323-in ; progress_setup = 8 progress_alert = 8 [avaya] ; avaya type=friend host=YYYY ; ip CM port=1720 diallow=all allow=alaw h245tunneling=yes
Then you can / need to restart the threads on both sides.
asterisk:
asterisk -r module reload chan_h323.so
avaya:
busyout trunk 15 busyout signaling-group 15 release signaling-group 15 release trunk 15
check
status trunk 15
0015/001 T00022 in-service/idle no
In order to be able to use this trunk, you need to make changes to extensions.conf:
[general] static=yes writeprotect=no clearglobalvars=no [globals] CONSOLE=Console/dsp IAXINFO=guest TRUNK=DAHDI/G2 TRUNKMSD=1 [default] [h323-out] ; avaya exten => _X.,1,Dial(H323/${EXTEN}@avaya) ; avaya [h323-in] exten => _X.,1,Dial(SIP/${EXTEN}) ; h323 sip
Of course, such constructions should not be used in a real scheme; here they are given in order to show the concept.
I will give the sip.conf configuration file
[general] bindport=5060 bindaddr=0.0.0.0 context=default allowguests=no [99999] ; sip type=friend secret=99999 host=dynamic context=h323-out ; h323-out extensions.conf cid_number=00000 ;
You can do test calls
and check by asterisk by simply running its console:
asterisk -r
And from avaya
list trace tac
PS: in the preparation of the article information was used with asterisk.ru and Google, of course.