Installing Asterisk on SME Server from sources

We get a lot of support questions from SME users regarding problems with the installation of Asterisk kernel (kmdl) rpms. Here are some observations on a manual install and compile of Asterisk on the SME Platform. If you are going to do a manual install then please back up your system before you begin. The excercise below shows a basic install of Asterisk 1.4.28 together with DAHDI and Libpri.

Get the sources from Digium

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.4.28.tar.gz
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-addons-1.4.10.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.10.2.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.2.1-rc2+2.2.1-rc2.tar.gz
tar xzvf asterisk-1.4.28.tar.gz
tar xzvf libpri-1.4.10.2.tar.gz
tar xzvf dahdi-linux-complete-2.2.1-rc2+2.2.1-rc2.tar.gz
tar xzvf asterisk-addons-1.4.10.tar.gz

Install the dev tools you'll need

As a minimum, on SME 7.5, you will need gcc, ncurses and the kernel headers. The awkward bit will almost certainly be the kernel-headers because yum won't always install headers that match your running kernel. However, if you tell yum which specific headers you want, you will usually be ok. If not then you will need to hunt for them on-line using Google or whatever. To figure out which headers you need, use uname

[root@sme75b1 src]# uname -r
2.6.9-89.0.16.ELsmp 

In the above case we have the SMP kernel so we will need the SMP headers. SMP headers are slightly odd in EL4/C4 in the way you request them...

yum install kernel-smp-devel-2.6.9-89.0.16.EL --enablerepo=base

If we'd been running a non smp kernel, then we might have done...

[root@sme75b1 src]# uname -r
2.6.9-89.0.16.EL 
yum install kernel-devel-2.6.9-89.0.16.EL --enablerepo=base

Now we must create a little symbolic link to the kernel-headers so that the make can find them

cd /usr/src
ln -s /usr/src/kernels/kernel-smp-devel-2.6.9-89.0.16.EL linux

Finsh off the dev tools by installing gcc and ncurses

yum install gcc gcc-c++ ncurses-devel 

Run the makes

Go to the DAHDI directory and run the make

cd /usr/src/dahdi-linux-complete-2.2.1-rc2+2.2.1-rc2
make
make install
make config

If all is OK, you can now do the same thing with libpri

cd /usr/src/libpri-1.4.10.2
make
make install

Now you can do Asterisk itself, which is a little different. You need to run configure which wil tell you if your OS can build Asterisk. You can also, optionally, run menuselect which allows you to tailor some Asterisk features (see the Digium site for info)

cd /usr/src/asterisk-1.4.28
./configure
make menuselect
make; make install
make sample

Lastly, compile the add-ons

cd /usr/src/asterisk-addons-1.4.10
./configure
make
make install

Remove the dev tools from your system

To remove the kernel headers, specify either kernel-smp-devel or kernel-devel, depending upon which you installed...

yum remove gcc gcc-c++ ncurses-devel kernel-smp-devel 
Topic revision: r1 - 23 Dec 2009 - 11:11:31 - TWikiAdminUser
 
    

This site is powered by the TWiki collaboration platformSARK SARKPBX and POLYGATE are registered trademarks of Aelintra Telecom Limited.
Ideas, requests, problems regarding SARK UCS/MVP? Send feedback