How to setup Asterisk 1.6.2 on Centos 5.4

Posted by Warren Selby on Jan 20, 2010 in asterisk, Blog, linux | 78 comments

UPDATE 05/20/2011 – An updated version of this post, detailing How to setup Asterisk 1.8, has been posted. Check it out if you want to move to the latest and greatest version of asterisk. If you’d prefer to stay with version 1.6.2, please, read on!

After looking around for a while, I noticed something – there’s some documentation out there, but not a lot, on how to do a fresh install / setup of the latest version of Asterisk (1.6.2) on the latest version of CentOS (5.4). So I thought I’d go ahead and go through the process myself and then post the steps I used. So let’s get started…

First things first, the server. I ordered a new dedicated server from my webhost that was running the latest 32-bit version of CentOS 5.4. I had nothing else installed on it, this was just a base vanilla server install. The first thing I did once I had access to the server was to install the latest versions of all installed software:

# yum update

A lot of guides out there use the -y switch with yum to auto-install whatever is found to be updated. You can do this if you like, however, I personally prefer to have to manually select Yes before I do the updates. That all comes down to personal preference.

Next, we need to install all of Asterisk’s dependencies. These are programs that are required to be installed before you can compile asterisk. This is the list I use, it includes the source compilers, some needed development libraries, as well as some dependencies for various asterisk modules I like to load.

# yum install gcc gcc-c++ make openssl-devel newt-devel ncurses-devel libtermcap-devel libxml2-devel kernel-devel perl curl curl-devel

Also, if you have a PAE-based kernel (like I do), which is becoming more and more common these days, you’ll need to load the PAE kernel headers:

# yum install kernel-PAE-devel

If you’re not sure if you have a PAE kernel, you can check using the “uname -r” command:

# uname -r
2.6.18-164.10.1.el5PAE

Next, we’ll install a MySQL database server to handle our CDR (call detail records) storage, and also to prepare the way for using the Asterisk Realtime Architecture (the ability to store our configuration parameters in a database as opposed to flat files). You can safely skip this step if you feel you’ll never make that transition, but it doesn’t hurt anything to go ahead and get this setup now as opposed to later.

# yum install libtool-ltdl libtool-ltdl-devel unixODBC-devel mysql mysql-devel mysql-server mysql-connector-odbc

Now, we’ve got all of the dependencies installed. It’s time to go ahead and get into the meat of the install. We’ll start by creating a new directory under /usr/src to keep everything nice and tidy. Then we’ll download all of the sources we’re going to need for this install.

# cd /usr/src
# mkdir asterisk
# cd asterisk
# wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.2.0.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.2.0.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
# wget http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
# tar zxvf asterisk-1.6.2.0.tar.gz
# tar zxvf asterisk-addons-1.6.2.0.tar.gz
# tar zxvf dahdi-linux-complete-current.tar.gz
# tar zxvf libpri-1.4-current.tar.gz

First, we’ll install LibPRI. LibPRI is a library used by TDM cards (T1 / E1 cards, etc). Even if you don’t have one of these cards, it’s safe to install LibPRI – it won’t have any negative effects on your system.

# cd /usr/src/asterisk/libpri-1.4.10.2
# make clean
# make
# make install

Next, we’ll install DAHDI. DAHDI means “Digium Asterisk Hardware Device Interface”, it’s pronounced “Daddy”, and it’s the replacement of the old Zaptel driver stack. DAHDI is the set of linux kernel modules and also a set of tools for interfacing with TDM cards. More importantly, DAHDI provides timing to several asterisk components, such as the MeetMe application as well as Music on Hold. If you don’t have a proper timing source installed, you’ll notice lots of stuttering pauses in any kind of audio playback (Music on Hold, IVR prompts, voicemail greetings) from asterisk. If you don’t have any TDM hardware installed in your server, DAHDI also provides a “dummy” driver that will provide a timing source to asterisk.

Now, starting with Asterisk 1.6.1, Digium introduced new internal timing options that can be used in place of the DAHDI timer, however, these are only available on systems running the latest kernels (2.6.25+) in the case of res_timing_timerfd, or on lightly loaded systems, as is the case with res_timing_pthread. If you would rather use one of these options instead of the DAHDI dummy driver, you may skip this step – just be sure to select one of the above mentioned res_timing resouces when you build asterisk later. IMPORTANT NOTE – if you do have a TDM card installed in your system, you may not skip this step!

