How to Install Asterisk 11 on CentOS 6

With the recent release of Asterisk 11 I thought I’d put together an install tutorial for Asterisk 11 and Centos 6. (Also check out this Asterisk install tutorial for Ubuntu 12.4 LTS) As an LTS release Asterisk 11 has been developed for stability and long life. Additionally, Asterisk 11 boasts many great new features including WebSocket transport for SIP, chan_motif, SIP NAT traversal via ICE, Named ACLs and more! For a full list of new features visit the Asterisk wiki. Watch the video for a screencast of my terminal session to see the install live where I explain each command step by step. The copy and paste commands can be found below.

VIDEO

For this install I am using Asterisk 11.0.0 and will be compiling from source on CentOS 6.3. This tutorial should also work on Fedora and RHEL (Red Hat Enterprise Linux) systems with little or no modification.

First, you will want to be sure that your server OS is up to date.

yum update -y

Disable SELinux by changing “enforcing” to “disabled” in /etc/selinux/config. Use a text editor or copy and paste this command.

sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config

After you update and disable SELinux, you’ll need to reboot.

reboot

Next, you will want to resolve basic dependencies. (More information on Asterisk dependencies.)

yum install -y make wget openssl-devel ncurses-devel  newt-devel libxml2-devel kernel-devel gcc gcc-c++ sqlite-devel libuuid-devel

Change into the /usr/src/ directory to store your source code.

cd /usr/src/

Download the source tarballs. These commands will get the current release of DAHDI 2.6, libpri 1.4 and Asterisk 11.

wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz

Extract the files from the tarballs.

tar zxvf dahdi-linux-complete*
tar zxvf libpri*
tar zxvf asterisk*

For the next set of commands it is important to follow the proper order: DAHDI first, then libpri, then Asterisk.

Install DAHDI.

cd /usr/src/dahdi-linux-complete*
make && make install && make config

Install libpri.

cd /usr/src/libpri*
make && make install

Change to the Asterisk directory.

cd /usr/src/asterisk*

In the next step, running the “configure” script will vary depending on whether your system is 32-bit or 64-bit. (Watch the video for more details.) When the menuselect command runs, select your options, then choose “Save and Exit” and the install will continue.

Use this command if you are installing Asterisk on 32bit CentOS.

./configure && make menuselect && make && make install

Use this command if you are installing Asterisk on 64bit CentOS.

./configure --libdir=/usr/lib64 && make menuselect && make && make install

Optional: If you ran into errors you will want to clean the install directory before recompiling.

make clean && make distclean

Once you have an error-free install, copy the sample files from the configs subdirectory into /etc/asterisk.

make samples

Then add the Asterisk start script to the /etc/init.d/ directory

make config

Start DAHDI.

service dahdi start

Start Asterisk.

service asterisk start

Connect to the Asterisk CLI.

asterisk -rvvv

And now you have Asterisk 11 running on CentOS 6! If you’d like to continue configuring Asterisk you can check out this guide to setting up basic pbx functionality or leave a comment to share your thoughts below! You can also check out some of our training and certification options.

About the author

Billy is a Marketing Manager at Digium with a passion for Asterisk. You can find Billy on the web on Google+ and Twitter

