apt-get update
apt-get install -y build-essential flex bison libreadline-dev libssl-dev gettext libtiff-dev uuid-dev libjansson-dev libxml2-dev libsqlite3-dev doxygen libncurses-dev libtool automake autoconf linux-headers-4.9.0-4-amd64 linux-headers-4.9.0-4-common linux-kbuild-4.9 wget vim
Sangoma driver needs this, is Debian a supported OS?
cd /usr/src
ln -s linux-headers-4.9.0-4-common linux
cd /usr/src/linux
ln -s /usr/src/linux-headers-4.9.0-4-amd64/.config .
ln -s /usr/src/linux-headers-4.9.0-4-amd64/.kernelvariables .
ln -s /usr/src/linux-headers-4.9.0-4-amd64/Module.symvers .
ln -s /usr/src/linux-headers-4.9.0-4-amd64/include/config include/.
ln -s /usr/src/linux-headers-4.9.0-4-amd64/include/generated include/.
ln -s /usr/src/linux-headers-4.9.0-4-amd64/arch/x86/kernel arch/x86/.
ln -s /usr/src/linux-headers-4.9.0-4-amd64/arch/x86/include/generated arch/x86/include/.
wget -c http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.11.1+2.11.1.tar.gz
... or alternatively ...
wget -c http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
tar -xf dahdi-linux-complete-2.11.1+2.11.1.tar.gz -C /usr/src
cd /usr/src/dahdi-linux-complete-2.11.1+2.11.1
make -j4
make install
wget -c http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.6.0.tar.gz
... or alternatively ...
wget -c http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz
tar -xf libpri-1.6.0.tar.gz -C /usr/src
cd /usr/src/libpri-1.6.0
make -j4
make install
wget -c http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13.18.2.tar.gz
... or alternatively ...
wget -c http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
tar -xf asterisk-13.18.2.tar.gz -C /usr/src
cd /usr/src/asterisk-13.18.2
./configure
# optional: make menuselect
make -j4
make install
make config
wget -c ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-7.0.24.tgz
tar -xf wanpipe-7.0.24.tgz -C /usr/src
cd /usr/src/wanpipe-7.0.24
vim util/wancfg_zaptel/wancfg_dahdi
Update at the end from
./wancfg_zaptel.pl --dahdi --conf_dir=$WAN_BASE $ARGS
to
/usr/bin/perl -I ${WAN_HOME}/wancfg_zaptel ./wancfg_zaptel.pl --dahdi --conf_dir=$WAN_BASE $ARGS
./Setup install
Tips:
- Specify /usr/src/linux as your kernel source folder ...
- Don't worry about the kernel version mismatch ...
- Visually verify the compilation ...
- If kernel module does not load check output of dmesg ...
wancfg_dahdi
... follow steps on the screen, make sure asterisk restarted at the end ...
asterisk -r
pri show spans
dahdi show channels
Tab completion works in the asterisk cli shell ...
I could have never find out how to do the "combined Linux kernel header folder" part! How did you come up with that anyway?
Thank you. I spent 2 days on it with no progress until I saw this.
I have another problem now. WANPIPE LibSangoma API and generally
Wanpipe Utilities
fail to compile complaining about:BTW, I am seeing a warning before that:
Any idea?
UPDATE
Running
make dep
in /usr/src/linux gives: