Asterisk On Linux - LinuxHunt

Asterisk On Linux

Asterisk On Linux

Installing Asterisk on Linux is not a big task but if you know about that the asterisk, then it is easy to install. you need some knowledge about asterisk you can click here,

For little bit
Asterisk is an open source framework for building communications applications. Asterisk turns an ordinary computer into a communications server. Asterisk powers IP PBX systems, VoIP gateways, conference servers and other custom solutions. It is used by small businesses, large businesses, call centers, carriers and government agencies, worldwide. Asterisk is free and open source. Asterisk is sponsored by Digium.
Today, there are more than one million Asterisk-based communications systems in use, in more than 170 countries. Asterisk is used by almost the entire Fortune 1000 list of customers. Most often deployed by system integrators and developers, Asterisk can become the basis for a complete business phone system, or used to enhance or extend an existing system, or to bridge a gap between systems.

Now i am direct going to share some commands, you have to just open linux terminal and paste all commands one by one.

Note now i am sharing the commands for ubuntu OS , if you have another then you can make changes like apt or apt-get to yum.

here is commands

  • sudo apt update && sudo apt upgrade
  • sudo apt install wget build-essential subversion
  • cd /usr/src/
  • sudo wget
  • sudo tar zxf asterisk-15-current.tar.gz
  • cd asterisk-15.*/
  • sudo contrib/scripts/
  • sudo contrib/scripts/install_prereq install
  • sudo ./configure
  • sudo make menuselect
  • sudo make -j2
  • sudo make install
  • sudo make samples
  • sudo make basic-pbx
  • sudo make config
  • sudo ldconfig

Creating Asterisk User

By default Asterisk runs as a root user. For security reasons we will create a new system user and configure Asterisk to run as the newly created user.

To create a new system user named asterisk run the following command:

  • sudo adduser –system –group –home /var/lib/asterisk –no-create-home –gecos “Asterisk PBX” asterisk

To configure Asterisk to run as asterisk user, open the /etc/default/asterisk file and uncomment the following two lines:

  • /etc/default/asterisk
  • AST_USER=”asterisk”
  • AST_GROUP=”asterisk”

Add the asterisk user to the dialout and audio groups:

  • sudo usermod -a -G dialout,audio asterisk

We also need to change the ownership and permissions of all asterisk files and directories so the user asterisk can access those files:

  • sudo chown -R asterisk: /var/{lib,log,run,spool}/asterisk /usr/lib/asterisk /etc/asterisk
  • sudo chmod -R 750 /var/{lib,log,run,spool}/asterisk /usr/lib/asterisk /etc/asterisk
  • sudo systemctl start asterisk
  • sudo asterisk –vvvr (Live Status)
  • sudo systemctl stop asterisk
  • sudo systemctl restart asterisk

The last step is to enable Asterisk service to start on boot with:

  • sudo systemctl enable asterisk

“If you find any of error just comment below i will help you

1 Comment

Post A Comment

Get notified automatically by email when there is new content!
For Questions or Comments, Contact us: editor @

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

LinuxHunt will use the information you provide on this form to be in touch with you and to provide updates.