Friday, May 23, 2025

How to install Asterisk on Ubuntu 16.04



  • Make sure your server is up-to-date :-
  1.   sudo apt-get update
  2.   sudo apt-get upgrade
  • Install all required packages and dependencies :-
  1.   sudo apt-get install build-essential
  2.   apt-get install git-core subversion libjansson-dev sqlite autoconf automake libxml2-dev libncurses5-dev libtool
  • Download Asterisk :-
  1.   cd /usr/src/
  2.   sudo wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
  3.   sudo tar -zxvf asterisk-13-current.tar.gz
  • Compile Asterisk :-
  1.   cd /usr/src/asterisk-13.23.1
  2.  sudo ./contrib/scripts/install_prereq install
  • Once it is completed the output will look like this :-
      Current status: 7 (-2) upgradable.
      #############################################
      ## install completed successfully
      #############################################
  • Run the ./configure script which will check your system for missing libraries and dependencies :-
  1.   sudo ./configure 
  • The output of the successful completion should look like this :-
      configure: Menuselect build configuration successfully completed
      
                     .$$$$$$$$$$$$$$$=..
                  .$7$7..          .7$$7:.
                .$$:.                 ,$7.7
              .$7.     7$$$$           .$$77
           ..$$.       $$$$$            .$$$7
          ..7$   .?.   $$$$$   .?.       7$$$.
         $.$.   .$$$7. $$$$7 .7$$$.      .$$$.
       .777.   .$$$$$$77$$$77$$$$$7.      $$$,
       $$$~      .7$$$$$$$$$$$$$7.       .$$$.
      .$$7          .7$$$$$$$7:          ?$$$.
      $$$          ?7$$$$$$$$$$I        .$$$7
      $$$       .7$$$$$$$$$$$$$$$$      :$$$.
      $$$       $$$$$$7$$$$$$$$$$$$    .$$$.
      $$$        $$$   7$$$7  .$$$    .$$$.
      $$$$             $$$$7         .$$$.
      7$$$7            7$$$$        7$$$
       $$$$$                        $$$
        $$$$7.                       $$  (TM)
         $$$$$$$.           .7$$$$$$  $$
           $$$$$$$$$$$$7$$$$$$$$$.$$$$$$
             $$$$$$$$$$$$$$$$.

     configure: Package configured for:
     configure: OS type  : linux-gnu
     configure: Host CPU : x86_64
     configure: build-cpu:vendor:os: x86_64 : pc : linux-gnu :
     configure: host-cpu:vendor:os: x86_64 : pc : linux-gnu :
  • start the compilation process using the make command :-
  1.  sudo make
  • Once its completed you will see the following message which means that the Asterisk was successfully compiled :-
    
    
      +--------- Asterisk Build Complete ---------+
      + Asterisk has successfully been built, and +
      + can be installed by running:              +
      +                                           +
      +                make install               +
      +-------------------------------------------+
  • Run the make install:-
  1.   sudo make install
  • After the successfully Asterisk installation you will see the following message :-
       +---- Asterisk Installation Complete -------+
       +                                           +
       +    YOU MUST READ THE SECURITY DOCUMENT    +
       +                                           +
       + Asterisk has successfully been installed. +
       + If you would like to install the sample   +
       + configuration files (overwriting any      +
       + existing config files), run:              +
       +                                           +
       + For generic reference documentation:      +
       +    make samples                           +
       +                                           +
       + For a sample basic PBX:                   +
       +    make basic-pbx                         +
       +                                           +
       +                                           +
       +-----------------  or ---------------------+
       +                                           +
       + You can go ahead and install the asterisk +
       + program documentation now or later run:   +
       +                                           +
       +               make progdocs               +
       +                                           +
       + **Note** This requires that you have      +
       + doxygen installed on your local system    +
       +-------------------------------------------+
  • After that install the Asterisk sample configuration files :-
  1.   sudo make samples
  • Install the initialization script :-
  1.   sudo make config
  • You can also install the logrotation script :-
  1.   sudo make install-logrotate
    
  • You will see the following output indicating :-
      ● asterisk.service - LSB: Asterisk PBX
         Loaded: loaded (/etc/init.d/asterisk; bad; vendor preset: enabled)
         Active: active (running) since Wed 2018-07-18 03:36:23 CDT; 5s ago
           Docs: man:systemd-sysv-generator(8)
        Process: 15427 ExecStart=/etc/init.d/asterisk start (code=exited, status=0/SUCCESS)
         CGroup: /system.slice/asterisk.service
                └─15440 /usr/sbin/asterisk
  • Enable the asterisk service :-
  1.    systemctl enable asterisk






















No comments:

Post a Comment