Asterisk’s Installation Requirements Kernel source bison bison-devel ncurses ncurses-devel zlib zlib-devel openssl openssl-devel gnutls-devel gcc gcc-c++
Installation Check the required packages: rpm -q kernel-devel rpm -q bison rpm -q bison-devel rpm -q ncurses rpm -q ncurses-devel rpm -q zlib rpm -q zlib-devel rpm -q openssl rpm -q openssl-devel rpm -q gnutls-devel rpm -q gcc rpm -q gcc-c++ Install the packages if they are not installed: yum install kernel-devel yum install bison yum install bison-devel yum install ncurses yum install ncurses-devel yum install zlib yum install zlib-devel yum install openssl yum install openssl-devel yum install gnutls-devel yum install gcc yum install gcc-c++
Installation Voice over IP (VoIP) Scenarios Pure VoIP System Connecting Asterisk to PSTN
A Pure VoIP System
Installing a Pure VoIP Server Files needed asterisk-1.4.x.tar.gz asterisk-addon-1.4.x.tar.gz asterisk-sounds-1.4.x.tar.gz
Installing a Pure VoIP Server Download required packages wget asterisk tar.gz wget releases/asterisk-addons tar.gz wget releases/asterisk-sounds tar.gz Installation Install mpg123 to play mp3 files for music-on-hold before Asterisk’s installation wget tar -zxvf mpg tar.gz
Installation cd mpg /configure make make install ln -s /usr/local/bin/mpg123 /usr/bin/mpg123 Installing Asterisk tar -zxvf asterisk tar.gz cd asterisk make clean./configure make make install make samples make config
Installation Installing Asterisk’s Add-ons tar -zxvf asterisk-addon tar.gz cd asterisk-addon make clean make make install Installing Asterisk’s Sounds tar -zxvf asterisk-sounds tar.gz cd asterisk-sounds make make install
Connecting Asterisk to PSTN
Installation Files needed libpri-1.4.x.tar.gz zaptel-1.4.x.tar.gz asterisk-1.4.x.tar.gz asterisk-addon-1.4.x.tar.gz asterisk-sounds-1.4.x.tar.gz
Installation Download required packages wget asterisk tar.gz wget zaptel tar.gz wget wget addons tar.gz wget sounds tar.gz
Installation Installing libpri tar -zxvf libpri tar.gz cd libpri make make install Installing zaptel tar -zxvf zaptel tar.gz cd zaptel /install_prereq test;Check for dependencies./install_prereq install;Install dependencies if not installed./configure make make install make config The remaining installation is similar to that of a pure VoIP Asterisk System
Starting and Managing Asterisk Asterisk can be started by typing: /usr/sbin/asterisk To connect to an Asterisk daemon, type: asterisk –r To make Asterisk more verbose, type: asterisk -vvvvvr
Connecting to Asterisk Console Once connected to an Asterisk console, you will get: Asterisk , Copyright (C) Digium, Inc. and others. Created by Mark Spencer Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ===================================================================== ==== Connected to Asterisk currently running on localhost (pid = 3960) Verbosity is at least 3 localhost*CLI>
Asterisk’s Console Commands Type the following commands on Asterisk’s console: help To have a list of all commands reload To reload the configuration stop To stop the Asterisk process exit To exit the command line interface