Install Asterisk 1.8 in Debian Squeeze or Ubuntu Linux, build from VOIP Asterisk source
I decided to make and post on my website detailed instructions for installing Asterisk 1.8 from the source code, in addition to the two already available instructions for Asterisk 1.6 and Asterisk 10. Asterisk 1.8.15.1 is installed on Debian Squeeze, but Ubuntu Linux will be similar.
Here we go.
Add to the file. /etc/apt/sources.list Software installation repository:
echo 'deb http://mirror.yandex.ru/debian squeeze main contrib non-free' >> /etc/apt/sources.list</em>
For Ubuntu Linux in the file /etc/apt/sources.list It is necessary to decomment repositories:
restricted universe multiverse
We bring our system to the current state by updating the software from the repository with commands:
aptitude update aptitude dist-upgrade
Establish the necessary dependencies for assembly Asterisk team:
aptitude install build-essential linux-headers-`uname -r` g++ subversion libmysqlclient-dev libxml2-dev libncurses5-dev libsqlite3-dev libssl-dev libsrtp0-dev unixodbc-dev libmyodbc
Let's create a folder. /usr/src/asterisk-srcIn which we will download and unpack the source of the desired programs, as well as go to this folder after executing commands:
mkdir -p /usr/src/asterisk-src cd /usr/src/asterisk-src
Download the source code. Asterisk 1.8 From the official website:
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.32.3.tar.gz wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.10.2+2.10.2.tar.gz wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.15.tar.gz
Or download the source code. Asterisk 1.8 From our website:
wget http://softnastroy.com/downloads/asterisk/asterisk-1.8.17.0.tar.gz wget http://softnastroy.com/downloads/asterisk/dahdi-linux-complete-2.6.1+2.6.1.tar.gz wget http://softnastroy.com/downloads/asterisk/libpri-1.4.13.tar.gz
Unpacking all the sources that are on the way /usr/src/asterisk-src When we are in this folder, we perform commands:
tar xvf dahdi-linux-complete-*.tar.gz tar xvf libpri-*.tar.gz tar xvf asterisk-1.8*.tar.gz
We compile Asterisk in the following order:
First, we install the Dahdi kamandas:
cd dahdi-linux-complete-2.* make all && make install && make config
We then install Libpri with the following commands:
cd ../libpri-1.4.1* make && make install
Install Asterisk itself with teams.make menuselect - use, if necessary to disable, activate any modules:
cd ../asterisk-1.8.* ./configure make menuselect make && make install make samples make config
Asterisk will be compiled for quite a long time, make a cup of tea or koffe and rest.
Download and unpack additional sounds from the official site by camandas:
cd /var/lib/asterisk/sounds wget -O - http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-ru-alaw-current.tar.gz | tar xvfz -
Or download and unpack additional sounds from our site commands:
cd /var/lib/asterisk/sounds wget -O - http://softnastroy.com/downloads/asterisk/asterisk-core-sounds-ru-alaw-current.tar.gz | tar xvfz -
Create a user. Asterisk beneath VOIP telephony will work as a team:
adduser asterisk --disabled-password --no-create-home --gecos "asterisk PBX user"
In the file. /etc/default/asterisk You need to de-sensitize the user and the group under which we will launch our Asterisk
was:
#AST_USER="asterisk" #AST_GROUP="asterisk"
became:
AST_USER="asterisk" AST_GROUP="asterisk"
We change the rights to run under the Asterisk user to use the following files:
Executing commands:
chown -R asterisk:asterisk /var/lib/asterisk chown -R asterisk:asterisk /var/log/asterisk chown -R asterisk:asterisk /var/run/asterisk chown -R asterisk:asterisk /var/spool/asterisk chown -R asterisk:asterisk /usr/lib/asterisk chown -R asterisk:asterisk /dev/dahdi chmod -R u=rwX,g=rX,o= /var/lib/asterisk chmod -R u=rwX,g=rX,o= /var/log/asterisk chmod -R u=rwX,g=rX,o= /var/run/asterisk chmod -R u=rwX,g=rX,o= /var/spool/asterisk chmod -R u=rwX,g=rX,o= /usr/lib/asterisk chmod -R u=rwX,g=rX,o= /dev/dahdi chown -R asterisk:asterisk /etc/asterisk chmod -R u=rwX,g=rX,o= /etc/asterisk
Reload asterisk command:
/etc/init.d/asterisk restart
If, after completing the commands to change the rights, it issues such an error:
chown: it is impossible to access the/dev/dahdiThere is no such file or directory.
You need to restart the server and re-execute commands to change the rights of files related to Asterisk telephony.
To check the operability of asterisk, go to the proxy server console with a team and execute the command:
rasterisk sip show peers
Team conclusion:
Name/username Host Dyn Nat ACL Port Status
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
Asterisk set. Then you can move on to setting it up.
Sergei Lazarenko was with you.
Let’s take a short break and smile after watching the video:



comment