Hi everybody! My name is José P. Leitão, I’m Brazilian and I would like to share with everybody our successfully experience installing MFC/R2 using Asterisk at Home 2.0 beta 4.
Let me start tell you what hardware we used:
Server RJ
* MotherBoard Intel modelo D865 Perl
* Processador Pentium IV 3.0 Ghz HT
* 1 Gb RAM;
* HD 40 Gb IDE;
* NIC 3/COM 10/100
* Digium Board TE205P ( 2 E1/T1 )
* Digium Board TDM400 ( 1 FXS and 1 FXO );
* CD-ROM
Server SP
* Mother board Intel D865GVHZ
* Pentium IV 2.4 Ghz
* 1 Gb RAM;
* HD 40 Gb IDE
* NIC and Video on-board
* Digium Board TE110P ( 1 E1/T1 )
* CD-ROM
Well, if you need details about these hardware, please check their website:
Digium
Intel Motherboard
And softwares:
* Asterisk @ Home 2.0 beta 4
* Some files from CentOS 4.1 look for mirror at www.centos.org
* Unicall and others libs
* IMPORTANT: A new patch file for Makefile, use this one.
Preparation
For the propose of this article both machines are in the same place, and both have access to internet (just to help to install some software, but it’s ok if you can install them manually).
Download the ISO installation of Asterisk at home 2.0 beta 4, and burn a CD.
The next step will erase everything in your Hard Disk, so make sure that it’s what you want to do!!
Boot the computer using the CD, press enter, and the installer will:
# Format your hard disk
# Install CentOS 4.1 and some others software
The installer will reboot your computer, so remove the CD from the drive.
When the machine start, it will compile and install Asterisk 1.2, and some other software like AMP (Asterisk Management Portal), after that it will reboot again.
Login as root, password is ‘password’. Please change the password using the command “passwd”.
Using the command “setup” brings to you a nice GUI to help to setup keyboard, Timezone and network. And you can decide which daemons must start at boot time.
Edit the files /etc/sysconfig/network and /etc/hosts, and change the name of your machine as you prefer.
If you need, for some reason, a static route to reach another network you can put it in /etc/sysconfig/static-routes file:
any net 192.168.2.0 netmask 255.255.255.0 gw 192.168.0.3
Reboot the machine!
Ok now the funny part: install the MFC/R2 support!
Login as root (did you change the password??)
Make sure the zaptel modules are loaded and your Digium board was detected, run zttol to make sure that everything is correct, please take a look at your /etc/zaptel.conf file and certify that your span and cas channels are correctly declared. As example:
# Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1"
span=1,1,0,cas,hdb3
cas=1-15:1101
dchan=16
cas=17-31:1101
# Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2"
span=2,0,0,cas,hdb3
cas=32-46:1101
dchan=47
cas=48-62:1101
# Global data
loadzone = br
defaultzone = br
Next step: make sure that spandsp libs are in correct place:
cd /usr/src/spandsp-0.0.2
make clean
./configure --prefix=/usr
make
make install
Install libxml2dev RPM
Download and install libxm2-devel-2.6-16-6.i386.rpm using:
rpm -ivh libxm2-devel-2.6-16-6.i386.rpm
Install gcc-c++ , if your machine can access internet, just use:
yum install gcc-c++
In this case yum will take care to resolve all dependencies (download an install necessary software). If not, you must download and install in this order:
libstdc++-devel-3.4.4-2.i386.rpm
gcc-c++-3.4.4-2.i386.rpm
Create a directory to download and install necessary software:
mkdir /usr/src/mfcr2
copy to this directory the following files:
chan_unicall.c
libmfrc2-0.0.3.tar.gz
libsupertone-0.0.2.tar.gz
libunicall-0.0.3.tar.gz
unicall.conf.sample
novo_patch.patch
Cd to /usr/src/mfcr2 and untar-gzip the 3 compressed files:
cd /usr/src/mfcr2
tar xvzf libmfcr2-0.0.3.tar.gz
tar xvzf libsupertone-0.0.2.tar.gz
tar xvzf libunicall-0.0.3.tar.gz
cd /usr/src/mfcr2/libunicall-0.0.3
./configure --prefix=/usr
make
make install
cd /usr/src/mfcr2/libsupertone-0.0.2
./configure --prefix=/usr
make
make install
cd /usr/src/mfcr2/libmfcr2-0.0.3
./configure --prefix=/usr
make
make install
copy novo_patch.patch and chan_unicall.c to /usr/src/asterisk/channels
cd /usr/src/mfcr2
cp novo_patch.patch chan_unicall.c /usr/src/asterisk/channels
cd /usr/src/asterisk/channels
patch Makefile < novo_patch.patch
cd /usr/src/asterisk
stop asterisk:
amportal stop
make clean
make
check if the file /usr/src/asterisk/channels/chan_unicall.so was created, if it’s ok, we’re almost there!!
make install
copy the unicall.conf sample to /etc/asterisk/ directory:
cp /usr/src/mfcr2/unicall.conf.sample /etc/asterisk/unicall.conf
edit this file to reflect group number, country, number the digits to expect, number the digits to dial and number of channels according your needs.
Start Asterisk:
amportal start
or,
asterisk -vvvvvvvvgc
and look for errors
If no errors, go to Asterisk CLI interface and enter:
CLI> UC show channels
At this time you should see all your Unicall channels that could be in idle state or blocked.
Now you can access your AMP interface, and create a Unicall Trunk
Open your favorite browser and point it to http://Your_Server_IP/admin
User is: maint Password is: password
click setup
click trunk
click Add custom Trunk
Just fill the box ‘Custom dial String’ with:
UNICALL/g1/$OUTNUM$
(replace the group number according the number that you use in /etc/asterisk/unicall.conf)
Click in submit botton. After that click on ‘red top message’ to update your configuration.
Now create an outbounding routing and add the unicall trunk to this routing, update your configuration.
That is!