Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Prerequisites

...

 

...

Install Asterisk Prereqs

In order to make sure that all of the current Asterisk prerequisites are installed and set up, we will first check-out Asterisk and make sure that we can build and run Asterisk outside of the control of Bamboo.

...


$ cd
$ svn co http://svn.asterisk.org/svn/asterisk/trunk asterisk_trunk
$ cd asterisk_trunk
$ cd contrib
$ cd scripts
$ sudo ./install_prereq install

...


######################################
## install completed successfully
######################################
Info

As of the time writing this, install_prereq does not install the SQLite3 package. If the Asterisk ./configure script fails, install sqlite-devel

...


$ cd ../../
$ ./configure --enable-dev-mode
$ make
$ sudo make install
$ asterisk -cvvvg

...


CLI> core stop now
Note

If installing Asterisk as a non-root user, Asterisk may not be able to find libasteriskssl.so.1. Verify that the shared library was built and in /usr/lib. If it is, activate the current library path by entering "sudo ldconfig"

Third Party Libraries

Install spandsp

For fax support, you'll need spandsp.

...


$ sudo yum install libtiff-devel

...


$ cd ~/Downloads/
$ tar -xzf spandsp-0.0.6
$ cd spandsp-0.0.6
$ ./configure
$ make
$ sudo make install
Note

spandsp installs itself into /usr/local/lib. If that isn't in your library include path, res_fax_spandsp will build but will not load, causing the fax tests to fail (typically with INIT failures).

Install libsrtp

For SRTP, you'll need libsrtp. To obtain that library, perform the following:

...


$ wget http://srtp.sourceforge.net/srtp-1.4.2.tgz
$ tar xvf srtp-1.4.2.tgz
$ cd srtp
$ ./configure CFLAGS=-fPIC --prefix=/usr
$ make
$ make runtest
$ sudo make install

Install Asterisk Test Suite Prereqs

Check out the Asterisk Test Suite by doing the following:

...


$ cd
$ cd asterisk_trunk
$ mkdir testsuite
$ svn co http://svn.asterisk.org/svn/testsuite/asterisk/trunk testsuite
$ cd testsuite
Note

Currently, the Asterisk Test Suite must reside in a sub-directory in Asterisk. Checking out the Test Suite into any other directory will cause it to not run.

With the Test Suite checked out, we can begin to install its various prerequisites.

ASTTest Installation

...


$ cd asttest
$ make
$ sudo make install

...


$ asttest
asttest: missing arguments -- specify at least one test directory
Usage:
 ....

...


$ cd ..

Third Party Libraries

The following needs to be installed:

  • lua-devel
  • lua
  • python-twisted
  • libpcap-devel
  • python-yaml

StarPY Installation

StarPY is used as a wrapper around AMI for a large number of tests. It depends on Python twisted, which a number of the tests use as well.

...


$ cd addons
$ make update
$ cd starpy
$ sudo python setup.py install

...


$ cd ../..

SIPp Installation

For SIPp, we'll need to download the source and build it ourselves, as we'll want both pcap and openssl support.

...


$ mkdir sipp
$ cd sipp
$ wget http://sipp.sourceforge.net/snapshots/sipp.2009-07-29.tar.gz
Resolving sipp.sourceforget.net...
Connecting to sipp.sourceforget.net
...
$ tar zxvf sipp.2009-07-29.tar.gz
$ cd sipp.svn
$ make pcapplay_ossl
$ sudo cp sipp /usr/bin

...


$ sipp -v

SIPp v3.1-TLS-PCAP, version unknown, built ...

...


$ cd ../..

PJSUA Installation

...


$ svn co http://svn.pjsip.org/repos/pjproject/trunk pjproject
$ cd pjproject
$ ./configure
$ cp pjlib/include/pj/config_site_sample.h pjlib/include/pj/config_site.h
$ vim pjlib/include/pj/config_site.h

...


#define PJ_HAS_IPV6 1

...


$ make dep
$ make

...


$ cd pjproject/pjsip-apps/bin
$ sudo cp pjsua-x86_64-unknown-linux-gnu /usr/sbin/pjsua

...


$ pjsua
...
You have 0 active call
>>>

...


$ cd ~/asterisk_trunk/testsuite

Verify the Test Suite

Note

If you haven't run make samples (which you shouldn't have, if you were following the instructions), you'll need to have an asterisk.conf file in /etc/asterisk before the Test Suite will work. Copy one over - it doesn't matter what is in it for now

...


$ ./runtests.py -l

...

The Asterisk Test Suite has been moved to a Python 3 version with simplified installation. Instructions for this can be found here.