Record of some of the computer tech I deal with so that it's documented at least somewhere.

Tuesday, 21 August 2007

Asterisk get in

The first thing you have to learn about asterisk is how to spell it!

then zaptel and ktdummy is needed, you need to install zaptel from source to force ktdummy to be built

and for that you need the linux sources
after an annoyingly frustrating time I found out that it's not apt-get install linux-source-2.6

then I found apt-get install zaptel-source

then I found apt-get doesn't install the source, it just plops a tar.bz2 in /usr/src

;cd /usr/src;
;tar -jxvf linux-source-2.6.18.tar.bz2
;tar -zxvf zaptel.tar.bz2
;mv linux-source-2.6.18 linux
;cd ../modules/zaptel
;make
failed - go to /usr/src/linux and run 'make oldconfig && make prepare'
;cd ../../linux
;make oldconfig && make prepare
;cd ../modules/zaptel
;make
failed genksysms missing
;cd /usr/src/linux && make scripts ## haha lucky guess

;cd /usr/src/modules/zaptel
; make
; make install
; make install-udev

# insmod /lib/modules/zaptel.ko
insmod: error inserting 'zaptel.ko': -1 Unknown symbol in module

I guess this should have been given credence
WARNING: Symbol version dump /usr/src/linux/Module.symvers
is missing; modules will have no dependencies and modversions.

# /usr/src/linux
# cp /boot/config-2.6.18-4-686 .config # nice find :)
# make

.... doesn't take long ! .....

I got bored of that and scrolled down the instructions http://wiki.advocacydev.org/cgi-bin/wiki.pl?AsteriskInstallation

this didnt work
# make clean
# make mrproper
# cp /boot/config-2.6.18-4-686 .config
# make prepare-all

next attempt
# apt-get install linux-headers-2.6.18-4-686
# cd /usr/src
# ln -s linux-headers-2.6.18-4 linux
# tar -jxvf zaptel.tar.bz2 && mv modules linux
# cd linux
# cp /boot/config-2.6.18-4-686 .config
# make-kpkg debian
# make-kpkg modules_image
exec debian/rules DEBIAN_REVISION=..-10.00.Custom modules_image
/bin/sh: line 0: [: -gt: unary operator expected
/bin/sh: line 0: [: -ge: unary operator expected
/bin/sh: line 0: [: -gt: unary operator expected
/bin/sh: line 0: [: -ge: unary operator expected
/bin/sh: line 0: [: -ge: unary operator expected
echo "The UTS Release version in include/linux/version.h"; echo " \"\" "; echo "does not match current version:"; echo " \"..\" "; echo "Please correct this."; exit 2
The UTS Release version in include/linux/version.h
""
does not match current version:
".."
Please correct this.
make: *** [modules_image] Error 2

but ooh look linux-headers-2.6.18-4-686/Module.symvers

# ln -s linux-source-2.6.18 linux
# cd linux
# ln -s ../linux-headers-2.6.18-4-686/Module.symvers .
# cd modules/zaptel
# make
# make install
# make install-udev
# reboot

Zapata Telephony Interface Registered on major 196
Zaptel Version: 1.2.11 Echo Canceller: MG2
wcfxo: DAA mode is 'FCC'
Found a Wildcard FXO: Wildcard X100P

YO I got me a PBX

except I was getting Alarm RED for the fxo card - turned out to mean "no phone line".
The rj11/bt cable I got didn't flip the cables around, I've made a cable out of some bits that swaps red with black and green with yellow
http://yoda.uvi.edu/InfoTech/rj45.htm

Asterisk sees incoming calls now, woohoo

change ownership of /var/log/asterisk
and
chown -R asterisk:asterisk /dev/zap/pseudo

see if reboot helps

No comments: