This type of installation I rather prefer, because I can add drivers I want and change default music classes. You should download Asterisk, dahdi and libpri from next link: Asterisk, libpri and DAHDi After this you should make directory for asterisk.

[root@asterisk1]# mkdir -p /usr/src/asterisk
[root@asterisk1]# cd /usr/src/asterisk/

Unpack downloaded files:

[root@asterisk1 asterisk]# tar -zxf asterisk-1.6.1-current.tar.gz
[root@asterisk1 asterisk]# tar -zxf asterisk-addons-1.6.1-current.tar.gz
[root@asterisk1 asterisk]# tar -zxf libpri-1.4-current.tar.gz
[root@asterisk1 asterisk]# tar -zxf libpri-1.4-current.tar.gz
[root@asterisk1 asterisk]# tar -zxf dahdi-linux-complete-current.tar.gz

Configure LIBPRI (if you are using E1 cards)

[root@asterisk1 asterisk]# cd libpri-1.4.10.2/
[root@asterisk1 libpri-1.4.10.2]# make clean
[root@asterisk1 libpri-1.4.10.2]# make
[root@asterisk1 libpri-1.4.10.2]# make install

Configure dahdi (this is necessary tool)

[root@asterisk1 libpri-1.4.10.2]# cd ../dahdi-linux-complete-2.2.0.2+2.2.0/
[root@asterisk1 dahdi-linux-complete-2.2.0.2+2.2.0]# make all
[root@asterisk1 dahdi-linux-complete-2.2.0.2+2.2.0]# make install
[root@asterisk1 dahdi-linux-complete-2.2.0.2+2.2.0]# make config

You need to start dadhi service before you configure asterisk

[root@asterisk1 asterisk-1.6.1.11]# /etc/init.d/dahdi start

Turn on service on boot server.

[root@asterisk1 asterisk-1.6.1.11]# chkconfig dahdi on

Install and configure asterisk for first time

[root@asterisk1 dahdi-linux-complete-2.2.0.2+2.2.0]# cd ../asterisk-1.6.1.11/
[root@asterisk1 asterisk-1.6.1.11]# make clean
[root@asterisk1 asterisk-1.6.1.11]# ./configure
[root@asterisk1 asterisk-1.6.1.11]# make menuselect
[root@asterisk1 asterisk-1.6.1.11]# make
[root@asterisk1asterisk-1.6.1.11]# make install

You will got next window, when you finished click save and exit button. Don't enable ilbc in codec part.

Modules

You will probably need some samples and docs

[root@asterisk1 asterisk-1.6.1.11]# make samples
[root@asterisk1 asterisk-1.6.1.11]# make progdocs
[root@asterisk1 asterisk-1.6.1.11]# make config
[root@asterisk1 asterisk-1.6.1.11]# chkconfig asterisk on
[root@asterisk1 asterisk-1.6.1.11]# asterisk -vvvvvvvvvvvvvvvvc
[root@asterisk1 asterisk-1.6.1.11]# service asterisk start

Now we need to install some addons

[root@asterisk1 asterisk-1.6.1.11]# cd ../asterisk-addons-1.6.1.2/
[root@asterisk1 asterisk-addons-1.6.1.2]# make clean
[root@asterisk1 asterisk-addons-1.6.1.2]# ./configure
[root@asterisk1 asterisk-addons-1.6.1.2]# make menuselect
[root@asterisk1 asterisk-addons-1.6.1.2]# make
[root@asterisk1 asterisk-addons-1.6.1.2]# make install
[root@asterisk1 asterisk-addons-1.6.1.2]# make samples

That's it :) Now you can start with setup Dahdi and dial plan.