195 Responses to “How to Install Asterisk 11 on CentOS 6”

  1. Mathew Waller

    Hey im having issues with dhadi on centos 6.2 i get a error stating i do not have the kernal source however its not available as package

  2. Billy Chia

    Billy Chia

    Mathew –
    Be sure to follow the steps in order, there are a few possibilities for the problem you are experiencing.

    Perhaps, you forgot to reboot after `yum update -y`. If you don’t reboot, then you will install the kernel headers for the old kernel. Be sure to update your system and then reboot.

    After the reboot, be sure to use yum to install the “kernel-devel” package This is the name of the package on redhat-based systems. If you try to install a different package name then it may not be found. `yum install kernel-devel -y`

    On the output of the kernel-devel package install should show something like:

    “Package kernel-devel-2.6.32-279.11.1.el6.x86_64 already installed and latest version”

    Look at the kernel version – note that mine is
    “2.6.32-279.11.1.el6.x86_64″

    Then run `uname -a`

    The output should show the same kernel name:

    [root@CentOS ~]# uname -a
    Linux CentOS 2.6.32-279.11.1.el6.x86_64 #1 SMP Tue Oct 16 15:57:10 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    You should now be able to navigate into the dahdi source directory.

    run `make clean && make distclean`

    Then try the dahdi complication process again.

    Good luck!

  3. Wes

    Good post & video. Thanks!

  4. Craig Smith

    Here are the steps that I recently used to install Asterisk 11.0.1 on Ubuntu Server LTS 12.04.1. It was in a virtual environment, so I didn’t install DAHDI.

    sudo apt-get update
    sudo apt-get dist-upgrade
    wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
    tar zxvf asterisk-11-current.tar.gz
    cd asterisk-11.0.1/
    sudo apt-get install build-essential libxml2-dev libssl-dev libncurses-dev libsqlite3-dev
    ./configure
    make menuconfig
    make
    sudo make install
    sudo make samples
    sudo asterisk -cvvvf

  5. Samuel Moses

    Hey Billy,

    I did a yum update to the NSS CentOS Server and it crashed the PBX. Scott and Scott had to come out back out then re-install their Asterisk version.

    My question is why. I only updated the OS not the compiled PBX code. Has anyone else had this issue?

    Sam

  6. Darius

    Great post. Was wondering if anybody had a tutorial on how to install on a VM within a XenServer. Found some documentation on Open Vswitch just wondering if there was anything else special that needs to be enabled…

  7. Shakirov Shakhrukh

    Hi, Billy.

    I’ve installed as you described. but after i’ve got 2 problems:

    1) DTMF doesn’t work

    2) voice messages duration always 0

    some information about my system:

    1) VMware 7

    2) [root@pbx asterisk]# uname -a
    Linux pbx.tbm.ru 2.6.32-279.14.1.el6.i686 #1 SMP Tue Nov 6 21:05:14 UTC 2012 i686 i686 i386 GNU/Linux

    3) [root@pbx asterisk]# asterisk -v
    Asterisk 11.0.1, Copyright (C) 1999 – 2012 Digium, Inc. and others.
    Created by Mark Spencer
    Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
    This is free software, with components licensed under the GNU General Public
    License version 2 and other licenses; you are welcome to redistribute it under
    certain conditions. Type ‘core show license’ for details.
    =========================================================================
    Asterisk already running on /var/run/asterisk/asterisk.ctl. Use ‘asterisk -r’ to connect.
    [root@pbx asterisk]#

    Regards,
    Shakirov Shakhrukh

  8. Irakli

    Hello Billy,
    I tried to install Asterisk 11 on VM , and I am getting this error :

    make[2]: Leaving directory `/usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/firmware’
    You do not appear to have the sources for the 2.6.18-028stab101.1 kernel installed.
    make[1]: *** [modules] Error 1
    make[1]: Leaving directory `/usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux’
    make: *** [all] Error 2

  9. Irakli

    I am on Godaddy and it is not possible to modify the Kernel 2.6.18 on a virtual dedicated server.

  10. Billy Chia

    Billy Chia

    Samuel,
    This is normal for all software (Apple, Windows or Linux). My tutorial is for a new install – you should NOT run “yum update -y” on a production system. This would be equivalent to me upgrading my Mac from OSX Snow Leopard to OSX Mountain Lion. When I upgrade the OS, I will surely need to upgrade my software applications as well! (Or at a minimum be aware of what features are supported on the OS)

    If you are not familiar with Linux system administration, then most common option is to purchase a support contract with a Digium Certified Asterisk Integrator – be sure the contract covers maintenance of the system. Then the Certified Integrators can perform the system maintenance during scheduled downtime.

    Shakirov,
    As this tutorial pertains specifically to installing from source, I would recommend posting your DTMF question on the Asterisk forums: http://forums.asterisk.org/viewforum.php?f=1&sid=18cca20b74b7fa30707569eb806a4c71

    It will be helpful to include the CLI output when the call is made. (connect to the CLI with “asterisk -rv” instead of “asterisk -v”)

    Irakli,
    You need the kernel development headers. Look at the comment I left above for Mathew and follow the steps.

  11. Muthukumar

    Great Video, Thankx a lot…

  12. Ron

    A very informative post. Just one question though, how about AsteriskNow? Will there be a guided tour as well?
    I would like that :)

  13. dbbrito

    /usr/src/asterisk/asterisk-11.0.2/res/pjproject/pjnath/lib/libpjnath-x86_64-unknown-linux-gnu.a: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make[2]: *** [res_rtp_asterisk.so] Error 1
    make[1]: *** [res] Error 2
    make[1]: Leaving directory `/usr/src/asterisk/asterisk-11.0.2′
    make: *** [_cleantest_all] Error 2

  14. Daniel

    I followed the installation on a 64bits CentOS 6.3 base installation with Apache, MyQSL and PHP already installed.

    Here’s the version I installed:
    asterisk-11.0.2
    dahdi-linux-complete-2.6.1+2.6.1
    libpri-1.4.13

    Everything went as per the tutorial except when in the end when I want to connect to the cli I get:

    [root@localhost asterisk-11.0.2]# asterisk -rvvv
    Asterisk 11.0.2, Copyright (C) 1999 – 2012 Digium, Inc. and others.
    Created by Mark Spencer
    Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
    This is free software, with components licensed under the GNU General Public
    License version 2 and other licenses; you are welcome to redistribute it under
    certain conditions. Type ‘core show license’ for details.
    =========================================================================
    == Parsing ‘/etc/asterisk/asterisk.conf’: Found
    == Parsing ‘/etc/asterisk/extconfig.conf’: Found
    Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)

    If I types “ps auwx | grep asterisk”

    I get this:

    [root@localhost src]# ps auwx | grep asterisk
    root 811 0.0 0.0 108160 760 pts/0 S 19:26 0:00 /bin/sh /usr/sbin/safe_asterisk
    root 813 0.9 1.3 1031428 25320 pts/0 Sl 19:26 0:03 /usr/sbin/asterisk -f -vvvg -c
    root 856 0.0 0.0 103240 840 pts/0 S+ 19:32 0:00 grep asterisk

    So I guess Asterisk is running..

    Thanks for your help
    Daniel

  15. Daniel

    I solved my problem… the command
    sed s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
    Wasn’t changing the “/etc/selinux/config” so SELINUX was not disabled. So I changed it manually with “vi” and now it works.

  16. Billy Chia

    Billy Chia

    Ron,
    Thanks! There is a step-by-step quick start guide for AsteriskNOW on the wiki: https://wiki.asterisk.org/wiki/display/AST/Installing+AsteriskNOW

    dbbrito,
    Try make distclean in /usr/src/asterisk/asterisk-11.0.2/ before you re-compile. If that doesn’t work, try completely deleting the /res/pjproject/ subdirectory and then recompiling. This could be a bug. Try submitting to https://issues.asterisk.org if it’s not already there.

    Daniel,
    Thank you for posting back when you found a solution! Additionally you can use audit2allow so that you are able to keep SELinux enabled and still run asterisk:

    http://wiki.centos.org/HowTos/SELinux

    http://wiki.centos.org/HowTos/SELinux#head-faa96b3fdd922004cdb988c1989e56191c257c01

  17. Trent

    Fail fail, epic fail.

    I have tried versions 1.8, 10, &11 on CentOS 6.x and all return the same thing.

    “/usr/sbin/asterisk -cvvvvvvvv” – “Illegal instruction (core dumped)”

  18. Amit

    Whenever we are running make install command then we are getting below error message

    make[5]: ccar: Command not found
    make[5]: *** [../lib/libpj-i686-pc-linux-gnu.a] Error 127
    make[4]: *** [pjlib] Error 2
    make[3]: *** [all] Error 1
    make[2]: *** [pjproject] Error 2
    make[1]: *** [res] Error 2
    make[1]: Leaving directory `/usr/src/asterisk-11.1.2′
    make: *** [_cleantest_all] Error 2

  19. Aamir

    hi,

    Quick question here, i’ve been experimenting with asterisk for some time now, i just need to know if we can install asterisk 11 on centos 5.5?

    what updates are required to install the asterisk 11 on CentOS 5.5?

    Please guide.

    Thanks.

  20. Ravi

    Thanks for the tutorial,
    Pls advice on the following :-
    i) What are the options I need to enable while install centos6.3 need to install go through customized mode or basic server installation.
    ii) How to enable SRTP .

  21. Billy Chia

    Billy Chia

    Trent,
    This could be related to your hardware – are you trying to compile on a very old machine? I would recommend submitting a bug to issue.asterisk.org – include out put from `cat /proc/cpuinfo` along with following the steps here: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

    Amit,
    Trying deleting the res/pjproject sub directory and then starting over. Be sure to run `make clean && make distclean` in the source directroy

    Aamir,
    Yes, Asterisk works just fine on CentOS 5.5. You can follow the tutorial above and it should work.

    Ravi,
    Follow the tutorial above for CentOS 6.3 it should work just fine. For information on SRTP follow the instructions on the wiki: https://wiki.asterisk.org/wiki/display/AST/Secure+Calling+Tutorial

  22. fred234465

    You don’t need to reboot after disabling selinux. just use “setenforce 0″

  23. Aamir

    /usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/xdefs.h:152: error: conflicting types for âboolâ
    include/linux/types.h:36: error: previous declaration of âboolâ was here
    make[4]: *** [/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/card_bri.o] Error 1
    make[3]: *** [/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp] Error 2
    make[2]: *** [_module_/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi] Error 2
    make[2]: Leaving directory `/usr/src/kernels/2.6.18-348.1.1.el5-i686′
    make[1]: *** [modules] Error 2
    make[1]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux’
    make: *** [all] Error 2
    [root@localhost dahdi-linux-complete-2.6.1+2.6.1]#

    hi Billy,

    I’ve installed the VM multiple time and seen and followed your tutorials like many times as well, but its not helping me.
    I’ve been using the CentOS 5.5. My actual machine is 64-bit and I’ve tried it both the ways with 64 and 32-bit options.
    Still it is giving me the same error.
    Please guide me properly and walk me through this.
    Thank you.

    -A

  24. Aami

    Hey Billy,

    Need Help!!!

    /usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/xdefs.h:152: error: conflicting types for âboolâ
    include/linux/types.h:36: error: previous declaration of âboolâ was here
    make[4]: *** [/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/card_bri.o] Error 1
    make[3]: *** [/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp] Error 2
    make[2]: *** [_module_/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi] Error 2
    make[2]: Leaving directory `/usr/src/kernels/2.6.18-348.1.1.el5-i686′
    make[1]: *** [modules] Error 2
    make[1]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux’
    make: *** [all] Error 2
    [root@localhost dahdi-linux-complete-2.6.1+2.6.1]#

    hi Billy,

    I’ve installed the VM multiple time and seen and followed your tutorials like many times as well, but its not helping me.
    I’ve been using the CentOS 5.5. My actual machine is 64-bit and I’ve tried it both the ways with 64 and 32-bit options.
    Still it is giving me the same error.
    Please guide me properly and walk me through this.
    Thank you.

    -A

  25. Aami

    Hi Billy,

    I just created the new VM and did the whole thing again but still its not working.

    Here are my system details:
    I’ve the OS of 64-bit and running WIN-7 on it.
    I’ve CentOS 32-bit and host machine’s architect supports both 32 and 64-bit, VMware v8.0 software is installed. VM created is also 32-bit.

    [root@localhost ~]# arch
    i686

    [root@localhost ~]# uname -a
    Linux localhost.localdomain 2.6.18-348.1.1.el5 #1 SMP Tue Jan 22 16:24:03 EST 2013 i686 i686 i386 GNU/Linux

    the error m getting after compiling dahdi is as under:
    In file included from /usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/xpd.h:26,
    from /usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/card_bri.c:29:
    /usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/xdefs.h:152: error: conflicting types for ‘bool’
    include/linux/types.h:36: error: previous declaration of ‘bool’ was here
    make[4]: *** [/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/card_bri.o] Error 1
    make[3]: *** [/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp] Error 2
    make[2]: *** [_module_/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi] Error 2
    make[2]: Leaving directory `/usr/src/kernels/2.6.18-348.1.1.el5-i686′
    make[1]: *** [modules] Error 2
    make[1]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux’
    make: *** [all] Error 2

    Please let me know if you need any more information so that i can successfully install it with your help.

    Thnx

    -A

  26. Billy Chia

    Billy Chia

    Aami,
    It looks like your problem is is similar to this:
    https://issues.asterisk.org/jira/browse/DAHLIN-312

    You can follow the instruction on JIRA to do one of the following: comment out the typedef xdef.h, apply the patch or use the release candidate version 2.6.2-rc1 (link found at the bottom).

  27. Rajiv

    Well Aami it shows error at 152 line, i simply delete this line and it worked… dont have any logic, it says its already defined, so redefine is created problem and i removed it… try if it helps you as well..

  28. Kashif

    Billy,
    I am using asterisk 11 and i am trying to pause agent using PauseQueueMember funcation. its promot me error

    app_queue.c:5839 pqm_exec: Attempt to pause interface Local/5516@context_internal/n, not found

    exten => 23,1,Answer
    exten => 23,1,Wait(1)
    exten => 23,n,Set(CALLBACKNUM=${EXTEN})
    exten => 23,n,PauseQueueMember(,Local/5516@context_internal/n)
    exten => 23,n,System( echo “${EPOCH}|${UNIQUEID}|NONE|Agent/${CALLBACKNUM}|AGENTPAUSED|-” >> /var/log/asterisk/queue_log )
    exten => 23,n,UserEvent(RefreshQueue)
    exten => 23,n,Wait(1)
    exten => 23,n,Playback(extension)
    exten => 23s,n,SayDigits(${CALLBACKNUM})
    exten => 23,n,Playback(dictate/paused)
    exten => 23,n,Wait(1)
    exten => 23,n,Hangup

    Can you please explain, whats stand for interface and how i over come this issue
    Waiting your kind response.

  29. Billy Chia

    Billy Chia

    Kashif,
    As your question is un-related to the installation process you should post it on forums.asterisk.org.

  30. Luis Chiang

    Hi, I’m trying to compile the driver chan_motif but it appears disabled, it shows [XXX] at make select

    you know how to make it runs?

  31. Billy Chia

    Billy Chia

    Luis,
    The [XXX] means that you are missing dependencies. When you highlight the entry in Menuselect look for “Depends on” at the bottom. (For more info on Menuselect see: https://wiki.asterisk.org/wiki/display/AST/Using+Menuselect+to+Select+Asterisk+Options)

    In particular chan_motif depends on iksemel and res_xmpp. (res_xmpp is an Asterisk resource module that also depends on iksemel. iksemel is an XML parser.)

    To install the iksemel dependency on CentOS use:

    yum install -y iksemel ikesmel-devel

    Then in the Menuselect tool choose res_xmpp under the resource modules. You will now be able to select chan_motif under the channel driver modules. When you save an exit and continue to compile these modules will be built.

    See also https://wiki.asterisk.org/wiki/display/AST/Calling+using+Google

    To preempt the question – “Why didn’t I include iksemel in the dependencies for the tutorial?”

    The answer is that I could have included every dependency to install every Asterisk module possible, but this would be an very long list. I included only the basic dependencies needed to install Asterisk. For Additional modules you should use the menuselect tool to find out if there are any dependencies and then install those on a case by case basis for the particular modules you’d like to build.

  32. Daniel

    I did all what you said but i got “expr:syntax error” and “stack protector enabled but no compiler support” Please, what can i do to resolve this challenge. Thank you.

  33. Billy Chia

    Billy Chia

    Daniel,
    I’m not sure where you were at in the process, I would recommend starting from a clean install of CentOS 6. Be sure to follow all of the steps in order – including the update, disabling SELinux, and rebooting.

    If you want to run Asterisk with SELinux enabled, then I’d recommend posting on forums.asterisk.org for help, or querying the Redhat/Fedora community for SELinux help.

  34. Daniel

    i did the installation in order just as you have stated. i’m doing the installation on a vm machine actually a vmware player on my windows machine. i installed centos 6.3 on the vmware player.
    i’m hooked at the point of installing dahdi drivers with

    cd /usr/src/dahdi-linux-complete*
    make && make install && make config

    then i get the “stack protector enabled but no compiler support” What can i do still?

  35. Billy Chia

    Billy Chia

    Daniel,
    If you are installing in a VM then there’s no need to install DAHDI – you won’t have a reliable connection to the hardware through the VM. Asterisk virtualizes just fine as voip only system, however if you need telephony card support (TDM and/analog connections) then you will need to install on the server directly without virtualizing.

    You have a few options -

    1. Install without DAHDI. If it works, then you are good. There could be a bug or something particular about your environment that is causing an issue, but there’s no point in digging out a solution if you don’t need DAHDI support.

    2. Install on the server. Be sure to install step-by-step as shown in the video – don’t just copy and paste the commands. (e.g. run make, then make install, etc…) If you still get the DAHDI error I’d recommend posting more detailed output on forums.asterisk.org (including the versions you are using). If there’s a bug you should post to issues.asterisk.org be sure to follow the steps in the issue guidelines for bugs: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines
    If there is a bug the community on forums.asterisk.org can guide you on how to rev down to a working version.

    3. Use AsteriskNOW.
    http://www.asterisk.org/downloads/asterisknow
    Although this install guide is laid out step-by-step for beginners, compiling from source is not a task for the hobbyist or faint of heart. Because every system is nuanced and different, compiling is for advanced users who require the customizability that compiling affords and either understand linux, or are diligent enough to wade through complex troubleshooting. If you are a novice and are seeking to learn more – I’d go to forums.asterisk.org or the #asterisk IRC channel where you can get personalized help. If however, you just need a system up in the simplest way possible then AsteriskNOW is more novice friendly in regards to installation. You can virtualize it and install with or without a GUI.

  36. Daniel

    i finally try installing it again but i get the error “/bin/sh: perl: command not found” what can i do please?

  37. Charles Butcher

    Install went flawless.

    Thank you.

  38. Jason Ellison

    Couple of corrections.

    The command to Disable SELinux does not modify the file. The sed command needs the ‘-i’ option to “edit files in place”.

    Perl is required for the build. Perl should be added to the “yum install -y” line.

    Good document.

  39. Daniel

    hello billy
    i successfully installed asterisk but i discovered that the amr codec is not present. please how do i install that on the asterisk 11 server

  40. Craig

    I was getting the same errors as @Daniel with the : “Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)”

    I have been trying to get this running for a few days and multiple reinstalls.

    manually editing the file fixed the problem.

    This might be causing a lot of problems for other people so you might want to remove the sed command from the install.

  41. Billy Chia

    Billy Chia

    Jason,
    Updated sed to include ‘-i’ thanks!

    For people with out perl on their system they can resolve with

    yum install perl perl-devel -y

    Daniel,
    The Asterisk forums is a good place to start to get help beyond basic installation:

    http://forums.asterisk.org/search.php

    Craig,
    Note the video and blog text both describe manually editing the file. However adding ‘-i’ as noted above will edit the file with sed.

  42. Ekrem

    Hi Billy, we have in plan to install Asterisk Server on VMware infrastructure trying to support handling around 2500-3000 IP Phones on the future in a multisite environment meaning on different cities on a Microwave Links and fiber network with routers and switches. The simultaneous calls are around 100-120 in peak hours in our legacy system with Panasonic PBX’s.
    So my question is How much RAM Memory, Processor-CPU and Storage capacity for the Asterisk Server-Virtual Machine will suport this scenario?
    The SIP protocol will be used with ulaw codec. Also few external Softphones.
    Also I want to interconnect Asterisk with Panasonic PBX’s through Mediant 2000 Audio Codes Gateway and VoIP Cards on Panasonic TDA 200 PBX’s
    Would you prefer do it on this way???

  43. Drex

    Hi Billy

    Great guide! Easy to follow instructions and you SUPERB other videos I’ve watched. Thanks a lot.

  44. Billy Chia

    Billy Chia

    Ekrem,
    The Asterisk forums is a good place to start to get help beyond basic installation:
    http://forums.asterisk.org/search.php

  45. Ekrem

    Billy thanks for the response, but it’s not problem installing Asterisk and so on…we know how to do it….but I was wondering can One single Asterisk installed in a VMware as a virtual machine let’s say with 12GB RAM , Quad CPU @ 3GHz allocated handle 2500 IP Phones registred and 100-120 simultaneous calls???

  46. Antonio

    100% – Tnks.

  47. Markus

    This is such a great post! I was able to get through most of it without incident. However running the “make samples” command ends in an error – it’s like maybe there is something in the script that doesn’t agree with my system? I’m running CentOS 6.3.
    Thanks!
    – Markus

  48. Billy Chia

    Billy Chia

    Ekrem,
    As this is a post about basic installation, comments here should be limited to that scope. The Asterisk forums is a good place to start to get help on anything else:
    http://forums.asterisk.org/search.php

    Markus,
    Make samples copies the files from the “configs” subdirectory of the Asterisk source into /etc/asterisk – so keep in mind that if you run the command multiple times you run the risk of overwriting your configs. With that said if you post the error more specific advice can be offered.

  49. Markus

    When I run “make samples”, I get a number of lines that say “/bin/sh: – : invalid option” and a list of valid options.

    At the end, I get errors such as:
    /bin/sh: line 1: configs/asterisk.adsi: Permission denied
    Installing configs/asterisk.adsi
    /bin/sh: line 7: configs/asterisk.adsi: permission denied
    /bin/sh: line 7: -m: command not found

    I get this for asterisk.adsi and telcordia-1.adsi.

    Thanks,
    – Markus

  50. Billy Chia

    Billy Chia

    Markus,
    Try the install while logged in as the root user – or prepend “sudo” to all of the commands. e.g. “sudo make install”.

  51. Pros

    Great tutorial, I was able to follow step by step and system is up. What is I want to use the GUI?

    it just to enable httpd? or have to install asterisk-GUI, any tutorials on that?

    Thanks

  52. Billy Chia

    Billy Chia

    Pros,
    AsteriskNOW is a full Linux Distribution that installs with a GUI.
    http://www.asterisk.org/downloads/asterisknow

    Note: This will reformat your harddisk and install Linux and Asterisk.

    Step-by-step AsteriskNOW Install Guide:
    https://wiki.asterisk.org/wiki/display/AST/Installing+AsteriskNOW

  53. Markus

    Hi Billy,
    I was logged in as root. All else seemed to go smoothly until I reached the “Make Samples” part.

    A friend of mine found this, which provides more details as to what I’m seeing:
    http://bamboo.asterisk.org/browse/TESTING-ASTERISK18BRANCH-AST18CENTOS32-578/

    My friend said that this issue “is fixed in later versions of the installer.” Has this install process or some of the scripts changed since this posting was made?

    FYI – I am installing this on a netbook – Asus 1005HA with 2 gig of memory and a 160 gig hard drive. I have CentOS 6.3 (Final) up and running with no issues. The machine has a wired network connection and is not using the wireless.

    Any advice?

    Thanks,
    – Markus

  54. Markus

    …and tried installing this on a Dell Vostro 220s with 2 gig of RAM and plenty of hard drive space. Same result.
    – Markus

  55. Billy Chia

    Billy Chia

    hmm… it could be a bug. I would read through Bug Guidelines:
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

    Follow the steps in the guide and if it turns out to be a bug you can submit it to the tracker.

  56. Farah

    hi , i followed all the instructions to install asterisk and it works correctly , until i lance this comond: service dahdi start , it shows me this: dahdi: unrecognized service , what should i do ?

  57. Pros

    Thank you for the quick response Billy. I will look into that. Great job on this gain!

    Pros

  58. Pros

    oh Billy, I forgot to mention I am working on a project to install this in the cloud, I see the full install comes in a DVD which I have no access no option to do this in the cloud. any suggestions?

    Thanks
    Pros

  59. Pros

    Okay, I was able to install the asterisk-GUI following the link below:
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+GUI

    Thanks

  60. Markus

    Hi Billy,
    I am not going to submit a bug report. This is because 1) I’m brand new to Asterisk and 2) because my understanding of Linux is severely limited. My bug report would either have insufficient information to move forward or might lead someone to think this is a different issue than it really is and might pull resources away from other issues.

    Given that I have been able to replicate this issue multiple times, on two machines that are totally different from each other, I think you would have to agree there is a problem here that is likely to affect multiple users.

    I would be happy to run any diagnostic scripts anyone would like me to, and to be an active participant in finding the solution.

    Question: what version of CentOS are you running? I loaded 6.3 (final). Do you think I would have better success with 6.2 or 6.1?

    Thanks,
    – Markus

  61. Billy Chia

    Billy Chia

    Farah,
    This could be caused my serveral different issues – make sure that you ran the “make config” command in the dahdi source. If this is not the issue I would recommend posting on forums.asterisk.org where you can get more detailed feedback.

    Pros,
    AsteriskNOW downloads as an ISO – you are free to burn that to a DVD but it is not necessary. Most VM software will let you load from an ISO. I’d recommend AsteriskNOW over using the AsteriskGUI on top of a source install for many reasons.

    Markus,
    Welcome to Asterisk! We were all new once :) I suggested the bug report because it’s actually pretty easy to fill one out. The guidelines are pretty clear about the information that’s needed and the issue tracker has fields so you log the versions of each software package you are using and other importnat information that’s difficult to get here on the blog. At this point it would be difficult to help you troubleshoot without more detailed information about your system and the errors you are encountering. I admire your persistence to learn and figure this out!

    I would recommend a few options –

    1. Try submitting the bug. If if you don’t get it prefect, the bug marshalls will let you what you missed. (but if you read the guidelines, it’s pretty simple and you’ll have a high chance for success the fist time.) If it is a bug it’ll really help others out to have it tracked and get fixed. And since you can reproduce you are uniquely poised to help.

    2. Additionally you can try installing with the exact versions that I used. As these are known to work. (but the updated versions should work.)

    3. Finally I’d recommend posting on forums.asterisk.org. Although I’m happy to help on the blog, this is not a great format for troubleshooting. It works well for quick answers, but not to dig deeper. Additionally on the forums you’ll have multiple eyes on your problem. It’s a great way to get engaged in the Asterisk community!

  62. David Bauman

    Very good tutorial

  63. Markus

    Hi Billy,
    Thanks – I’ll pursue those avenues. Digging a little deeper, it looks like this has something to do with your 64 bit machine. Since all the components are downloaded through these instructions, it has to be something with CentOS. I am running 6.3, the same as you. Therefore the only difference is that my machines are 32 bit and yours is 64. Might be a good idea to re-name this thread, “How to install Asterisk 11 on CentOS 64 bit,” then do one for 32 bit. If you do, please leave a note here and I’ll go take a look!
    Thanks,
    – Markus

  64. John

    Excellent guide used to install asterisk 11.2.1 on CentOS 6.4

  65. Markus

    Just did a 64 bit CentOS 6.4 install for the first time. I notice that when loading the 32 bit CentOS 6.3, it did not ask me if I wanted to do a server install – there seemed to be only one flavor. Will give 6.4 a try and let you know how it works.
    – Markus

  66. Markus

    Well that was a pretty short ride! I ran the installer, specifying a “basic server”. Upon re-boot, there was no GUI. I logged in, attempted to run “yum update -y” from the command line. Apparently the install did not load the network drivers – something I saw when attempting to use AsteriskNOW on this machine (a Dell Vostro 220s with 2 gig of ram and plenty of hard drive space.)

    So the furthest I’ve gotten so far is to load CentOS 6.3 on a machine, then do the Asterisk install according to the instructions in this blog. It all works, except when I get to the “Make Sample” part.

    Billy – do you know if anyone has done a successful install on a 32 bit machine?

    – Markus

  67. Billy Chia

    Billy Chia

    Markus,
    Check the tutorial again a bit more carefully. The video and text show different commands for 32-bit and 64-bit installs. So you should not simply copy and paste all the commands, you need to read what they do and only use the ones that are particular to your system.

    Also not the optional commands “make clean && make distclean” – you should only run this if you are re-installing over top of a previous install. If your install was successful then you should NOT run these commands prior to running “make samples” and following the rest of the tutorial.

  68. le Chat Noir

    Great Video – very helpful and detailed

    I am no Linux or Asterisk expert but I found it easy to install thanks to the great video

  69. TheFlipside

    Hey nice tutorial but at the part where the requirements are installed you should also add perl to the list since it’s not guaranteed to be present, for example on a new out-of-the-box CentOS 6.4 system

  70. shah

    Hye!nice tutorial.working perfectly.but do you have any idea how to start asterisk on boot?

  71. Billy Chia

    Billy Chia

    shah,

    Running “make config” in the asterisk source directory adds the Asterisk start script to the /etc/init.d/ directory.

    Along with starting Asterisk on boot, this also allows you to start, stop or restart asterisk with “service asterisk start | stop | restart”

  72. Markus

    Hi Billy,
    Ok – solved one glitch but found another…

    SOLVED: The issue with the samples was, indeed, the “make clean” command. I figured running that would be a good step. The tutorial said it wasn’t required, but it sounded like a good thing to do.

    NEW: Ok, so I proceeded down the list. I ran the remaining commands in order:
    – make config
    – service dahdi start
    – service asterisk start

    When I got to that last command, here’s the error that popped up:
    asterisk: unrecognized service

    Some notes, mentioned in earlier postings: I am running this on a Netbook (Asus 1005ha) with 2 gig of memory and plenty of hard drive space and a fantastic Internet connection. The OS is CentOS 6.3 (final) 32 bit. I do not have any dahdi devices connected. The purpose of this install is 1) to have a portable Asterisk server for some unique projects, and 2) to begin tinkering with Asterisk server admin stuff before I ask my boss for some big iron.

    Any thoughts?

    Thanks,
    – Markus

  73. Markus

    I should mention…
    I tried to run the “asterisk -rvvv” command.
    The error I got was, “Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)

    I looked in the /var/run/asterisk directory. It is empty.

    Thanks,
    – Markus

  74. Markus

    One other piece – according to these directions the “Make Configure” command near the end is supposed to add the Asterisk start script to the /etc/init.d/ directory. However when I go to that directory, I do not see any asterisk file there. I do see a dahdi file.
    – Markus

  75. Markus

    Progress!
    I went back and ran “Make Config” again. Then started Dahdi, which worked before. Then I tried to start Asterisk… this time it worked! I was able to enter the “asterisk -rvvv” command and I got a “connected to Asterisk” message!

    So now i need to figure out how to get FreePBX running and then hopefully I have a functioning unit!
    – Markus

  76. bekota

    merci beaucoup pour tout le travail.j’aimerais savoir si on peut utilise le serveur vocal pour asterisk 11

  77. pennyka

    thank you thank you thank you very much, i use fedora 14 and asterisk 1.8.11.0. please give me tutorial for srtp use asterisk 1.8

  78. Markus

    Ok… the final step… installing FreePBX or some other kind of interface. The instructions for doing the install on the FreePBX website worked well. However when I tried to run the “./install_amp” command, the error message said, “bad interpreter: No such file or directory”. Granted, this install is looking for CentOS 5.5, not 6.3. There may be some other dependencies I’m not seeing.

    So here’s a question for Billy or anyone else:
    Is there a version of FreePBX or another GUI that will work with this install of Asterisk?

    Thanks,
    – Markus

  79. Billy Chia

    Billy Chia

    Markus,
    Those who install from source are typically not using a GUI for administration. I would recommend AsteriskNOW – installs CentOS 6, Asterisk 11 and FreePBX GUI. AsteriskNOW is also going to have the FreePBX Digium Phones module integrated for you.

    http://www.asterisk.org/downloads/asterisknow

    If you are installing for the sake of learning, or seeking to do highly customized integration work but then taking advantage of the FreePBX GUI for administration I’d recommend engaging the FreePBX community for installation help. There are a lot of great folks involved with the project. Asterisk and FreePBX are separate projects so you will typically get the best response when you engage the Asterisk community (forums.asterisk.org) on Asterisk-related questions and the FreePBX community (http://www.freepbx.org/community) on FreePBX-related questions.

  80. Miguel

    Hi, I have the following error after installing asterisk ended with 11 on 64-bit CentOS 6.3, I can not start service asterisk:

    [root@srvlinux41 ~]# /etc/init.d/asterisk status
    asterisk dead but subsys locked

  81. Billy Chia

    Billy Chia

    Miguel,
    There are many possibilities. Make sure that SElinux is disabled as this can cause Asterisk to fail to start. Additionally you could look into /var/log/asterisk or start asterisk on the console with ‘asterisk -cvvv’ to see what is happening when it crashes – this will give you a clue as to how to troubleshoot further. Finally, try deleting the lock files from /var/run/asterisk/

  82. IAn

    Really excellent tutorial. All steps explained in the comprehensive video. I ran into one issue during installation on CentOS 64 bit whilst compiling the dahdi and that was a dependency on perl which i resolved by installing perl through yum. Many thanks.

  83. Jas

    Hello Guys,

    I was using asterisk 1.4.44 and I went through all the steps shown in the video and it showed that it has been installed but when I start asterisk by “asterisk -rvvvv” it comes up with the old version i.e. Asterisk 1.4.44
    Would anybody please help me in upgrading it to asterisk 11.

    Thanks

  84. Majed

    Hello
    i was using asterisk 11 with asterisk gui 2 , when i used followme does not work
    please help me

  85. Billy Chia

    Billy Chia

    Jas,
    Upgrading from Asterisk 1.4 to Asterisk 11 is not a trivial task. (This would be the equivalent of upgrading from Windows XP to Windows 8.). !Don’t try the upgrade on a production machine! On your test server: To perform the upgrade you will want to make sure you have backed up all of you config files and any custom modules. Then delete all of /etc/asterisk and /usr/lib/asterisk/modules (assuming you use the default directories for those functions.) Make sure Asterisk and Zaptel (1.4 era version of DAHDI) are stopped. Then perform the steps in the tutorial. You will then see that you are now running Asterisk 11 with the sample configs, however, your 1.4 config files (especially extensions.conf) will most assuredly need to be re-written (possibly from scratch) in order remove deprecated syntax and update to modern options. In this endeavor the CHANGES file and UPGRADE.txt files in the Asterisk source will tell you all of the changes that happened in the software since 1.4 (You can’t say that about any Microsoft product!) Note: Any AGI/AMI integration may also need to be updated. This is all of the top of my head, there potentially other difficulties to encounter when try to upgrade. You may be better off starting with a fresh install of Asterisk 11 on a development server and building from scratch the functionality you need.

    Upgrading from 1.6.2 to 1.8 or 1.8 to 11 would not be as difficult. But the jump from such an old version to modern Asterisk is great. Modern Asterisk is a whole new Asterisk, both in the new functionality it holds and the vastly greater efficiency with which it handles traditional features. Exciting new APIs are being built into Asterisk 12 that will make upgrading from 12 to 13 or 13 to 14 a much simpler process. Asterisk has greatly matured over the years. The benefits of moving to a modern version are surely worth your time. Simply note that having delayed the upgrade for so long means that the investment needed to make the change is greater in proportion to the delay.

    Majed,
    The forums or the users mailing list will be the best place to search for answers and ask for help with followme.
    http://forums.asterisk.org/viewforum.php?f=1&sid=18cca20b74b7fa30707569eb806a4c71
    http://lists.digium.com/mailman/listinfo/asterisk-users

  86. Jose

    Hello

    We are interested in the development of communications web with WebRTC, on the Digium website indicate that Asterisk 11 provides that support can say that differences there is with Asterisk 1.8. I with Asterisk 11 do everything that makes Asterisk 1.8?. Also want to resell minutes. Can you help us to choose the best option?.

    Thanks and greetings.

  87. Christian Cabrera

    Billy
    I was trying to install DAHDI on centos 6.4 with basic functions. I tried to follow the steps but I had some troubles with compyling DAHDI installer. And I couldn’t find any issue relative. I tried to update kernel to 2.6.38 then I installed automake autoconf dependencies and then DAHDI compiler worked. So I recommend update at the beginning those dependencies for simple instalations.
    Thanks a lot for the tutorial. I still trying to config Asterisk

  88. Vijay

    Thanks a lot for such an easy tutorial. 1st time i had trouble then i unistall and reinstall again and it worked like a charm

  89. Rhel

    I’m not sure if this is the right place for my question but I hope you guys can give me an idea how to fix my issue with Asterisk 11. I installed Asterisk 11 on Amazon EC2 AMI Linux and during the last part of installation, I received an error “We could not install init scripts for your distribution” upon entering #make config command. As expected, there is no asterisk script on /etc/init.d. I am googling around and cannot found a solution for this yet. I hope someone can help me out on this. Thanks…

  90. Billy Chia

    Billy Chia

    Rhel,
    You are sure to get a better response searching for answers and asking for help on the official Asterisk forums or the mailing list.
    http://forums.asterisk.org/viewforum.php?f=1&sid=18cca20b74b7fa30707569eb806a4c71
    http://lists.digium.com/mailman/listinfo/asterisk-users

  91. gaurav soni

    this really helps me a lot to install asterisk thankz a lot

  92. Ibrahim Quraishi Mohammed

    Thanks for the awesome post. I have successfully install asterisk however I am getting the below error
    Connected to Asterisk 11.4.0 currently running on LinuxCentOS (pid = 45867)
    [Jul 7 09:44:48] NOTICE[45945]: acl.c:748 ast_apply_acl: SIP Peer ACL: Rejecting ’10.0.0.10′ due to a failure to pass ACL ‘(BASELINE)’
    [Jul 7 09:44:48] NOTICE[45945]: chan_sip.c:27829 handle_request_register: Registration from ‘”100″‘ failed for ’10.0.0.10:64670′ – Device does not match ACL
    [Jul 7 09:44:49] NOTICE[45945]: acl.c:748 ast_apply_acl: SIP Peer ACL: Rejecting ’10.0.0.10′ due to a failure to pass ACL ‘(BASELINE)’
    [Jul 7 09:44:49] NOTICE[45945]: chan_sip.c:27829 handle_request_register: Registration from ‘”100″‘ failed for ’10.0.0.10:64670′ – Device does not match ACL
    LinuxCentOS*CLI>

    I have added ports 10000 to 60000 with UDP on my router and I am sure the user and password is right.
    the error is about the ACL not match ..
    I will appreciate anyone can point to the right direction

  93. Billy Chia

    Billy Chia

    Ibrahim,
    Note that the messages you are receiving are from Asterisk – not your router. So they are related to your Asterisk ACLs, not your network ACLs. Asterisk ACLs are set in one of two ways: either as permit/deny statements in sip.conf or as a named ACL in acl.conf.

    https://wiki.asterisk.org/wiki/display/AST/Named+ACLs

    For further assistance I would recommend seeking help on either the Asterisk Forums or the Asterisk Users Mailing list:

    http://forums.asterisk.org/
    http://lists.digium.com/mailman/listinfo/asterisk-users

  94. felipe gaviria

    great tutorial…. congrats!!!

  95. spankyjpn

    This is really usefull tutorial.
    Thank you for your effort.
    spankyjpn @ Tokyo / Japan

  96. john

    Hey Billy,

    why failed? :(

    [root@localhost src]# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
    –2013-07-23 18:12:11– http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
    Resolving downloads.asterisk.org… failed: Name or service not known.
    wget: unable to resolve host address “downloads.asterisk.org”

  97. Billy Chia

    Billy Chia

    John,
    Check your dns settings.

  98. John

    thanks billy. I already installed it.
    how will i use this app?

  99. Adan

    Hi
    I’ve installed asterisk on a Virtualbox X86_64 and everything works fine, but when I installed on a CPU i386 I get this error by the time dahdi start
    “Missing ‘/sys/bus/astribanks/drivers/xppdrv/sync”,
    I don’t Know why, in fac I notice than the folders “astribanks” and “xpds” exist on the VM X86_64 but ¡n other one don’t.

    Thanks

  100. Billy Chia

    Billy Chia

    John,
    DNS is “Doman Name Service” you are not getting name resolution to downloads.asterisk.org from your server. This is a problem with your network settings. If you are not familiar with configuring these types of network options, then installing Asterisk from source is going to be very challenging. I would recommend AsteriskNOW with is a complete Linux Distribution. Download, burn to a DVD and then install on your server. It will delete everything on the harddrive and install Linux and Asterisk through an easy to use GUI. The DNS and network settings will be taken care of for you.

    http://www.asterisk.org/downloads/asterisknow

    Adan,
    This looks like a bug. You could try recompiling DAHDI – perhaps something unexpected caused the install to fail. If the problem persists, I would follow the steps here to submit a bug report:

    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

  101. dorra

    slm,
    my prob is when i write “​​service asterisk start” i got this “unrecognized service” ??
    help me plz :)

  102. Billy Chia

    Billy Chia

    dorra,
    It appears that you may have forgotten to run “make config” in the Asterisk source directory. “make config” installs a start up script in /etc/init.d. This allows you to run “service asterisk …” commands and also will start Asterisk when the service starts. Take a look back over the tutorial and make sure you haven’t followed all of the steps :)

  103. dorra

    slm,
    thx a lot , i solve it but i have this now : unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist )??

  104. André Emerich

    Adan,
    Have you resolved your dahdi problem?

    I got the same error in a Cent OS Asterisk new installation.
    When installing in a Debian, no errors.

    Regards..

  105. Billy Chia

    Billy Chia

    dorra,
    There are many things that could cause this error – most often it is because SE linux has not be disabled per the instructions.

  106. dorra

    and how can i resolve this problem

  107. Billy Chia

    Billy Chia

    dorra,
    Try cleaning the installation and starting over – follow the guide step by step – each step is important and leaving one out can cause your issue.

    Additionally, I would recommend trying AsteriskNOW instead of trying to compile from source. AsteriskNOW will install Asterisk and Linux via a GUI installer and even has the option to install a GUI administration.

    http://www.asterisk.org/downloads/asterisknow

  108. dorra

    slm ,
    i resolve it :
    # service asterisk start
    # service asterisk status
    # safe_asterisk
    # ps aux | grep asterisk
    # asterisk -r

  109. dorra

    slm , how can i know my asterisk IP

  110. Adan

    Hi André, I’m sorry but a couldn’t resolve the dahdi’s issue, I guess everything was originally because I forgot reboot the machine after the update comand, even when I tried to resolve the problems whit the dependences. I Finally had to resinstall the SO again (Centos 6.4).

  111. maurilio

    Adan Hello, I am from Campo Grande MS – Brazil, I’m having the same problem reported by you. The only way out is it to reinstall the OS? And you have an idea of what caused the problem at the time of OS installation? I’ll reinstall the OS again, and so I can not make the same mistake when installing it

    since ja agadeço

  112. colin

    Hi is There any way to get around Selinux enable this service can not be disable on our servers
    i can disable it to install then re-able it

    Thanks

  113. Billy Chia

    Billy Chia

    Colin,
    Yes you can leave SElinux enabled – you must simply ensure that the correct policies are in place that allow Asterisk to run. In theory there should be a default policy that doesn’t hinder Asterisk, however I have still experienced issues, hence the recommendation to disable it.

    CentOS and Fedora both have documentation on SELinux configuration. However, it is not for the feint of heart –
    http://wiki.centos.org/HowTos/SELinux
    http://docs.fedoraproject.org/en-US/Fedora/13/html/SELinux_FAQ/

  114. colin

    Thanks Billy
    Nice work runs well on centos 6.4
    now i will see how i go with SELinux

  115. If I can be so bold

    To all of you folks that are running into issues with upgrading your OS with an (under) existing Asterisk install, the answer is actually pretty simple.

    When you build Asterisk, it is built against (relying upon) the existing OS. When you do your OS upgrade, you have every reason in the world to expect that you will break Asterisk in the process.

    As a Linux system admin, you should expect to have to recompile Asterisk against the upgraded OS as a part of your system upgrade. You have no idea what changes (without a lot of research or intimate knowledge) have been made to any given application that Asterisk relies upon to function. Anything less is just asking for trouble.

    We’re talking Linux here folks, where you assume responsibility for your system. It’s not doze, where life is dictated to you.

    Welcome to open source software folks, where “if you break it, you own all of the pieces”.

    Hope it helps.

  116. carlos

    i have a 64 bit version and when i ran the command ./configure –libdir=/usr/lib64 i had the following error:
    checking for initscr in -lncurses… yes
    checking for curses.h… (cached) yes
    checking for xml2-config… no
    configure: *** XML documentation will not be available because the ‘libxml2′ development package is missing.
    configure: *** Please run the ‘configure’ script with the ‘–disable-xmldoc’ parameter option
    configure: *** or install the ‘libxml2′ development package.

  117. Billy Chia

    Billy Chia

    Carlos,
    You are missing the libxml2 dependency – if you run the recommended dependency command from the tutorial then you will have the most common dependencies resolved.

    This will get you libxml2 on Centos

    yum install libxml2-devel

    Run this command before you run the configure command.

  118. Kuldip

    I tried the above steps succeeded till dahidi and libpri
    make fails when running for asterisk saying pleas run ./configure although i have run ./configure seems like system time issue .pls suggest

  119. Kuldip

    problem solved asterisk up and running missing sqlite-devel and misconfigured system time

  120. How to Install Asterisk 11 on Ubuntu 12.4 LTS -A blog from digium - Babyraj.com

    […] week Billy Chia published an install guide for Asterisk 11 on CentOS 6. Asterisk 11 is the latest LTS release of Asterisk with many great new features with long term […]

  121. Stephanus Adrianto

    Dear Mr. Billy,

    i have a problem, please help me..
    when i install the dahdi, the system response ‘You do not appear to have the sources for the 2.6.32-042stab079.6 kernel installed.’

    i already searched in this comment, i found that mathew has the same problem with me, then i follow your instruction for mathew.

    when i ‘yum install kernel-devel’
    system response ‘Package kernel-devel-2.6.32-358.23.2.el6.x86_64 already installed and latest version’
    but when i ‘uname -a’
    system response ‘Linux vps.app-dovo.srv 2.6.32-042stab079.6 #1 SMP Mon Aug 26 19:47:50 MSK 2013 x86_64 x86_64 x86_64 GNU/Linux’

    what should i do?
    Thank you very much Mr. Billy

  122. Billy Chia

    Billy Chia

    Stephanus,
    You need to reboot after updating your kernel headers. If you follow the tutorial step-by-step it will instruct you when to reboot.

  123. Stephanus Adrianto

    Dear Mr Billy,

    Yes i did sir,
    i did
    ‘yum install kernel-headers’
    until
    ‘Package kernel-headers-2.6.32-358.23.2.el6.x86_64 already installed and latest version’
    then i did
    ‘reboot’
    but everytime after reboot, when i look up to my kernel ‘uname -a’, still its a ’2.6.32-042stab079.6′…
    about a week i was searching it in google, and still i have no clue..
    do you have any suggestion?

  124. Billy Chia

    Billy Chia

    Stephanus,
    After you reboot you need to recompile dahdi on the new kernel. However if your system is not updating the kernel then I’m not sure how to troubleshoot that as it would be an OS issue and not related to Asterisk. I would query the Fedora/CentOS community for Linux specific troubleshooting advice.

  125. Stephanus Adrianto

    Dear Mr. Billy,

    Big thanks for your help :)
    i would like to say sorry, i just found out that my OS kernel mod cannot be changed, because it is a virtuozo server.
    my sorry of my ignorance :(
    again, i say thank you..

  126. washington intecsoft

    PROBLEM:
    “Hey im having issues with dhadi on centos 6.2 i get a error stating i do not have the kernal source however its not available as package”

    AND OTHER PROBLEM:
    the error m getting after compiling dahdi is as under:
    In file included from /usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/xpd.h:26,
    from /usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/card_bri.c:29:
    /usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/xdefs.h:152: error: conflicting types for ‘bool’
    include/linux/types.h:36: error: previous declaration of ‘bool’ was here
    make[4]: *** [/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/card_bri.o] Error 1
    make[3]: *** [/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp] Error 2
    make[2]: *** [_module_/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi] Error 2
    make[2]: Leaving directory `/usr/src/kernels/2.6.18-348.1.1.el5-i686′
    make[1]: *** [modules] Error 2
    make[1]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux’
    make: *** [all] Error 2

    SOLUTION:::SOLUTION::::SOLUTION:

    i was with same problem, but my version is diferent dahdi-linux 2.7.0.1+2.7.0.1, and the same error:
    You do not appear to have the sources for the 2.x.xx.xxx.x…el6.x86_64 kernel installed.
    others kernel and same error continuous…

    yum groupinstall “Development Tools”
    yum update

    yum install bison bison-devel ncurses ncurses-devel zlib zlib-devel openssl openssl-devel gnutls-devel gcc gcc-devel gcc-c++ libxml2 libxml2-devel newt newt-devel sqlite sqlite-devel glibc glibc-devel readline readline-devel libtermcap libtermcap-devel make make-devel libtool libtool-devel libtermcap libtermcap-devel unixodbc unixodbc-devel perl perl-Net-SSLeay perl-Crypt-SSLeay doxygen curl-devel mlocate lynx tar wget nmap bzip2 mod_ssl crontabs vixie-cron speex speex-devel unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel ImageMagick ImageMagick-devel ImageMagick-perl

    both installed and updated and reboot, but error continuous…
    the same messenger show too in others kernel versions and all are update last version,

    but after hours trying a solution, i fixed it error msg, using this dahdi (live):

    svn checkout http://svn.asterisk.org/svn/dahdi/linux/trunk dahdi-linux
    svn checkout http://svn.asterisk.org/svn/dahdi/tools/trunk dahdi-tools
    cd dahdi-linux
    so, i did make && make install, etc

    font/source: http://docs.tzafrir.org.il/dahdi-linux/ … quirements

    and all right!
    i’m using centos 6.5 last kernel and kernel-devel and try too 6.4 and 6.3
    now it is work pretty well in all.

    sorry my bad english, any thing call me

  127. Krystyna

    Perfect. So simple, straightforward and easy! The video was a bonus helper as well! Just finished my install for my SIP server :D

  128. James COnner

    I have successfully installed this with Centos 6.4 32Bit with Asterisk 11.6 with no issues however, when I try it with Centos 6.4 64Bit and Asterisk 11.6 Asterisk appears to compile and install correctly but will not start, I don’t even get an error message when I issue “server asterisk start”

    Any suggestions? Using only 4gb of the 32gb I have seems like such a waste :)

  129. Billy Chia

    Billy Chia

    James,
    try “service asterisk start”. (“service” instead of “server”). Also, it seems odd that you didn’t get any response from there server at all – you should get something like this:
    # server asterisk start
    -bash: server: command not found

    Also try listing the process and you’ll see if asterisk is running:

    # ps aux | grep asterisk
    root 28974 0.0 0.1 5116 708 pts/12 S 09:26 0:00 /bin/sh /usr/sbin/safe_asterisk
    root 28976 7.8 4.1 50588 21032 pts/12 Sl 09:26 0:00 /usr/sbin/asterisk -f -vvvg -c
    root 29028 0.0 0.1 4360 752 pts/12 S+ 09:26 0:00 grep asterisk

  130. James Conner

    Thanks for the reply Billy, here is what I get

    [root@thy asterisk-11.6.0]# make config
    [root@thy asterisk-11.6.0]# service asterisk start
    Starting asterisk:
    [root@thy asterisk-11.6.0]#

    [root@thy asterisk-11.6.0]# ps aux | grep asterisk
    root 31573 0.1 0.0 108172 980 pts/0 S 13:04 0:00 /bin/sh /usr/sbin/safe_asterisk
    root 31903 0.0 0.0 103244 860 pts/0 S+ 13:06 0:00 grep asterisk

    [root@thy-marcie asterisk-11.6.0]# asterisk -rvvv
    Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)

    When I look for a log file in /var/log/asterisk to get some hint as to what happened there are no files.

    Any Ideas where I should start looking?

  131. James Conner

    When I look at /var/run/asterisk/asterisk.pid it is constantly going up like safe_asterisk is constantly restarting asterisk

  132. Billy Chia

    Billy Chia

    Is SELinux disabled? I have seen SELinux cause asterisk to fail to start.

  133. James Conner

    [root@thy ~]# cat /etc/selinux/config
    SELINUX=disabled

  134. James Conner

    Okay found this is messages under syslog

    kernel: asterisk[2787] trap invalid opcode ip:55bcf0 sp:7fff36dd44e0 error:0 in asterisk[400000+203000]

  135. Billy Chia

    Billy Chia

    Hmm – this seems like it could be a bug – perhaps related to this:
    https://issues.asterisk.org/jira/browse/ASTERISK-19264

    The bug submission guidelines have some steps to follow to submit a bug report:
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

  136. James Conner

    Any Idea what dependency he ran into as I have installed Centos 6.4 32bit and the entire system compiles and runs like a charm, following the exact same steps (except for the ./configure for 64 bit) so all of the same dependencies should be take care of correct?

  137. Billy Chia

    Billy Chia

    Sorry, I don’t know what dependencies were involved with the issue.

  138. James Conner

    I resolved the issue, I need to change the ./configure command line to the following: ./configure –libdir=/usr/lib64 CFLAGS=-mtune=native recompile and install and asterisk starts up

  139. Billy Chia
  140. Marce Martinez Rojas

    Hey thank you very much! your blog was very useful for me and my classmates. Otherwise we would still in class stagnant in this process.

  141. Walt

    This is handy

    Any thoughts on how asterisk 11 performs in a KVM virtual machine when it is processing audio – transcoding, recording calls, conferences for example.

    or is it still not recommended?

  142. Billy Chia

    Billy Chia

    Walt,
    Many companies successfully virtualize Asterisk. The biggest problem I hear about is hardware access. So, if you need connections to the PSTN like PRI lines then I recommend using a VoIP gateway rather than a hardware card.

    http://digium.com/gateways

    Otherwise Asterisk performs well in virtualized environments.

  143. Mohammed Altameemy

    Sir,
    i did the install and it seem all things fine except i am getting (chan_sip.c:10556 process_sdp: No com patible codecs, not accepting this offer!)
    when making test call .
    i tried to make call with G723.1 and G729 , but getting same problem
    also i checked that G723.1 and G729 are installed in my askterisk by the command ( core show translations ) , and i found them .
    so where is the problem plz ?

  144. Billy Chia

    Billy Chia

    Mohammed,
    I looks like your system is installed properly. This issue most likely has to do with how your codecs are configured rather than an installation issue. I would recommend posting on forums.asterisk.org to get the best help for this issue.

  145. Mohammed

    Ok i will do Mr Billy
    thanks for your fast respond

  146. Fraa

    Billy,

    Great post, thanks for the info!! Sorry to see this one post has kept you replying to people for 2 years. Thanks for keeping the community strong!!

  147. Billy Chia

    Billy Chia

    Fraa,
    One of my favorite parts of blogging is community interaction. I actually consider it a great success that folks are still commenting on an old post. Thanks for your comments as well! :)

  148. Oleg

    Very useful post. Thank you!

  149. BuffPuff

    Any reason not to use the Digium repository at http://packages.asterisk.org/ for installing on YUM servers?

  150. Billy Chia

    Billy Chia

    BuffPuff,
    Installing from a repo works just fine and you can find instructions for doing so on the wiki:
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Packages

    In terms of why you might want to compile from source vs using the repo – that will depend on your specific needs. If you compile from source you have the most control and the ability to apply patches as soon as they are released. However for this added benefit, you increase you administrative overhead. Using the repo is certainly a simpler process. Just keep in mind that you are relying on the upstream repo to stay update.

  151. Vojkan

    @Billy: I would like to thank you for this extensive tutorial, really good job. Is there any comparably good tutorial on initial configuration of sip.conf and extensions.conf files? Thank you.
    @James Conner: Thank you very very much for the solution of your problem. It saved me lot’s of hours. I had this problem with CentOS 6.4 and Asterisk 11.7.

  152. zaineb

    root@zanieb:/etc/init.d# service asterisk start
    * Starting Asterisk PBX: asterisk Illegal instruction (core dumped)
    root@zanieb:/etc/init.d# service asterisk restart
    * Stopping Asterisk PBX: asterisk No /usr/sbin/asterisk found running; none killed.
    [ OK ]
    please help me to resoudre this probleme
    * Starting Asterisk PBX: asterisk Illegal instruction (core dumped)
    root@zanieb:/etc/init.d# asterisk -rvvvv
    Instruction non permise (core dumped)
    root@zanieb:/etc/init.d# asterisk -rvvv

  153. Billy Chia

    Billy Chia

    zaineb,
    This sounds like the same problem as Andrew – see my response here:
    http://blogs.digium.com/2012/11/14/how-to-install-asterisk-11-on-ubuntu-12-4-lts/#comment-30257

  154. Daaf

    Hi Billy!

    Thank you so much for taking the time to post such a detailed guide!

    Just a small contribution to futur noobs like myself..

    I spend quite some time (with digium support on the phone) trying to find why your guide was not quite getting me to a system with working PRI…

    As it turns out the culprit was I was installing on a 64bit system, but libpri ended up in the ‘normal’ lib folder.

    Solution was simple, install libpri using: make install libdir=/usr/lib64

    Perhaps you could add a small note in your guide ;)

    Thank you again!

  155. Pinky

    Hello Billy Chia,

    We have implemented “askerisk server” on AWS EC2. I am facing few issues with server. Same setup is done in my virtual environment it is working well. Our requirement is softphone (on laptop :- jitsi, ekiga. Androids :- Bria – CCS enabled Android Ed, Zoiper Same for Apple.) I am using EC2 Centos 6.5 AMI

    When we use on our local lan/WiFi all soft phone work well. When try register from soft phone using WiFi/GMS network noting works. We have not install “dahdi”on AWS Cloud. We are not able fix this there is nothing in my log file as well.
    As follow we have install asterisk server.
    uname -a
    Linux guggle.co.in 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
    ####################################################################################################################
    cat /etc/redhat-release
    CentOS release 6.5 (Final)
    ####################################################################################################################
    vi /etc/hosts
    209.179.132.XXX guggle.co.in guggle
    ####################################################################################################################
    vi /etc/sysconfig/network
    HOSTNAME=guggle.co.in
    ####################################################################################################################
    vi /etc/hostname
    guggle.co.in
    ####################################################################################################################
    vi /etc/selinux/config
    selinux=disabled
    chkconfig iptables off
    chkconfig ip6tables off
    #####################################################################################################################
    reboot
    ####################################################################################################################

    rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6Server/x86_64/epel-release-6-8.noarch.rpm && cd /etc/yum.repos.d/ && wget http://packages.asterisk.org/centos/centos-asterisk-12.repo && sudo yum install gcc bison flex zlib-devel openssl-devel httpd mysql-server mysql-devel krb5-libs e2fsprogs-devel keyutils-libs-devel krb5-devel libselinux-devel libsepol-devel krb5-workstation mod_dav_svn subversion libpri asterisk
    #######################################################################################################################
    vi http.conf

    [general]
    enabled = yes
    # asterisk-gui will run on all interface with port 8088
    bindaddr = 0.0.0.0
    bindport = 8088
    prefix = asterisk
    enablestatic = yes
    # when you point to http://:8088/ this will get redirected to
    # http://:8088/asterisk/static/config/index.html
    redirect = / /asterisk/static/config/index.html
    [post_mappings]
    backups = /var/lib/asterisk/gui_backups
    moh = /var/lib/asterisk/moh
    #########################################################################################################################
    vi manager.conf

    [general]
    enabled = yes
    port = 5038
    bindaddr = 0.0.0.0
    webenabled = yes
    # create a user for asterisk-gui with username admin
    # password 1234 and below access control.
    [admin]
    secret = 1234
    read = system,call,log,verbose,command,agent,user,config
    write = system,call,log,verbose,command,agent,user,config,originate

    ##############################################################################################################################
    cd /usr/src/ && wget http://downloads.asterisk.org/pub/telephony/asterisk-gui/asterisk-gui-2.1.0-rc1.tar.gz && tar zxvf asterisk-gui-2.1.0-rc1.tar.gz && cd asterisk-gui-2.1.0* && ./configure && make && make install && make checkconfig && cp -Rfv /var/lib/asterisk/* /usr/share/asterisk/ && mv /var/lib/asterisk /var/lib/asterisk_original && ln -s /usr/share/asterisk /var/lib/asterisk
    #################################################################################################################################

    chkconfig asterisk on && chkconfig dahdi on && reboot
    ##############################################################################################################################
    login as root :

    cd /etc/asterisk

    vi sip.conf

    [raj]
    type=friend
    host=dynamic
    secret=password
    context=users

    [pjain]
    type=friend
    host=dynamic
    secret=password
    context=users

    [sham]
    type=friend
    host=dynamic
    secret=password
    context=users
    #############################################################################################################################
    vi extension.conf

    [users]
    exten=>986001,1,Dial(SIP/raj,20)
    exten=>986002,1,Dial(SIP/pjain,20)
    exten=>986003,1,Dial(SIP/sham,20)
    ###########################################################################################################################
    service asterisk restart

    asterisk -rvvvvc

    sip reload
    sip show peers
    dialplan reload
    dialplan show users
    http show status

    http://guggle.co.in:8088/asterisk/static/config/index.html
    ##########################################################################################################################

  156. Saeedpersa

    Dear Friends

    after installation done and successfully i changed sip.conf & extensions.conf to these codes:

    CODE: SELECT ALL
    sip.conf:

    [general]
    alwaysauthreject=yes
    [Google](!)
    qualify=yes
    host=dynamic
    type=friend
    context=office
    nat=yes
    disallow=all
    allow=ulaw
    allow=alaw
    secret=123456

    [office](Google)
    [ceo](Google)

    and extensions.conf
    CODE: SELECT ALL

    [office]

    exten => 100,1,Dial(SIP/office)
    exten => 200,1,Dial(SIP/ceo)
    [default]
    exten => s,1,Background(Payam-Persa/opening2)
    exten => s,2,Background(Payam-Persa/opening2)

    exten => 1,1,Playback(Payam-Persa/about)
    exten => 1,2,Playback(Payam-Persa/return2)
    exten => 1,3,Background(Payam-Persa/hello)
    exten => 1,4,Playback(Payam-Persa/thanks)
    exten => 1,5,Hangup()

    but unfortunately when i try to connect my zoiper or my IP phone to Asterisk it doesn’t work even in CLI : asterisk -rvvvvv it doesn’t s show any thing…

  157. Pablo Valenciano

    For those who currently have the error with perl:

    error “/bin/sh: perl: command not found”

    do:

    yum install perl ncurses-devel

  158. Leonard

    Asterisk 11, Centos 6.5 (final)
    for the life of me I cannot find the reason chat_sip.so wont compile.

    I have checked the configure output, make output, menuselect does not seem to show any missing dependancy.

    checked Openssl installed and found (1.0.1e)

    I am at a complete loss.
    Anytips on where to look?

  159. Paulson

    Please I am trying to Install CentOS directly on the server, burn downloaded file to a disk but my server will not boot from it. Please how can I boot to install from it. My server has Microsoft Server Essential 2012 on it. I change the Bios to boot from CD ROM but is not booting from it. Though I did install it on a virtualbox but want to install it on the server directly.

  160. Paulson

    Test my installation with asterisk -rvvv,

    indicated error : unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)

  161. sreerag

    Hi, I am upgrading my freepbx.

    The following modules are disabled because they need to be upgraded:
    restapi, endpointman.

    Please let me know how we can proceed to upgrade the above module using CLI, since the above I tried using GUI, but it is not getting upgraded, and also can anyone help, if the above two product would affect the freepbx server.

    Thanks in advance

  162. ghero

    Hello,

    Great tutorial!!

    I have a question..
    If i want to upgrade asterisk from 11.7.0 to 11.8.1 do I need to recompile and install dahdi and libpri also or just asterisk?

    cd asterisk-11.8.1
    make clean
    ./configure
    make menuselect
    make
    make install
    make config

    would that be correct procedure?

    Regards

  163. Billy Chia

    Billy Chia

    The steps to update are here:
    http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/Installing_id292827.html

    DO NOT run “make config” again – this command copies the sample files from the source directory into /etc/asterisk. If you run this command on a production system you run the risk of overwriting your configs.

    Be sure to back up properly and schedule the appropriate maintenance window with your users before attempting the update.

    Good luck!

  164. Ben Banda

    Hie

    I am trying to install VOIP on clearOS and someone help me with a script to automate all the stages needed in the installation

    Many thanks

    Ben

  165. rajendra

    Hey I am getting this error while configuring Elastix PBX
    Failed to connect to Asterisk Manager Interface – 127.0.0.1:5038

  166. Gary Naj

    Hi my dhadi starts sucessfully but…
    $ sudo service dahdi start
    Loading DAHDI hardware modules:
    wct4xxp: [ OK ]
    wcte43x: [ OK ]
    wcte12xp: [ OK ]
    wcte13xp: [ OK ]
    wct1xxp: [ OK ]
    wcte11xp: [ OK ]
    wctdm24xxp: [ OK ]
    wcaxx: [ OK ]
    wcfxo: [ OK ]
    wctdm: [ OK ]
    wcb4xxp: [ OK ]
    wctc4xxp: [ OK ]
    xpp_usb: [ OK ]

    Running dahdi_cfg: [ OK ]

    I get an error when starting asterisk it stated that:
    $ service asterisk start
    asterisk: unrecognized service

    Though it says that I’ve completed the installation
    +—- 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: +
    + +
    + make samples +
    + +
    +—————– 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 +
    +——————————————-+

  167. Billy Chia

    Billy Chia

    Gary,
    Make sure to run “make config” when the instructions tell you to do that. This will install the script into the /etc/init.d/ directory that is called with the “service asterisk start” command.

  168. Gary Naj

    Thanks Billy but how do I make a clean install again I already execute make sample and make progdocs which installs additional files?

  169. Billy Chia

    Billy Chia

    From the post:

    Optional: If you ran into errors you will want to clean the install directory before recompiling.

    make clean && make distclean

  170. Gary Naj

    asterisk did not instruct me to “make config” after make install and make samples so I initiatively execute the command

    $ sudo make config
    ]$ sudo service asterisk start
    Starting asterisk:
    $ sudo service asterisk status
    asterisk (pid 30522) is running…
    $ sudo service asterisk stop
    Stopping safe_asterisk: [ OK ]
    Shutting down asterisk: [ OK ]
    $ sudo service asterisk status
    asterisk is stopped
    $ sudo service asterisk start
    Starting asterisk:
    ]$ asterisk -rvvv
    Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
    $ sudo service asterisk status
    asterisk (pid 30651) is running…

    Whats wrong with my asterisk???

  171. Gary Naj

    it running now, maybe some PID interferres with the sip process

    CLI> sip show peers
    Name/username Host Dyn Forcerport Comedia ACL Port Status Description
    Billy Chia [replies: 2 online, 0 offline unsent: 0 online, 0 offline]

    Thanks Billy!

  172. Gary Naj

    Where can I get a “CBTNuggets-like” video tutorial for asterisk?

  173. Billy Chia

    Billy Chia

    “Asterisk Essentials” is a CBTNuggets styles video tutorial for Asterisk:
    http://www.digium.com/en/training/asterisk/asterisk-essentials-training

  174. syed wasi

    hi ,
    i have done installation as per above procedure but there is error in last option.
    [root@bsgi-pbx ~]# asterisk -rvvv
    asterisk: error while loading shared libraries: libasteriskssl.so.1: cannot open shared object file: No such file or directory

  175. Billy Chia

    Billy Chia

    Are you using a 64-bit system, and if so did you follow the instructions above for 64-bit?

    More info:
    http://lists.digium.com/pipermail/asterisk-dev/2012-August/056616.html

  176. syed wasi

    hello,
    i would like to share update for the above error message .
    just come across solution from one website.

    SOLUTION:
    ln -s /usr/lib/libasteriskssl.so.1 /usr/lib64/libasteriskssl.so.1

    to be execute on terminal mode.

  177. Gary Naj

    can I enable SELinux after installation?

  178. Billy Chia

    Billy Chia

    Gary,
    It is possible to install and run Asterisk with SELinux enabled, however it requires an in-depth knowledge SELinux to make the proper configurations. Given that you are asking the question I would recommend that you leave it disabled. If you desire to enable SELinux then I would recommend querying the Linux community for help on how to set up and maintain SELinux. You might also ask on http://forums.asterisk.org but I know that many in the Asterisk community simply run with SELinux disabled.

  179. Sandile

    Awesome post, i have an issue when running asterisk -rvvv I get the following error “unable to connect to remote asterisk (does /var/run/asterisk.clt exist?)
    on checking the directory asterisk.ctl does not exist, how do I resolve this

  180. Bob Li

    I followed all the steps to create a sip account and dialplan extension. But I failed to make a call from boba(I use boba instead of bob ) to alice.
    The two users have been registered ok.

    sip show users
    Username Secret Accountcode Def.Context ACL Forcerport
    demo-boba boba123 from-internal No No
    demo-alice alice123 from-internal No No

    And the dialplan is also configured

    dialplan show users
    [ Context 'users' created by 'pbx_config' ]
    ’6001′ => 1. Dial(SIP/demo-alice,20) [pbx_config]
    ’6002′ => 1. Dial(SIP/demo-boba,20) [pbx_config]

    -= 2 extensions (2 priorities) in 1 context. =-

    But when I made a call from boba to alice , the asterisk always says following contents: “[May 22 03:11:35] NOTICE[2038][C-00000018]: chan_sip.c:25632 handle_request_invite: Call from ‘demo-boba’ (192.168.2.251:5060) to extension ’6001′ rejected because extension not found in context ‘from-internal’.

    What should I do next? Where was I wrong when followinging the config steps?

    Thanks for your help in advance.

  181. Bob Li

    I also tried call demo-alice from demo-boba. The same result was as following:

    – Registered SIP ‘demo-boba’ at 192.168.2.251:5060
    [May 22 03:21:56] NOTICE[2038]: chan_sip.c:27853 handle_request_subscribe: Received SIP subscribe for peer without mailbox: demo-boba
    == Using SIP RTP CoS mark 5
    [May 22 03:22:05] NOTICE[2038][C-00000019]: chan_sip.c:25632 handle_request_invite: Call from ‘demo-boba’ (192.168.2.251:5060) to extension ‘demo-aliece’ rejected because extension not found in context ‘from-internal’.

  182. Bob Li

    BTW, I use the Ekiga to do the test.

  183. Bob Li

    I’ve fixed this issue. The root cause was that ‘from-internal’ should be ‘user’. Following the instruction, I used context ‘from-internal’ in the sip.conf. I defined the context [users] in extension.conf. That caused the problem. When I set the context=users in sip.conf, everything was ok.

  184. syed wasi

    can anybody give me procedure for asterisk 11 and freepbx 11 in cent os 6.5

  185. Billy Chia

    Billy Chia

    AsteriskNOW – http://www.asterisk.org/downloads/asterisknow
    easiest way to install Asterisk, FreePBX and CentOS

  186. Linux Guru

    I have installed the following
    Centos 6.4 (64 bits)
    asterisk 11.10.x
    dahdi linux 2.9.x
    libpri 1.4.x.x
    asterisk-gui-2.1.0-rc1
    When trying to access asterisk gui it give the following error
    The GUI does not have necessary privileges.
    Please check the manager permissions for the user !
    for test purpose i have copied the manager.conf and http.conf from one of my server already working server to newly build server but the problem remain same.Please help me in this regard.

  187. liveM

    I have installed the following :
    CentOS release 6.5 (Final) (64 bit)
    DAHDI Version: 2.9.1.1 Echo Canceller: MG2
    libpri version: 1.4.15

    When starting asterisk, I got the error:

    ERROR[27170] codec_dahdi.c: Failed to open /dev/dahdi/transcode: No such file or directory

    Is that mean any thing wrong with dahdi or libpri ?Thanks.

  188. liveM

    My asterisk version is 11.10.2

  189. med

    Hi Billy
    i have a probleme when i try to start asterisk , it show that message :
    [root@localhost asterisk-11.11.0]# asterisk -rvvv
    asterisk: error while loading shared libraries: libasteriskssl.so.1: cannot open shared object file: No such file or directory

    I use asterisk-11.11.0

  190. Allen Strand

    Excellent. I compared this with the book Asterisk the definitive guide. Both were similar and in some cases I followed your order and in other cases the book.

    I wanted to change the username asterisk runs under. The biggest headache was finding where init.d AST_USER was initialized to “asterisk” since I wanted to use a different service account name. I never found it but “fixed” the init.d script.

  191. akash

    Hi Billy,
    on doing
    ./configure –libdir=/usr/lib64 && make menuselect && make && make install
    i run into errors
    [CC] app_mysql.c -> app_mysql.o
    app_mysql.c:35:25: error: mysql/mysql.h: No such file or directory
    app_mysql.c: In function ‘mysql_ds_destroy’:
    app_mysql.c:137: warning: implicit declaration of function ‘mysql_close’
    app_mysql.c:140: warning: implicit declaration of function ‘mysql_free_result’
    app_mysql.c: In function ‘aMYSQL_connect’:
    app_mysql.c:322: error: ‘MYSQL’ undeclared (first use in this function)
    app_mysql.c:322: error: (Each undeclared identifier is reported only once
    app_mysql.c:322: error: for each function it appears in.)
    app_mysql.c:322: error: ‘mysql’ undeclared (first use in this function)
    app_mysql.c:335: warning: implicit declaration of function ‘mysql_init’
    app_mysql.c:342: warning: implicit declaration of function ‘mysql_options’
    app_mysql.c:342: error: ‘MYSQL_OPT_CONNECT_TIMEOUT’ undeclared (first use in this function)
    app_mysql.c:348: warning: implicit declaration of function ‘mysql_real_escape_string’
    app_mysql.c:349: error: ‘MYSQL_INIT_COMMAND’ undeclared (first use in this function)
    app_mysql.c:350: error: ‘MYSQL_SET_CHARSET_NAME’ undeclared (first use in this function)
    app_mysql.c:361: warning: implicit declaration of function ‘mysql_real_connect’
    app_mysql.c:371: warning: implicit declaration of function ‘mysql_errno’
    app_mysql.c:371: warning: implicit declaration of function ‘mysql_error’
    app_mysql.c: In function ‘aMYSQL_query’:
    app_mysql.c:387: error: ‘MYSQL’ undeclared (first use in this function)
    app_mysql.c:387: error: ‘mysql’ undeclared (first use in this function)
    app_mysql.c:388: error: ‘MYSQL_RES’ undeclared (first use in this function)
    app_mysql.c:388: error: ‘mysqlres’ undeclared (first use in this function)
    app_mysql.c:404: warning: implicit declaration of function ‘mysql_query’
    app_mysql.c:409: warning: implicit declaration of function ‘mysql_store_result’
    app_mysql.c:412: warning: implicit declaration of function ‘mysql_field_count’
    app_mysql.c: In function ‘aMYSQL_nextresult’:
    app_mysql.c:422: error: ‘MYSQL’ undeclared (first use in this function)
    app_mysql.c:422: error: ‘mysql’ undeclared (first use in this function)
    app_mysql.c:423: error: ‘MYSQL_RES’ undeclared (first use in this function)
    app_mysql.c:423: error: ‘mysqlres’ undeclared (first use in this function)
    app_mysql.c:444: warning: implicit declaration of function ‘mysql_more_results’
    app_mysql.c:445: warning: implicit declaration of function ‘mysql_next_result’
    app_mysql.c: In function ‘aMYSQL_fetch’:
    app_mysql.c:462: error: ‘MYSQL_RES’ undeclared (first use in this function)
    app_mysql.c:462: error: ‘mysqlres’ undeclared (first use in this function)
    app_mysql.c:463: error: ‘MYSQL_ROW’ undeclared (first use in this function)
    app_mysql.c:463: error: expected ‘;’ before ‘mysqlrow’
    app_mysql.c:480: error: ‘mysqlrow’ undeclared (first use in this function)
    app_mysql.c:480: warning: implicit declaration of function ‘mysql_fetch_row’
    app_mysql.c:481: warning: implicit declaration of function ‘mysql_num_fields’
    app_mysql.c: In function ‘aMYSQL_clear’:
    app_mysql.c:514: error: ‘MYSQL_RES’ undeclared (first use in this function)
    app_mysql.c:514: error: ‘mysqlres’ undeclared (first use in this function)
    app_mysql.c: In function ‘aMYSQL_disconnect’:
    app_mysql.c:531: error: ‘MYSQL’ undeclared (first use in this function)
    app_mysql.c:531: error: ‘mysql’ undeclared (first use in this function)
    make[1]: *** [app_mysql.o] Error 1
    make: *** [addons] Error 2

    i have installed mysql also,then also its giving the same error
    what should i do? am i missing something?
    Thanks in advance

  192. Murali

    For those who face the “asterisk dead but subsys locked” error message, follow the steps in link below:

    https://github.com/jgarzik/cpuminer/issues/38

    Then restart asterisk service

  193. adam jones

    hi, i installed asterisk on centos 6. i set required information in sip.conf, extension.conf, modules.conf in the /etc/asterisk/ directory. but when i try to strat a simple dialplan such as hello-word with a soft phone, no happens any thing. what can i do?

  194. Installation of asterisk 11 on centos 6 | Eduguru - Good Blogging

    […] i have installed asterisk 11 on centos 6 as per the instruction from Digium blog.  The instruction i have followed to install is […]

Leave a Reply