# cd /usr/src/asterisk/dahdi-linux-complete-2.2.1-rc2+2.2.1-rc2/
# make all
# make install
# make config

Now that you’ve installed DAHDI, you need to configure it. You do that by editing the following files, based on your situation. The files themselves contain lots of documentation, so I won’t go over that in much detail here, except to say this – if you have no TDM cards and are only installing DAHDI for the dummy timing source, you can comment out every driver referenced in the modules file. I prefer to use vi, you can use whichever editor is your favorite. If you’re new to linux, I would suggest using nano with the -w switch.

# vi /etc/dahdi/modules
# vi /etc/dahdi/system.conf

Now that we’ve got DAHDI configured the way we need for our system, we need to set it to start at boot time, and then we need to start it.

# chkconfig dahdi on
# service dahdi start

Next, let’s setup our MySQL database for CDR storage. I’ll make another post detailing the settings needed for Asterisk Realtime later. Be sure to run the mysql_secure_installation script after you start MySQL in order to set up a root password to protect your SQL databases!

# chkconfig mysqld on
# service mysqld start
# /usr/bin/mysql_secure_installation
# mysql -p

 

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE DATABASE `asterisk` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `asterisk`;
CREATE TABLE IF NOT EXISTS `cdr` (
`recid` mediumint(8) unsigned NOT NULL auto_increment COMMENT 'Record ID',
`calldate` datetime NOT NULL default '0000-00-00 00:00:00',
`clid` varchar(80) NOT NULL default '',
`src` varchar(80) NOT NULL default '',
`dst` varchar(80) NOT NULL default '',
`dcontext` varchar(80) NOT NULL default '',
`channel` varchar(80) NOT NULL default '',
`dstchannel` varchar(80) NOT NULL default '',
`lastapp` varchar(80) NOT NULL default '',
`lastdata` varchar(80) NOT NULL default '',
`duration` int(11) NOT NULL default '0',
`billsec` int(11) NOT NULL default '0',
`disposition` varchar(45) NOT NULL default '',
`amaflags` int(11) NOT NULL default '0',
`accountcode` varchar(20) NOT NULL default '',
`uniqueid` varchar(32) NOT NULL default '',
`userfield` varchar(255) NOT NULL default '',
PRIMARY KEY  (`recid`),
KEY `calldate` (`calldate`),
KEY `dst` (`dst`),
KEY `accountcode` (`accountcode`),
KEY `src` (`src`),
KEY `disposition` (`disposition`),
KEY `uniqueid` (`uniqueid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE USER 'asterisk'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT FILE ON * . * TO 'asterisk'@'localhost' IDENTIFIED BY 'PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
GRANT INSERT ON `asterisk`.`cdr` TO 'asterisk'@'localhost';

 

 

Be sure to set your own password for the asterisk user (where I used ‘PASSWORD’ in the above block).

Now, we’ve got all the prerequisites installed. Let’s install Asterisk!

# cd /usr/src/asterisk/asterisk-1.6.2.0/
# make clean
# ./configure
# make menuselect

This is where you select all of the modules, applications, resource modules, codecs, sound pacakges, etc, that you want installed with Asterisk. Take a little time to go through the new menu system (much improved over the 1.4 branch) and select the options you want. Move through menus using the up and down arrow keys, go to the options pane using tab, move up and down through the options and select items using the enter key, and then when you’re ready to save your selections, tab to the “Save and Exit” button and press enter again. It’s really that simple! After you’ve finished with your selections, move on to the next step:

# make
# make install
# make samples
# make config
# chkconfig asterisk on

Next, we need to verify that asterisk installed correctly. We do this by manually starting asterisk from the command line. If everything starts up and there’s not too many errors or warrnings, we’re good to go:

# asterisk -vvvvc
*CLI> core stop now

Next, we need to install some of the options from the Asterisk-Addons download. Asterisk-addons contains additional applications, channel drivers, and resource modules that are useful for asterisk but not necessary. We’re going to install the mysql cdr addons for asterisk.

# cd /usr/src/asterisk/asterisk-addons-1.6.2.0
# make clean
# ./configure
# make menuselect

At this point, be sure to select at least the following items:

  • Applications – app_addon_sql_mysql
  • Call Detail Recording – cdr_addon_mysql
  • Resource Modules – res_config_mysql

After you’ve got those selected, save and exit. Then proceed with the following steps:

# make
# make install
# make samples

Once we’ve got that done, we need to edit the cdr_mysql.conf file to enter the mysql username and password, database, and table we setup earlier. What’s listed below should be all we need in this file, if there’s anything else in there, either comment it out or delete it.

# vi /etc/asterisk/cdr_mysql.conf
[global]
hostname=localhost
dbname=asterisk
table=cdr
password=PASSWORD
user=asterisk
port=3306
sock=/var/lib/mysql/mysql.sock
userfield=1
loguniqueid=yes

And that’s it! You should read through several of the key configuration files in order to learn what’s changed, and also how to customize Asterisk for your installation. The files to look into would be:

/etc/asterisk/asterisk.conf
/etc/asterisk/extensions.ael
/etc/asterisk/extensions.conf
/etc/asterisk/sip.conf
/etc/asterisk/iax.conf
/etc/asterisk/voicemail.conf
/etc/asterisk/users.conf

If you have any questions or run into any trouble, please feel free to leave a comment and I’ll help out where I can.

78 Responses to “How to setup Asterisk 1.6.2 on Centos 5.4”

  1. great work, i followed the steps, everything works fine till i reach dahdi portion, when i run “make all” i get this error:
    make -C linux all
    make[1]: Entering directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1+2.2.1/linux’
    make -C drivers/dahdi/firmware firmware-loaders
    make[2]: Entering directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1+2.2.1/linux/drivers/dahdi/firmware’
    make[2]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1+2.2.1/linux/drivers/dahdi/firmware’
    You do not appear to have the sources for the 2.6.18-164.10.1.el5PAE kernel installed.
    make[1]: *** [modules] Error 1
    make[1]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1+2.2.1/linux’
    make: *** [all] Error 2

  2. Warren Selby says:

    You need to install your kernel headers. It appears you have a PAE enabled kernel, and thus you need to install the kernel-PAE-devel package I mentioned early in the post. You should verify your kernel by typing “uname -i” at the command line. If the resulting string has PAE at the end of it, you have a PAE enabled kernel. To install the headers for this kernel, use the following command:

    “yum install kernel-PAE-devel”

  3. Hi,
    Hope you are at good health. I just installed asterisk 1.6.2 on centos 5.4. Everything is working fine but when i try to configure voicemail.conf and then run the following command on astreisk console then it says

    localhost*CLI> voicemail show users for default
    Command ‘voicemail show users for default ‘ failed.
    [Mar 1 16:24:33] WARNING[2960]: res_config_mysql.c:431 realtime_multi_mysql: MySQL RealTime: Invalid database specified: ‘asterisk’ (check res_mysql.conf)

    Even i have database named asterisk on server xx.xx.xx.xx. with whom i want to connect it. Actually i want that when i call to asterisk either by softphone or landline and leave a message, the asterisk send a sms alert to user’s mobile number and also send an email to user email address. My users are in database that’s why i want it to connect to database but it throws above mentioned message.

    I also configured my cdr_mysql.conf as follows
    [global]
    hostname=xx.xxx.xx.xx
    dbname=asterisk
    table=cdr
    password= mypass
    user=myuser
    port=3306
    sock=/var/lib/mysql/mysql.sock
    loguniqueid=yes
    userfield=1

    and when i run command

    localhost*CLI> cdr mysql status
    Connected to asterisk@38.105.84.66, port 3306 using table cdr for 21 minutes, 24 seconds.
    Wrote 0 records since last restart.

    and when run

    localhost*CLI> cdr show status
    localhost*CLI>
    Call Detail Record (CDR) settings
    ———————————-
    Logging: Enabled
    Mode: Simple
    Log unanswered calls: No

    * Registered Backends
    ——————-
    cdr_sqlite3_custom
    mysql
    Adaptive ODBC
    cdr-custom
    csv
    And the same dbname and password i also used in res_mysql.conf then why it is saying no database exist.

    Any idea.

    Also i want to ask another thing can you please guide me if i want that when i leave message , an sms alert go to user’s mobile number and also email go to his email address, then how can i do it.

    Thank you.

  4. Sorry this is my res_mysql.conf

    [general]
    dbhost = xx.xxx.xx.xx
    dbname = asterisk
    dbuser = myuser
    dbpass = mypass
    dbport = 3306
    dbsock = /var/lib/mysql/mysql.sock
    requirements=warn ; or createclose or createchar

  5. One more question . Sorry it’s belong to asterisk 1.4.18.1. My asterisk isn’t playing messages. When i try it throws messages

    [Mar 2 16:57:01] NOTICE[5198]: res_odbc.c:530 odbc_obj_connect: Connecting voipodbc
    [Mar 2 16:57:01] NOTICE[5251]: app_voicemail.c:4838 open_mailbox: Resequencing Mailbox: /var/spool/asterisk/voicemail/brights/220/Old
    [Mar 2 16:57:17] NOTICE[5198]: res_odbc.c:544 odbc_obj_connect: res_odbc: Connected to voipodbc [Mysql-asterisk]
    [Mar 2 16:57:49] WARNING[5251]: file.c:644 ast_readaudio_callback: Failed to write frame
    == Spawn extension (office, *, 1) exited non-zero on ‘SIP/203-09da2080′

    Can you please tell me why it is happening.
    Thanks

  6. Hi,

    Kudos for the effort and sharing it with everyone. It is actually a lot easier to install using yum it will take care of all the dependencies by itself, you just need to add both Asterisk and Digium repositories…

    For the exact steps you can go here:

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

    Thanks,

    G

  7. Warren Selby says:

    Basit – I would need to see your extconfig.conf file as well to be able to help with the mysql realtime error you’re getting. As for your voicemail playback issue – I’m not sure. When you ran make menuselect, did you setup voicemail to use FILE_STORAGE or ODBC_STORAGE?

    If all you’re wanting is to be able to send an email or an sms alert when someone leaves a message, you can do that in the flat voicemail.conf file. You just have to setup each mailbox. This is how I usually do it.

    I am planning on making another post in the next week or so explaining setting up Asterisk Realtime, keep an eye out for it and maybe it will help with some of your issues.

    Gonzalo – Some people prefer installing using yum (or whatever their favorite package manager is), some people prefer building from source. I personally prefer building from source, I feel it gives you more control of what your actually doing when you install Asterisk. I guess it all comes down to personal preference.

  8. Hi,

    Great Post..!!! I have used your instructions which you mentioned in your post… Thanks for you and it really help for me…

    I have one doubt, i don’t have any interface but i have installed the dahdi to my virtual machine. Also, can you explain me, about the users voicemails storage places? because i don’t know clearly where it can be stored in the asterisk server.. Should we need to connect any interface to my system to test the voicemail?

    Please help me to configure this… Thanks in advance….

    Thanks,
    Suresh

  9. Hi

    I followed line by line your steps . All went well .
    I dont know what i did mistake . can you guide that is really helpful for me …

    FYI :

    [root@localhost ~]#
    [root@localhost ~]#
    [root@localhost ~]#
    [root@localhost ~]# ll /usr/src/kernels/
    total 20
    drwxr-xr-x 19 root root 4096 Mar 10 20:37 2.6.18-164.11.1.el5-i686
    drwxr-xr-x 19 root root 4096 Mar 10 21:55 2.6.18-164.11.1.el5-PAE-i686
    lrwxrwxrwx 1 root root 28 Mar 10 21:55 2.6.18-164.11.1.el5PAE-i686 -> 2.6.18-164.11.1.el5-PAE-i686
    [root@localhost ~]#
    [root@localhost ~]#
    [root@localhost ~]#
    [root@localhost ~]# cd /usr/src/asterisk
    [root@localhost asterisk]# ls
    asterisk-1.6.2.0 asterisk-addons-1.6.2.0 dahdi-linux-complete-2.2.1+2.2.1.tar.gz libpri-1.4-current.tar.gz
    asterisk-1.6.2.0.tar.gz asterisk-addons-1.6.2.0.tar.gz dahdi-linux-complete-current.tar.gz
    asterisk-1.6.2.5 asterisk-addons-1.6.2.0.tar.gz.1 libpri-1.4.10.2
    asterisk-1.6.2.5.tar.gz dahdi-linux-complete-2.2.1+2.2.1 libpri-1.4.10.2.tar.gz
    [root@localhost asterisk]# cd dahdi-linux-complete-2.2.1+2.2.1
    [root@localhost dahdi-linux-complete-2.2.1+2.2.1]#
    [root@localhost dahdi-linux-complete-2.2.1+2.2.1]#
    [root@localhost dahdi-linux-complete-2.2.1+2.2.1]#
    [root@localhost dahdi-linux-complete-2.2.1+2.2.1]#
    [root@localhost dahdi-linux-complete-2.2.1+2.2.1]#
    [root@localhost dahdi-linux-complete-2.2.1+2.2.1]#
    [root@localhost dahdi-linux-complete-2.2.1+2.2.1]#
    [root@localhost dahdi-linux-complete-2.2.1+2.2.1]# make all
    make -C linux all
    make[1]: Entering directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1+2.2.1/linux’
    make -C drivers/dahdi/firmware firmware-loaders
    make[2]: Entering directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1+2.2.1/linux/drivers/dahdi/firmware’
    make[2]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1+2.2.1/linux/drivers/dahdi/firmware’
    You do not appear to have the sources for the 2.6.18-53.el5 kernel installed.
    make[1]: *** [modules] Error 1
    make[1]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1+2.2.1/linux’
    make: *** [all] Error 2
    [root@localhost dahdi-linux-complete-2.2.1+2.2.1]#

    [root@localhost ~]#
    [root@localhost ~]# yum install kernel-PAE-devel
    Loading “installonlyn” plugin
    Setting up Install Process
    Setting up repositories
    Reading repository metadata in from local files
    Parsing package install arguments
    Resolving Dependencies
    –> Populating transaction set with selected packages. Please wait.
    —> Downloading header for kernel-PAE-devel to pack into transaction set.
    kernel-PAE-devel-2.6.18-1 100% |=========================| 1.0 MB 01:23
    —> Package kernel-PAE-devel.i686 0:2.6.18-164.10.1.el5 set to be installed
    –> Running transaction check

    Dependencies Resolved

    =============================================================================
    Package Arch Version Repository Size
    =============================================================================
    Installing:
    kernel-PAE-devel i686 2.6.18-164.10.1.el5 updates 5.3 M

    Transaction Summary
    =============================================================================
    Install 1 Package(s)
    Update 0 Package(s)
    Remove 0 Package(s)

    Total download size: 5.3 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/1): kernel-PAE-devel-2 100% |=========================| 5.3 MB 04:29
    Running Transaction Test
    Finished Transaction Test

    Transaction Check Error:
    package kernel-PAE-devel-2.6.18-164.11.1.el5 (which is newer than kernel-PAE-devel-2.6.18-164.10.1.el5) is already installed

    Error Summary
    ————-

  10. Warren Selby says:

    Suresh – Well, when you did “make menuconfig”, there’s an option on the left named “Voicemail Build Options”. You can either chose FILE_STORAGE or ODBC_STORAGE. If this is your first asterisk build, I would recommend using FILE_STORAGE, which places the voicemails as flat files into your %ASTSPOOLDIR%/voicemail/ directory. Under this directory, there’s a subdirectory for each voicemail context (i.e the default voicemail context would be ./default/) and then in each context directory there are mailbox directories. The mailbox and voicemail contexts are defined in the /etc/asterisk/voicemail.conf file. On my system, the path to my personal voicemail directory looks like this:

    /var/spool/asterisk/voicemail/selbytech/7300

    If you want to check your voicemail, in extensions.conf, define an extension that makes a call to VoicemailMain(). This will ask you to enter your mailbox number and password, and then it will allow you to listen to your voicemails.

    Kartook – what is the output of “uname -r” on your system? Have you tried installing just the regular kernel headers? “yum install kernel-devel”?

  11. Selby – Thanks for your reply. I have configured the asterisk which you mentioned in the above steps. I am a new one for this asterisk server configuration… so, that’s why i have some doubts regarding this. How can i create the PBX server using VOIP Address and how can i make the calls for the two persons communication in softphones?

    I have installed the softphone to my local environment successfully but, when im doing the call for one person and it says, “Call Failed: 408 Timeout” so, i don’t know which part i did the mistake in the softphones installation. can you please help me to work on this? because the configuration of asterisk server took 2 weeks.

  12. Hi i did installation is perfect with out any issue .

    Thanks a lot and love you so much

    Can you make on nice guide for how to install asterisk-GUI 2.0 ?

    Thanks
    kartook

  13. I am brand new to Linux I tried this several times before I could make this work.
    I tried to install VIA YUM but there was a a conflict between
    1.4 and 1.6 core. This appears to be a known issue. I found
    several refrences on the web to this problem. I also had the same problem when I tried to down load the package via your wget http://downloads.asterisk.org/... commands so instead I went to the Asterisk download page and downloaded the tar ball. Then used your instructions as a guide.

    When I tried to install with CDR I kept getting a segementation fault.
    I then installed without CDR and it worked flawlessly.
    I am sure a real Linux guy could work it out .But not me (not yet) .
    Curious that Kartook had no problem and I had to do it
    at least 4 times. Less than a week apart.
    THANK YOU though if I with 0 expeirience on Linux can do it.
    anybody can.
    A testament to your teaching skills
    Now I will go back and try to install CDR.

  14. NICE POST MAN!! nice piece of work…THANKYOU SO MUCH !
    ALL DONE AND WORKING WELL:)

  15. Asad Fnd says:

    Hello brother, h r u ?
    brother can u plz help me out with HOW TO INSTALL “freepbx” on asterisk 1.6 already installed on centOS 5.4, just like u did. It would be very helpfull and i will very thankfull to u as i dun get ne possitive solutions for this on web…

  16. Daud Mohamed says:

    Can any one help how to configure Asterisk Pbx and Live Radio

  17. mattias says:

    1.

    I successfully configured asterisk server everything is working good except DAHDI.
    I downloaded
    dahdi-linux-complete-2.2.1.1+2.2.1.1
    Asterisk 1.6
    my kernel is 2.6.18-164.el5
    when i execute the make all command i get the following error would you please tell me where i get wrong. i would appreciate any help.

    make all
    make -C linux all
    make[1]: Entering directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1.1+2.2.1.1/linux’
    make -C drivers/dahdi/firmware firmware-loaders
    make[2]: Entering directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1.1+2.2.1.1/linux/drivers/dahdi/firmware’
    make[2]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1.1+2.2.1.1/linux/drivers/dahdi/firmware’
    You do not appear to have the sources for the 2.6.18-164.el5 kernel installed.
    make[1]: *** [modules] Error 1
    make[1]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.2.1.1+2.2.1.1/linux’
    make: *** [all] Error 2

  18. mattias says:

    Type your comment here

    Asad Fnd :

    Hello brother, h r u ?
    brother can u plz help me out with HOW TO INSTALL “freepbx” on asterisk 1.6 already installed on centOS 5.4, just like u did. It would be very helpfull and i will very thankfull to u as i dun get ne possitive solutions for this on web…

    what exactly is your problem

  19. Warren Selby says:

    mattias – It looks like you need to install your kernel-devel package. Try “yum install kernel-devel” from the command prompt and see if it installs anything, then try the “make” command again for dahdi.

    Asad – I don’t normally use FreePBX, but you’re not the first person that’s asked me to write a guide on how to set it up, so I’ll take a look at writing out a nice guide for it here soon.

    kartook – same thing, I’ll see about writing out a guide for the asterisk-gui.

    Kevin – glad I could help you out!

    Sorry folks for the lack of posts from me recently, life has been hectic and it’s hard to find the time to sit and write out new posts. I’ll try to make a better effort at it here soon enough. :)

  20. mattias says:

    Thanks warren selby for your fast reply

    The yum install kernel-devel returns kernel-devel-2.6.18-164.15.1.el5.x86_64 already installed and latest version
    The make command returns the previous error.
    would you please tell me where the problem is ?

  21. mattias says:

    You know what ?

    I just changed dahdi-linux-complete-2.2.1.1+2.2.1.1 to dahdi-linux-complete-2.2.0.2+2.2.0 and it works fine

  22. Okey Thanks man.. I got it .. its up and running now…;)

  23. now do u have any idea of How to do SIP trunking between asterisk and cisco?

  24. Asad Fnd says:

    Or asterisk and Siemens..?

    and how can i “SayNumber() in my language i.e. “URDU”
    I found a script a patch file .. a guy has done that also the sound files also …

  25. ledpepper says:

    Hi Warren,

    Do you have any experience with making Asterisk a PSTN Gateway? Or more specifically a PSTN gateway for sipXecs?

  26. i can’t install asterisk 1.6 on centos5.4. please, help me! i am a student,i am studying asterisk .thank very much

  27. hồ :

    tôi không thể cài đặt dấu sao 1,6 ngày centos5.4. xin vui lòng, giúp tôi! i am một sinh viên, tôi đang học dấu. cảm ơn rất nhiều

    Type your comment here

  28. Sila MAY says:

    It is very nice explanation and discussion. Let me try following your step!!!

    Thanks!

  29. the tutorial misisng lot of clear instruction , was full of errors
    unable to install correctly

  30. Warren Selby says:

    ledpepper – What do you mean, making it a PSTN gateway?

    lake – Please provide examples of the errors you are receiving, and I’ll do what I can to help.

    Sila MAY – Glad I could help!

    salmo – It seems pretty clear to me, what kind of errors are you getting and where do you think the tutorial could use some more instruction?

  31. Eduardo C. says:

    Great walk through! works well thanks~

    -e.

  32. “You do not appear to have the sources for the 2.6.18-164.el5 kernel installed.”

    You likely just performed a yum update that included kernel changes; try restarting your machine before installing dahdi.

  33. dunghoang says:

    Hi Warren Selby !
    I try dahdi-linux-complete-2.2.1.1+2.2.1.1, dahdi-linux-complete-2.2.0.2+2.2.0 and many other version, and “yum install kernel-PAE-devel” complete .But when i typing
    dahdi-linux-complete-2.2.1.1+2.2.1.1># make all
    -> 100%[======================================>] 147,425 95.2K/s in 1.5s

    2010-08-04 21:45:06 (95.2 KB/s) – `dahdi-fwload-vpmadt032-1.17.0.tar.gz’ saved [147425/147425]

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

    Please, help meeeeeee
    Thank you very much

  34. Warren Selby says:

    You need to install the kernel headers for your kernel. Just try “yum install kernel-devel”.

  35. dunghoang says:

    hi, i use command:

    [root@asteris_test kernels]# rpm -qa | grep kernel
    kernel-2.6.18-194.8.1.el5
    kernel-headers-2.6.18-194.8.1.el5
    kernel-devel-2.6.18-194.8.1.el5
    kernel-2.6.18-194.el5

    But, make all -> same erorr

  36. Warren Selby says:

    What does the output of “uname -r” look like?

  37. dunghoang says:

    uname -r:
    [root@asteris_test kernels]# uname -r
    2.6.18-194.8.1.el5

  38. dunghoang says:

    i install on centos 5.5

  39. Warren Selby says:

    And the output of “ls -lh /usr/src/kernels”?

  40. dunghoang says:

    [root@asteris_test kernels]# ls -lh /usr/src/kernels
    total 608K
    -rw-r–r– 1 root root 602K Aug 5 09:32 glibc-headers-2.5-49.el5_5.4.i386.rpm

  41. dunghoang says:

    ohhh! it has not kernel, but

    [root@asteris_test kernels]# rpm -qa | grep kernel
    kernel-2.6.18-194.8.1.el5
    kernel-headers-2.6.18-194.8.1.el5
    kernel-devel-2.6.18-194.8.1.el5
    kernel-2.6.18-194.el5

    -> help me

  42. Warren Selby says:

    It doesn’t appear that your actually getting your kernel headers installed into the correct location. They need to be installed in /usr/src/kernels/. If you use “yum install kernel kernel-devel” it should install them in the proper location.

    If you use rpm packages that you’re manually downloading and placing on the server, I’m not sure of the exact procedure, but I think you have to place those (the .rpm files) in the /usr/src/kernels/ directory, and then run “rpm -ivh kernel*.rpm” to install them properly.

    What’s the output of “yum install kernel kernel-devel” and also the output of “ls -lh /lib/modules/”?

  43. dunghoang says:

    [root@asteris_test kernels]# yum install kernel kernel-devel
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * addons: virror.hanoilug.org
    * base: virror.hanoilug.org
    * extras: virror.hanoilug.org
    * updates: centos.maulvi.net
    Setting up Install Process
    Package kernel-2.6.18-194.8.1.el5.i686 already installed and latest version
    Package kernel-devel-2.6.18-194.8.1.el5.i686 already installed and latest version
    Nothing to do
    [root@asteris_test kernels]# s -lh /lib/modules/
    -bash: s: command not found
    [root@asteris_test kernels]# ls -lh /lib/modules/
    total 12K
    drwxr-xr-x 6 root root 4.0K Aug 5 09:46 2.6.18-194.8.1.el5
    drwxr-xr-x 6 root root 4.0K Aug 4 18:19 2.6.18-194.el5
    [root@asteris_test kernels]#

  44. Warren Selby says:

    What is the output of “ls -lh /lib/modules/2.6.18-194.8.1.el5/” ?

    Have you rebooted your box since you installed the latest kernel?

  45. dunghoang says:

    [root@asteris_test kernels]# ls -lh /lib/modules/2.6.18-194.8.1.el5
    total 1.3M
    lrwxrwxrwx 1 root root 48 Aug 5 09:46 build -> ../../../usr/src/kernels/2.6.1 8-194.8.1.el5-i686
    drwxr-xr-x 2 root root 4.0K Jul 2 06:37 extra
    drwxr-xr-x 9 root root 4.0K Aug 5 09:46 kernel
    -rw-r–r– 1 root root 284K Aug 5 09:46 modules.alias
    -rw-r–r– 1 root root 69 Aug 5 09:46 modules.ccwmap
    -rw-r–r– 1 root root 230K Aug 5 09:46 modules.dep
    -rw-r–r– 1 root root 147 Aug 5 09:46 modules.ieee1394map
    -rw-r–r– 1 root root 375 Aug 5 09:46 modules.inputmap
    -rw-r–r– 1 root root 2.3K Aug 5 09:46 modules.isapnpmap
    -rw-r–r– 1 root root 74 Aug 5 09:46 modules.ofmap
    -rw-r–r– 1 root root 216K Aug 5 09:46 modules.pcimap
    -rw-r–r– 1 root root 589 Aug 5 09:46 modules.seriomap
    -rw-r–r– 1 root root 139K Aug 5 09:46 modules.symbols
    -rw-r–r– 1 root root 385K Aug 5 09:46 modules.usbmap
    lrwxrwxrwx 1 root root 5 Aug 5 09:46 source -> build
    drwxr-xr-x 2 root root 4.0K Jul 2 06:37 updates
    drwxr-xr-x 2 root root 4.0K Jul 2 06:37 weak-updates

    i has rebooted

  46. Warren Selby says:

    Try removing and then reinstalling your kernel headers:

    yum uninstall kernel-devel
    yum install kernel-devel

    and let’s see if that populates the /usr/src/kernels/ directory.

  47. dunghoang says:

    [root@asteris_test kernels]# ls -lh /usr/src/kernels
    total 612K
    drwxr-xr-x 19 root root 4.0K Aug 5 11:39 2.6.18-194.8.1.el5-i686
    -rw-r–r– 1 root root 602K Aug 5 09:32 glibc-headers-2.5-49.el5_5.4.i386.rpm

    But, same erorr

  48. Warren Selby says:

    I would download the latest DAHDI 2.3.0.1+2.3.0 package and try installing that. If that doesn’t work, maybe file a bug on the http://issues.asterisk.org bug tracker?

  49. dunghoang says:

    what’s use comman , install kernel-2.6.18-128.el5-i686 input /usr/src/kernels. When, i use command: yum install kernel-devel -> download and kernel-2.6.18-194.8.1.el5-i686
    I want try kernel-2.6.18-128.el5-i686!

  50. dunghoang says:

    I want to install kernel-2.6.18-128.el5-i686 replace kernel-2.6.18-194.8.1.el5-i686 , and install /usr/src/kernels . What’s command?

Trackbacks/Pingbacks

  1. unimrcp, asterisk & nuance on Centos 5.4 64bit – Installation Guide Pt1 « David Thomas - [...] basically followed the guide from here for installing asterisk. As a quick revision here are the [...]
  2. Building Asterisk + CentOS 5.4 « Papa Delta Sierra - [...] reference here [...]
  3. FreePBX CDR not updating « Papa Delta Sierra - [...] this resulted in the call data record in the report to not update.. I used this guide to rebuild ...
  4. How to setup Asterisk 1.8 on CentOS 5 | SelbyTech - [...] time to kick things off! I get a lot of traffic on my older post about setting up Asterisk ...
  5. How to setup Asterisk 1.8 on CentOS 5 | SelbyTech | Asterisk - [...] Comments Tweet So, time to kick things off! I get ...

Leave a Reply