Installing, Configuring Asterisk on Linux, Making Calls Between Extensions

Asterisk is an open source architecture which is sponsored by Digium for developing communications applications. Asterisk turns a standard PC into a communications server.Asterisk powers  conference servers, VoIP gateways, IP PBX systems etc. It is used by both small & large businesses, carriers, call centers and by companies worldwide.

Downloading Asterisk

Download asterisk gui from below link:

File to be downloaded: asterisk-

Installing Asterisk

Install downloaded Asterisk GUI on your linux system. Below is a guide to install asterisk on linux systems.

Configuring Asterisk

After installing Asterisk GUI, you need to configure your asterisk.

We recommend you to take backup of your configuration files before editing them. To take backup just copy all file from /etc/asterisk under different location or name in the same directory.

cp –r  /etc/asterisk /etc/asterisk_backup

We need to configure two files which will make asterisk work.

Edit manager.conf and add below configuration. We need to set enabled and webenabled to yes and need to add a new user to manager.conf.

enabled = yes
webenabled = yes

secret = password
read =  system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

After making above modification save your manager.conf and edit http.conf file and add below configuration:

enabled = yes

After making above modification save your http.conf. and then run below command in your asterisk-gui directory.

make checkconfig

This command will check if asterisk GUI is configured correctly.

Restart your system. Then type following in address bar of your browser.

A login screen will appear, you can login using user credentials which we configured in our manager.conf ie. Username – admin & Password – password.

Note: In our case IP Address of our linux system is which we will be using in our tutorial. You need to change it with your system IP Address.

You can use asterisk GUI to edit asterisk file or edit them manually.

Open /etc/asterisk/sip.conf in vi editor using linux terminal. Type following commands in terminal:

cd etc/asterisk/
vi sip.conf

Then bind address & port and add extension in sip.conf

port = 5060
bindaddr =

type = friend
host = dynamic
secret = 1000

type = friend
host = dynamic
secret = 1001

type = friend
host = dynamic
secret = 1002

Save sip.conf by using following command:


The above rule in sip.conf will add extensions 1000,1001 & 1002 in asterisk.

After configuring your sip.conf, you need to create a dialplan in extensions.conf for enable calling between extensions created above. Open extensions.conf in vi editor and add below dialplan under default context.

Open terminal and type following commands

cd etc/asterisk/
vi extensions.conf

exten=1000,1,Dail(SIP/1000, 20)
exten=1001,1,Dail(SIP/1001, 20)
exten=1002,1,Dail(SIP/1002, 20)

Save extensions.conf by using following command:


Restart your asterisk server.

Configuring Phones

After configuring sip.conf and extensions.conf, configure the your hard phones & soft phones.

You can download XLite if you want to use softphone. Download URL:

To configure your X-lite open System Settings > SIP Proxy > [Default] :

Set Enabled : Yes

Username : 1001 (which we have defined in sip.conf of asterisk.)

Authorization User: 1001

Password: 1001 (secret defined in sip.conf under 1001 context.)

Domain: (Asterisk server IP)

SIP Proxy: (For now asterisk server IP)

Outbound Proxy: server IP)

Now to configure your hard phone, in our case we are using GRANDSTREAM-GXP1405

Go to config section of your phone

SIP Proxy = now Asterisk server IP)

Outbound Proxy = server IP)

UserId = 1000

AuthenticationId = 1000

Password = 1000 (secret defined in sip.conf under 1001 context.)

The above settings will enable phones with configured extension 1000 and 1001 to call each other and to receive call if someone dial their respective extension.

Tags: , , , , , , , ,

Comments & Responses

Leave a Reply

Your email address will not be published. Required fields are marked *


4 × 2 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>