If you need additional information about installing Asterisk from source code, read the installation guide on the Asterisk documentation site.
Code is checked out from the GitHub servers via anonymous read-only access. Check out development code from Asterisk’s GitHub repository If you need DAHDI or libpri, they are also available on GitHub. Below is an example of commands you might use to download the source from the various repositories.
# cd /usr/src
# git clone https://github.com/asterisk/asterisk
# git clone https://github.com/asterisk/dahdi-linux-complete
# git clone https://github.com/asterisk/libpri
An important note
If you are intending to install a specific branch then it is best to clone that branch only and avoid cloning the entire repository.
To clone only a specific Asterisk branch from GitHub, use the following format:
# git clone -b X https://github.com/asterisk/asterisk asterisk-X
(with X being the current release and revision number).
Example:
# git clone -b 21 https://github.com/asterisk/asterisk asterisk-21
Need more info?
If you have further questions or intend to push code back up to the repo please see the detailed Code Contribution information on the Asterisk documentation site.