[Asterisk-Users] HFC-S BRI Slack9.1 kernel 2.6.6 "Guide" bri-stuff.0.0.2
Petter Ween
petterween at hotmail.com
Thu May 27 19:36:08 MST 2004
Hi ""noobs"" and others(like me).
I've been struggling for hours,days,days,days.... to get my Asterisk work
with 2x HFC-S BRI cards.
One card for use in NT-mode for connecting my ISDN DECT phone,and one card
as gateway to PSTN.
Now it'works,and I just want to share some of the experience with others.
I'd guess there must be 'Somebody Out There' having some difficulty with
this just like me.
Anyway, these are my notes:
----------------------------------------------------------------
Running Slackware 9.1 installed from ISO
Compiled new kernel 2.6.6
(compile kernel with module unloading as well as loading)
----------------------------------------------------------------
Make sure you have the symlinks in /usr/src :
linux -> linux-2.6.6
linux-2.6 -> linux-2.6.6 //to get compile script work with kernel 2.6.x
To make symbolic link linux-2.6 -> linux-2.6.6:
cd /usr/src
ln -s linux-2.6.6 linux-2.6
----------------------------------------------------------------
Get bri-stuff.0.0.2 (stable)
After unpacking the bri-stuff.0.0.2, edit the download.sh file concerning
CVS download to:
cvs -z9 co -r v1-0_stable asterisk
cvs -z9 co -D "2004/05/05" zaptel
cvs -z9 co -D "2004/04/17" libpri
These versions of zaptel,libpri will work with the 2.6.x kernel, ref. "Arne"
at Wiki.
Edit compile.sh file and uncomment the next line to install sample asterisk
configuration files
#make samples
----------------------------------------------------------------
Edit some file references in some header files:
(Eleminating compile errors)
/usr/src/linux/include/asm/irq.h
In line 16 change: #include "irq-vectors.h" to: #include
"mach-default/irq-vectors.h"
/usr/src/linux/include/asm/mpspec.h
In line 6 change: <mach_mpspec.h> to: <asm/mach-default/mach_mpspec.h>
/usr/src/linux/include/asm/smp.h
In line 71 change: <mach_apicdef.h> to: <asm/mach-default/mach_apicdef.h>
I've googled around and it looks like this is a quite common problem
introduced with kernel 2.6 due to some of the !noobs disagreeing about how
the source tree should be organized.
Different suggestions were came up like symlinks or just "dirty" edit the
header files.
I guess there are some other ways to do this, but not at my knowledge
disposal at that point.
-----------------------------------------------------------------
run: ./install.sh
which just runs download.sh and compile.sh.
-----------------------------------------------------------------
copy /usr/src/bri-stuff.0.0.2/zaphfc/zapata.conf to /etc/asterisk/
-----------------------------------------------------------------
Edit /usr/src/bri-stuff.0.0.2/zaphfc/zaptel.conf:
span=1,1,3,ccs,ami
bchan=1-2
dchan=3
span=2,1,3,ccs,ami
bchan=4-5
dchan=6
---------------
Edit /etc/asterisk/zapata.conf:
signalling = bri_net_ptmp //p2mp NT mode port1/(card1)
group = 1
context=default
channel => 1-2
signalling = bri_cpe_ptmp //p2mp TE mode port2/(card2)
group = 2
context=default
channel => 4-5
-----------------------------------------------------------------
Edit /usr/src/bri-stuff.0.0.2/zaphfc/Makefile
part of Makefile:
loadNT: all
modprobe zaptel
insmod ./zaphfc.ko modes=1
ztcfg -v -c ./zaptel.conf
----------
Changed lines: zaphfc.o to .ko
modes=1
----------
modes=1 makes BRI-port1/card1 operate in NT-mode and second port/card in
TE-mode
(modes=3 would have put both ports in NT-mode)
binary: 1 = Port in NT-mode 0 = Port in TE-mode
Port 1 = lsb
----------
Loading the drivers (zaphfc):
make loadNT
Note:
this makes ztcfg use the zaptel.conf file in directory
/usr/src/bri-stuff.0.0.2/zaphfc/
-----------------------------------------------------------------
Start Asterisk:
asterisk -vvvvgc
-----------------------------------------------------------------
Use a texteditor like gedit and open your config files:
extensions.conf //for dialplan
sip.conf //defining SIP phones etc
zapata.conf
zaptel.conf
etc..
PLAY AROUND !!!!
Do changes,save,and use command:restart now, in CLI to restart Asterisk
server to activate the changes:
CLI>restart now
-----------------------------------------------------------------
Thats my box running!! :)
Good Luck !
Regards
Petter Ween
(PS.I'd hope I didn't type any errors.Anyway use it as a guidance)
-----------------------------------------------------------------
_________________________________________________________________
MSN Messenger http://www.msn.no/messenger Den korteste veien mellom deg og
dine venner
More information about the asterisk-users
mailing list