Here are my notes I compiled while installing Asterisk on a Debian Stable System.

By Tony Wasson
pkoegel@azxws.com
Last Update: July 15, 2005

1) Get your machine ready to compile software

#apt-get update && apt-get upgrade
#apt-get install bison cvs openssl libssl-dev libasound2-dev libc6-dev
Setup UNIXodbc, if you want Call Detail Record Logging (the -dev packages allow you to compile against a package)
#apt-get install unixodbc-dev
2) Set up the kernel source, make *sure* you have a 2.4 kernel.

I used a 2.4.19 kernel, you can do your own thing here.

cd /usr/src/
bunzip2 kernel-source-2.4.19.tar.bz
tar xvf kernel-source-2.4.19.tar
cd linux-2.4.19
make menuconfig
make dep (I seemed to need this, may not?)
cd /usr/src
ln -s linux-2.4.19 linux
ln -s linux-2.4.19 linux-2.4  (Saw a reference to this in the zaptel compile, still needed)
3) Install Digium Drivers or Clock Source

If you want conferencing, you REALLY should have a Digium card, ztdummy or use zaprtc.
I have used a TE410P in my first server, and zaprtc all others.
See http://www.voip-info.org/wiki-Asterisk+timer

#cd /usr/src
#export CVSROOT:=:pserver:anoncvs@cvs.digium.com:/usr/cvsroot
#cvs login  (the password is anoncvs)

(For Digium Card and T1 support)
#cvs checkout zaptel libpri 
(this makes directories right in /usr/src)

(Always build drivers before asterisk)
cd zaptel
make clean; make install

cd ../libpri
make clean; make install
4) Compile Asterisk
(For stable asterisk)
#cvs checkout -r v1-0_stable asterisk

(For extra sounds)

(Now the good stuff, check for missing libraries)
cd ../asterisk
make clean; make install
Keep an eye on missing files. Assuming all goes well, asterisk will be installed.

5) Configure Hardware and Start Asterisk

You'll also need to edit /etc/zaptel.conf to configure your Digium hardware.

Try modprobing your hardware. Add any hardware to /etc/modules.conf (I added wct4xxp).
NOTE: I had to do "hdparm -u 1 /dev/hda" to keep my te410P interrupt errors from filling the screen.

If this is your first installation, go ahead and do a "make samples". This will give you the default config files.

Now you are ready for your big test -- starting Asterisk for the first time. Type this as root....

#asterisk -vvvcf
6) Setup Festival

I compiled this by hand. If there's an easier way I'm all ears. If someone has a deb premade, let me know. If I ever get a few hours, I'll make one.

I used the steps at http://www.voip-info.org/tiki-index.php?page=Asterisk%20festival%20installation

#wget http://festvox.org/packed/festival/1.4.3/festival-1.4.3-release.tar.gz
#wget http://festvox.org/packed/festival/1.4.3/festlex_CMU.tar.gz
#wget http://festvox.org/packed/festival/1.4.3/festlex_POSLEX.tar.gz
#wget http://festvox.org/packed/festival/1.4.3/festvox_kallpc16k.tar.gz
#wget http://festvox.org/packed/festival/1.4.3/speech_tools-1.2.3-release.tar.gz
#cd /usr/src ; assumes the downloaded files are located here
#tar xvzf speech_tools-1.2.3-release.tar.gz
#cd speech_tools
#./configure
#make
#cd ..
#tar xvzf festival-1.4.3-release.tar.gz
#tar xvzf festlex_CMU.tar.gz
#tar xvzf festlex_POSLEX.tar.gz
#tar xvzf festvox_kallpc16k.tar.gz
#mv festival festival-1.4.3
#patch -p0 

7) Setup mpg123

I used the Redhat package mentioned at http://www.voip-info.org/tiki-index.php?page=Asterisk+mpg123+redhat

#apt-get install rpm
#mkdir /var/lib/rpm
#wget http://www.mpg123.de/mpg123/precompiled/mpg123-0.59q-1.i386.rpm
#rpm -i -nodeps mpg123-0.59q-1.i386.rpm 
8) Install extra asterisk goodies.

I use these packages, you may find them useful too.

#cvs checkout  asterisk-sounds
#cvs checkout asterisk-addons
9) Configure Asterisk to Taste

This is not a 1 day project. Learning about contexts is important. I've read the Asterisk Handbook about 5 times and I still learn something new everytime.

10) Setup Asterisk for auto restart.

I am starting asterisk by doing this in /etc/inittab

ax:2345:respawn:/usr/sbin/asterisk -vvvcf