Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleyappcap Installation
languagebash
$ cd /usr/src/asterisk
$ git clone https://github.com/asterisk/yappcap.git
$ cd yappcap
$ make
$ sudo make install
# If your default Python installation is Python 3, run the makes again with PYTHON=python2
$ make PYTHON=python2
$ sudo make PYTHON=python2 install

...

sipp is a SIP simulation tool that is relied on heavily by the Testsuite.  Most distributions have up to date versions of the tool available.  If it's version 3.5.0 or greater, simple use your distro's package manager to install it and skip the rest of the sipp instructions.  Otherwise download, build and install it yourself.  You'll need to install openssl, libsrtp (or libsrtp2), libpcap, gsl (or libgsl), lksctp-tools (or libsctp1), and their associated development packages (-devel or -dev).

...

Code Block
titleStarPy Installation
languagebash
$ cd /usr/src/asterisk
$ git clone https://github.com/asterisk/starpy.git
$ cd sippstarpy
$ gitsudo checkoutpython v3setup.6.0py install
# ##If This your default Python installation is thePython latest3, versionrun weagain KNOWusing works.python2 $instead ./build.sh --prefix=/usr --with-openssl --with-pcap --with-rtpstream --with-sctp --with-gsl CFLAGS=-w

 

 

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.

Open a terminal and enter the following:

...

of python.
$ sudo python2 setup.py install

Install the Testsuite

Code Block
titleTestsuite Installation
languagebash
$ cd /usr/src/asterisk
$ git clone https://gerrit.asterisk.org/

...

testsuite
$ cd 

...

testsuite

Install Prerequisites

There's a contrib/scripts/install_prereq

...

This will typically install a large number of Asterisk prerequisites. When it is finished, you should see:

...

######################################
## 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

Perform the following:

...

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

Verify that Asterisk starts. On the Asterisk CLI, enter:

...

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"

As well since Asterisk is not being started as root it may not be able to create certain things. This is perfectly fine as the above is just to test that Asterisk is installed and can be started.

Third Party Libraries

Install spandsp

For fax support, you'll need spandsp.

Install libtiff

...

$ sudo yum install libtiff-devel

...

Assuming that you downloaded it to Downloads (we'll assume that this is spandsp-0.0.6):

...

$ 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:

...

$ mkdir -p ~/asterisk/testsuite
$ cd ~/asterisk/testsuite
$ git clone https://gerrit.asterisk.org/testsuite

script but it assumes that the python executable runs Python 2.  If you're running on a system where Python 3 is the default (most are nowadays), you'll need to install the prerequisites yourself.

If your distribution doesn't provide packages for python2, you'll need to install them using pip.  

 

 

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

...

  1. Enter the following:

    Code Block
    bash
    bash
    $ cd asttest
    $ make
    $ sudo make install
    
  2. Verify that asttest was installed by doing the following:

    Code Block
    bash
    bash
    $ asttest
    asttest: missing arguments -- specify at least one test directory
    Usage:
     ....
    
  3. When finished, return to the Test Suite directory:

    Code Block
    bash
    bash
    $ cd ..
    

Third Party Libraries

The following needs to be installed:

...