CallWeaver on Ubuntu

This document describes the build process on Ubuntu 8.04.01 LTS.

It was tested using the server edition, but should be applicable to the client edition as well.

Prepare

sudo aptitude install subversion build-essential libncurses5-dev libssl-dev libspeex-dev libtiff4-dev libc6-dev libssl-dev zlib1g-dev libtool automake1.9 autoconf2.13 libltdl3-dev libreadline5-dev libcap-dev speex libspeex-dev sqlite3 libsqlite3-dev

Install Vale

To compile trunk, you will need Vale, a library for streaming media.

cd /usr/src
sudo wget http://www.soft-switch.org/downloads/vale/vale-0.0.2.tgz
sudo tar xzvf vale-0.0.2.tgz
cd vale-0.0.1/
./configure
make
sudo make install

Install SpanDSP 0.0.6

cd /usr/src
sudo wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.6pre2.tgz
sudo tar xzvf spandsp-0.0.6pre2.tgz
cd spandsp-0.0.6/
./configure
sudo make
sudo make install

Update Cache

sudo sh -c "echo '/usr/local/lib' >> /etc/ld.so.conf" 
sudo cp /etc/ld.so.conf /etc/.ld.so.cache.save
sudo ldconfig

Prep User Accounts and Download Source

sudo groupadd callweaver
sudo useradd callweaver -g callweaver
sudo usermod -a -G callweaver $USER #You may have to log out then in for this to take effect
cd /usr/src

For latest code:

sudo svn co  http://svn.callweaver.org/callweaver/trunk/ callweaver

For latest stable release:

sudo svn co http://svn.callweaver.org/callweaver/branches/rel/1.2/ callweaver

Compile and Install CallWeaver

cd /usr/src/callweaver
sudo ./bootstrap.sh
sudo ./configure
sudo make
sudo make install

Optional: Start CallWeaver Automatically

cd /usr/src/callweaver
sudo cp ./contrib/init.d/rc.debian.callweaver /etc/init.d/callweaver
In /etc/init.d/callweaver, make the following changes:
  1. DAEMON=/usr/local/sbin/callweaver
  2. SAFE_CALLWEAVER=/usr/local/sbin/safe_callweaver
  3. #export LD_ASSUME_KERNEL=2.4.1 (commented out)
  4. CW_USER=”callweaver”
  5. CW_GROUP=”callweaver”
sudo chmod +x /etc/init.d/callweaver
sudo update-rc.d callweaver defaults

Optional: Install Default Configuration to /usr/local/etc/callweaver

cd /usr/src/callweaver/configs
sudo make install

Optional: Install Sounds

cd /usr/src
sudo svn co http://svn.callweaver.org/callweaver-sounds/trunk/ callweaver-sounds
cd callweaver-sounds/
sudo ./install --prefix=/usr/local/share/callweaver