Downloading and Compiling

1. Releases

Asterisk is maintained using the Subversion (SVN) which provides the most up-to-date code and stable version of Asterisk. Before new code or patches are committed to SVN they are tested and verfied by the project leader and original developer, Mark Spencer. Please see the 'Contributing' section of this documentation for more information on submitting patches.

2. Binary Distributions

Currently the only available method for downloading Asterisk is via the Digium SVN server at svn.digium.com please see the Checking out from SVN for more information. Feel free to also browse the SVN repository at svn.digium.com/view

3. Dependancies

In order to build Asterisk the following dependancies must be fulfilled:

  • Linux Kernel v2.4 or higher (with sources installed)
  • Development Environment with GCC (2.92 or higher)
  • Concurrent Version System (version 1.1 or higher)

4. Checking Out From SVN

Once the dependencies have been met, one can proceed by downloading the source code.

To use Asterisk with Digium telephony hardware one will need zapata and zaptel. For T1 and E1 boards such as the T100P, T400P, E100P, and/or E400P libpri is also needed. All of the dependancies can be download with one command:

# svn co http://svn.digium.com/svn/asterisk/trunk asterisk
# svn co http://svn.digium.com/svn/libpri/trunk libpri
# svn co http://svn.digium.com/svn/zaptel/trunk zaptel

Otherwise, if you are planning to only use Asterisk for use with a full-duplex soundcard or other linux telephony devices the following command will suffice for a basic installation:

# svn co http://svn.digium.com/svn/asterisk/trunk asterisk

5. Compiling The Code

Once all the dependancies have been met and the source code has been downloaded for your installation the next step is to compile. Compiling is generally straight forward as we will compile the source in the order of which we checked it out from SVN.

If you are not compiling Asterisk for use with Digium hardware the first two steps can be safely ignored:

  • Compile Zaptel
    # cd zaptel
    make install

  • Compile Libpri
    # cd ../libpri
    make install

  • Compile Asterisk
    # cd ../asterisk
    make install

You may have to type the command multiple times for asterisk to finish building and installing correctly.

Once the installation is complete you can test to see if Asterisk runs:

# asterisk -vvvc (Use "stop now" to quit.)

6. Resolving Common Errors

Visit the Digium Knowledge Base to locate answers to resolving common errors.