Professional Documents
Culture Documents
1 in
Ubuntu Linux
1. How To Install step by step Asterisk in Ubuntu Server
1.
2.
3.
4.
/boot 100 MB
/var 4 GB
/home 6 GB
/usr 12 GB
/ 6 GB
Swap 600 MB
1.
2.
3.
4.
5.
6.
7.
8.
1. Other Devices:
1. *****************************************************************************
*******************
2. *****************************************************************************
*******************
3. ******************************** Packages Install
4. *****************************************************************************
*******************
5. *****************************************************************************
*******************
1. After of install Ubuntu Linux the first thing that we need to do is change the root password
sudo passwd root
password
1. Edit the next file /etc/apt/sources.list and uncomment the next packages repositories
sudo editor /etc/apt/sources.list
1. uncomment and after save the edited file
deb http://us.archive.ubuntu.com/ubuntu/ dapper universe
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper universe
1. First we need to install OpenSSH to communicate from other PC using SSH.
sudo apt-get install openssl libssl-dev ssh
1. After we need to install compilation library
sudo apt-get install gcc make g++
1. View what kernel version has installed our Ubuntu Linux
uname -a
1. after of run the command uname I can see something like that
Linux MexRom 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007
i686 GNU/Linux
1. Then I need to search the headers, images and sources for kernel
apt-cache search 2.6.22
1. we need to install the headers, image and sources for the kernel
sudo apt-get install linux-headers-2.6.22-14-generic linux-image-2.6.22-14-generic linux-source-2.6.22
1. too we need install the next applications nmap is practice to view what porst have open our
linux systmen, lynx to see any web site from CLI and emacs to files edit
sudo apt-get install nmap lynx emacs21
1. We will install festival beacuse is very important for make AGIs with asterisk and any
programming language
sudo apt-get install festival festival-dev
1. We need the next library to Asterisk
sudo apt-get install ncurses-base ncurses-bin ncurses-term libncurses5 libncursesw5 libncurses5-dev
libncursesw5-dev
1. Too is necessary to install the next library
sudo apt-get install zlib1g zlib1g-dev
1. This library are required by FreePBX
sudo apt-get install bison bison-doc
1. library required for FreePBX
sudo apt-get install libxml2 libxml2-dev
1. *****************************************************************************
*******************
2. *****************************************************************************
*******************
3. ******************************** Asterisk Package Compilations
****************************
4. *****************************************************************************
*******************
5. *****************************************************************************
*******************
1. in this second step we need create a new folder to put the asterisk packages downloaded
mkdir ~/asterisk
cd asterisk
1. Download the next files and save in the new folder created
1. Download asterisk-perl this module will allow us process the Asterisk Configuration
wget http://www.cpan.org/modules/by-category/25_Bundles/Asterisk/asterisk-perl-0.10.tar.gz
1. These files are requires to control the mp3 and other audio files such as GSM, Ulaw, alaw files
etc.
wget http://superb-east.dl.sourceforge.net/sourceforge/sox/sox-14.0.0.tar.gz
wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
1. Download FreePBX Package that is the main application to configure asterisk from a web
navigator
wget http://easynews.dl.sourceforge.net/sourceforge/amportal/freepbx-2.3.1.tar.gz
1. Asterisk Packages
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.13.tar.gz
1. If we have a digium card to connect the pstn to our voip network then we need download and
install the next package
wget http://downloads.digium.com/pub/zaptel/releases/zaptel-1.4.5.1.tar.gz
wget http://downloads.digium.com/pub/libpri/releases/libpri-1.4.1.tar.gz
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-addons-1.4.4.tar.gz
1. voices in english for Asterisk
wget http://downloads.digium.com/pub/telephony/sounds/asterisk-core-sounds-en-ulaw-current.tar.gz
wget http://downloads.digium.com/pub/telephony/sounds/asterisk-extra-sounds-en-ulaw-current.tar.gz
wget http://downloads.digium.com/pub/telephony/sounds/asterisk-moh-freeplay-ulaw.tar.gz
1. we go the following directory
cd /usr/src/
1. we decompress the lame package and we compile and to install
sudo tar -xvzf ~/asterisk/lame-3.97.tar.gz
cd lame-3.97
sudo ./configure --prefix=/usr --sysconfdir=/etc
sudo make && sudo make install
1. we decompress sox package and we install this library to process multimedia files
cd /usr/src/
sudo tar -xzvf ~/asterisk/sox-14.0.0.tar.gz
cd sox-14.0.0
sudo ./configure
sudo make
sudo make install
1. We need to install Asterisk-Perl to process the Asterisk File Configuration
cd /usr/src/
sudo make
sudo make install
1. Copy the Asterisk Sound to Asterisk sound default directory
sudo cp -rf /usr/src/asterisk/asterisk-sounds/* /var/lib/asterisk/sounds/
1. Restart Apache Web Server
sudo /etc/init.d/apache2 restart
1. Edit the asterisk file config
sudo emacs /etc/asterisk/asterisk.conf
1. change the next line
RUNASTERISK=/var/run
1. by
RUNASTERISK=/var/run/asterisk
1. change the user for /var/run/asterisk
sudo chown -R asterisk:asterisk /var/run/asterisk
1. Start Asterisk before to begin install FreePBX or FreePBX dont let you to install if dont have
started asterisk previously
sudo asterisk start
1. check if asterisk has started
ps aux | grep asterisk
1. if Asterisk has started then maybe you can see somethink like this
root 14992 0.2 1.7 22044 7752 ? Ssl 07:14 0:00 asterisk start
1. To go FreePBX Directory Installation
cd /usr/src/freepbx-2.3.1/
1. Install the db library using pear
sudo pear install db
1. if you dont found the package, then you can install it manually : sudo pear install db.17.0.0.tgz
sudo mkdir /var/www/asterisk/
sudo mkdir /var/www/asterisk/cgi-bin
sudo chown asterisk:asterisk /var/www/asterisk
sudo ./install_amp
1. after to execute install_amp it will request the values to create the file configuration
1. first will request the mysql database user
asteriskuser asterisk
1. after enter the password for mysql user
Enter your PASSWORD to connect to the 'asterisk' database:
amp109 4st3r1sk
1. Enter the name of database server, if your database server is other server that not be your local
hostlocalhost then enter the IP address or the domain name.
Enter the hostname of the 'asterisk' database:
localhost localhost
1. User name to access to Asterisk Manager Interface
Enter a USERNAME to connect to the Asterisk Manager interface:
admin asterisk
1. Password for AMI
Enter a PASSWORD to connect to the Asterisk Manager interface:
amp111 4st3.r1sk
1. Path for the web directory of FreePBX installation
Enter the path to use for your AMP web root:
/var/www/html /var/www/asterisk
1. IP Address of web server
Enter the IP ADDRESS or hostname used to access the AMP web-admin:
1. Password to operate Flash Operator Panel
Enter a PASSWORD to perform call transfers with the Flash Operator Panel:
1. Select default
Use simple Extensions extensions admin or separate Devices and Users deviceanduser?
1. Select default
Enter directory in which to store AMP executable scripts:
1. Select default
Enter directory in which to store super-user scripts:
1. if you had any error check the database password and user, php and mysql library, apache
restart, check pear and php-db installation
2. en caso de que tuviera un error al ejecutar FreePBX puede reconfigurarlo pero previamente
eliminar el archivo de configuracion en /etc/amportal.conf
1. create the following directory