The best place to get source code for Asterisk and it's packages is directly from the http://www.asterisk.org website or FTP server.
The easiest way to obtain the most recent release is through the use of the program wget.
Note that we will be making use of the /usr/src/ directory to extract and compile the Asterisk source, although some system administrators may prefer to use /usr/local/src. Also be aware that you will need root access to write files to the /usr/src/ directory and to install Asterisk and its associated packages.
![]() |
Note |
|---|---|
See Chapter 13 for information on running Asterisk as non-root. All security professional will recommend that you run your daemons as a non-root user in case there are a security vulnerability in the software. This helps to lower the risk (but obviously does not eliminate) the risk of someone compromising the root user. |
To obtain the latest release source code via wget, enter the following commands on the command line:
![]() |
Note |
|---|---|
The latest versions of the asterisk, libpri, and zaptel packages may not necessarily be the same version number. |
# cd /usr/src/
# wget http://ftp.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz
# wget http://ftp.digium.com/pub/libpri/libpri-1.4-current.tar.gz
# wget http://ftp.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz
Alternatively, during development and testing you will probably want to work with the latest branch. To check it out from SVN we run:
# svn co http://svn.digium.com/svn/asterisk/branches/1.4 asterisk-1.4
If you retrieved the source code via the release files on the Digium FTP server, then extract the files as in the next section before continuing on with compiling.
[46] Subversion is an excellent code management system, available at http://subversion.tigris.org/. It also has an as equally excellent Creative Commons released book, available online at http://svnbook.red-bean.com/.
[47] As of the release date of this book, there has been no determination that the next Asterisk release will be 1.6. It could just as easily be 2.0. Therefore, when discussing new features, you'll see us talk about what's in trunk or what will be in the next release—without mentioning the specific version.