How to install Asterisk on CentOS server


Asterisk is an open source PBXi, telephony engine, and telephony applications toolkit. Available for free. URL: asterisk.org

CentOS is a Linux distributions based on Red Hat Enterprise. URL: centos.org

The following required before we begin installation:

  • CentOS minimal install
  • kernel-devel / kernel-smp-devel
  • bison
  • openssl-devel

Installation:

We will use atrpms repo for this install.

Login via SSH using root to the server.

Create the following file:

/etc/yum.repos.d/atrpms.repo

Put the following in 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

Or you can download the file here and save it as /etc/yum.repos.d/atrpms.repo.

We need to update the server, do:

yum -y upgrade

If that does not work for you, try:

yum -y update

Repeat the update until no more update left.

Install asterisk:

yum install asterisk

You will get something like:

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
...
...
...
Installing: asterisk ######################### [6/6]

Installed: asterisk.i386 1:1.4.9-43.el5
Complete!

Note: do not rely on above output, I've cut some part of it. Most likely your output will be different than mine.

You will need to configure a few things:

nano /etc/asterisk/sip.conf

nano /etc/asterisk/extensions.conf

We are done.

Start asterisk:

/etc/init.d/asterisk start

Good luck!

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

If you enjoyed this post, make sure you subscribe to our RSS Feed! Or if you prefer, you can Follow us on Twitter instead.