Install Asterisk (VoIP Linux) on CentOS and Debian from repositories
Follow @ggarronI am starting to work with Asterisk which is a Linux VoIP PBX, that lets you even send your minutes traffic, to VoIP gateways, and therefore one more time Linux is helping us lower the costs of maintaining an office.
As a first thing I tried to install it from repositories both on Debian and CentOS.
Let's start with Debian.
Once you have installed Debian
Just enter as root:
apt-get install asterisk
Then configure your sip.conf and extensions.conf as minimum, then edit the file:
/etc/default/asterisk
and change the option to start asterisk at boot from "no" to "yes"
Now on CentOS
First install CentOS
Then create this file
/etc/yum.repos.d/atrpms.repo
with this content on it.
[atrpms] name=CentOS $releasever - $basearch - ATrpms baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms gpgcheck=1
Once that is done enter:
yum install asterisk
You will this output:
Loading "installonlyn" plugin Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package asterisk.i386 1:1.4.9-43.el5 set to be updated --> Running transaction check --> Processing Dependency: libpq.so.4 for package: asterisk --> Processing Dependency: libtonezone.so.1.0 for package: asterisk --> Processing Dependency: libspeex.so.1 for package: asterisk --> Processing Dependency: libodbc.so.1 for package: asterisk --> Processing Dependency: libpri.so.1.0 for package: asterisk --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package unixODBC.i386 0:2.2.11-7.1 set to be updated ---> Package zaptel.i386 1:1.4.4-37.el5 set to be updated ---> Package postgresql-libs.i386 0:8.1.9-1.el5 set to be updated ---> Package libpri1.i386 1:1.4.1-17.el5 set to be updated ---> Package speex.i386 0:1.0.5-4 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: asterisk i386 1:1.4.9-43.el5 atrpms 10 M Installing for dependencies: libpri1 i386 1:1.4.1-17.el5 atrpms 57 k postgresql-libs i386 8.1.9-1.el5 updates 196 k speex i386 1.0.5-4 base 206 k unixODBC i386 2.2.11-7.1 base 832 k zaptel i386 1:1.4.4-37.el5 atrpms 2.0 M Transaction Summary ============================================================================= Install 6 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 13 M Is this ok [y/N]: y Downloading Packages: (1/6): unixODBC-2.2.11-7. 100% |=========================| 832 kB 00:23 (2/6): zaptel-1.4.4-37.el 100% |=========================| 2.0 MB 01:01 (3/6): postgresql-libs-8. 100% |=========================| 196 kB 00:06 (4/6): libpri1-1.4.1-17.e 100% |=========================| 57 kB 00:03 (5/6): asterisk-1.4.9-43. 100% |=========================| 10 MB 04:19 (6/6): speex-1.0.5-4.i386 100% |=========================| 206 kB 00:07 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: speex ######################### [1/6] Installing: libpri1 ######################### [2/6] Installing: postgresql-libs ######################### [3/6] Installing: zaptel ######################### [4/6] Installing: unixODBC ######################### [5/6] Installing: asterisk ######################### [6/6] Installed: asterisk.i386 1:1.4.9-43.el5 Dependency Installed: libpri1.i386 1:1.4.1-17.el5 postgresql-libs.i386 0:8.1.9-1.el5 speex.i386 0:1.0.5-4 unixODBC.i386 0:2.2.11-7.1 zaptel.i386 1:1.4.4-37.el5 Complete!
In this case you just need to configure
/etc/asterisk/sip.conf
and
/etc/asterisk/extensions.conf
according to your needs, and you are done.
On both systems you can start or stop asterisk with
/etc/init.d/asterisk [start, stop, restart]