I took notes on what I did so I could do it later. Maybe someone else might find them useful. They might not be the most ideal - I'm not an expert but please feel free to comment and I'll update this message.
0. Edit the /etc/apt/sources.list file to remove the # signs before the lines that begin with # deb http to activate them and then do apt-get update.
1. Install Packages:
apt-get install sendmail zlib1g-dev libssl-dev ncurses-dev libnewt-dev gcc-3.4 subversion openssh-server build-essential linux-source-2.6.12 (or whatever kernel you have)
2. Prepare Linux kernel source
cd /usr/src
tar xvjf linux-source* (Extracts the files from the zip file)
rm linux-source-2.6.12.tar.bz2 (Don't need the zip anymore)
ln -s linux-source-2.6.12 linux (makes /usr/src/linux point to /usr/src/linux-source-2.6.12)
cd linux
cp /boot/config-2.6.whatever .config (copies the config file that was used to compile your kernel into the /usr/src/linux dir)
make menuconfig then exit and save config
uname -r (examine what comes after 2.6.12 For example, I had 2.6.12-9-386)
vi /usr/src/linux/Makefile
Go to the EXTRAVERSION line and make it like so:
EXTRAVERSION=-9-386
make modules_prepare
ln -s /usr/src/linux /lib/modules/`uname -r`/build
3. Get Asterisk Packages
cd /usr/src
svn checkout http://svn.digium.com/svn/asterisk/branches/1.2 asterisk-1.2
svn checkout http://svn.digium.com/svn/zaptel/branches/1.2 zaptel-1.2
svn checkout http://svn.digium.com/svn/libpri/branches/1.2 libpri-1.2
svn checkout http://svn.digium.com/svn/asterisk-sounds/branches/1.0 asterisk-sounds-1.0
4. Compile Stuff
-=libpri=-
cd /usr/src/libpri-1.2
make clean
make
make install
-=Zaptel Modules=- (If you're going to use zaptel hardware to connect to PSTN)
cd /usr/src/zaptel-1.2
Change anything in /usr/src/zaptel/zconfig.h if you need to (I didn't need to)
make clean
make linux26
make zttool
make install
-=Asterisk=-
cd /usr/src/asterisk-1.2
make clean
make mpg123
note: This doesn't work for me as of 2-20-07. I had to go into the mpg123 directory myself and type:
make CC=gcc LDFLAGS= OBJECTS='decode_i386.o dct64_i386.o decode_i586.o audio_oss.o term.o' CFLAGS='-DI386_ASSEM -DPENTIUM_OPT -DREAL_IS_FLOAT -DLINUX -DREAD_MMAP -DOSS -DTERM_CONTROL -Wall -O2 -m486 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math' mpg123-make
make
make install
make samples (if you want sample config files put into /etc/asterisk)
-=Asterisk-Sounds=-
cd /usr/src/asterisk-sounds-1.0
make install
5. Edit udev
vi /etc/udev/udev.rules
Stick the paragraph below somewhere
# Section for zaptel device
KERNEL="zapctl", NAME="zap/ctl"
KERNEL="zaptimer", NAME="zap/timer"
KERNEL="zapchannel", NAME="zap/channel"
KERNEL="zappseudo", NAME="zap/pseudo"
KERNEL="zap[0-9]*", NAME="zap/%n"
6. That's the installation part. Go ahead and reboot. Then, if you have some zaptel piece of hardware installed, try lsmod | grep zap and see if the two modules are already installed.
7. Configure it!
================edit: removed extra steps to manually compile mpg123 that weren't necessary.
- Excelent source of asterisk info: The Free Asterisk O'Reilly Book
- A good forum for questions: http://forums.digium.com/
edit2: removed tar extraction step since svn brings the files over untarred. (duh)
edit3: Added some explanation notes.
edit4: Added mpg123 compile note 2-20-07
Bookmarks