Asterisk

From coopzone
Jump to navigation Jump to search

Notes on oslec codec with asterisk

To recompile after yum update or change of kernel.

yum update

re load, if new kernel

should be a symbolic link from /usr/src/dadhi to asteriskversion/dahdi-linux-x.x.x

cd to it

make clean

make

make install

see notes on using echo cancelling with oslec to setup the software.

Setting up oslec with dahdi drivers and asterisk

the install:

cd /usr/src

create a sym link dir to the linux-dahdi-drivers directory

wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2
tar xjf linux-2.6.28.tar.bz2
mkdir /usr/src/dahdi/drivers/staging
cp -fR /usr/src/linux-2.6.28/drivers/staging/echo /usr/src/dahdi/drivers/staging
sed -i "s|#obj-m += dahdi_echocan_oslec.o|obj-m += dahdi_echocan_oslec.o|" /usr/src/dahdi/drivers/dahdi/Kbuild
sed -i "s|#obj-m += ../staging/echo/|obj-m += ../staging/echo/|" /usr/src/dahdi/drivers/dahdi/Kbuild
echo 'obj-m += echo.o' > /usr/src/dahdi/drivers/staging/echo/Kbuild
cd /usr/src/dahdi/
make
make install

Sample configs:

don't forget the "options wctdm opermode=UK" in /etc/modprobe.d/dahdi.conf

eg1 (two cards) /etc/dahdi/system.conf

# Autogenerated by /usr/sbin/dahdi_genconf on Tue Dec  1 09:10:15 2009
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCFXO/0 "Wildcard X100P Board 1" (MASTER) 
fxsks=1
echocanceller=oslec,1

# Span 2: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" 
fxsks=2
echocanceller=oslec,2
# channel 3, WCTDM/4/1, no module.
# channel 4, WCTDM/4/2, no module.
# channel 5, WCTDM/4/3, no module.

# Global data

loadzone	= uk
defaultzone	= uk

and /etc/asterisk/dahdi-channels.conf included by /etc/asterisk/chan_dahdi.conf


Eg 2: one card

# Autogenerated by /usr/sbin/dahdi_genconf on Sat Dec  5 11:11:05 2009
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER) 
fxsks=1
echocanceller=oslec,1
# channel 2, WCTDM/4/1, no module.
# channel 3, WCTDM/4/2, no module.
# channel 4, WCTDM/4/3, no module.

# Global data

loadzone	= uk
defaultzone	= uk

and the /etc/asterisk/dahdi.conf

; Autogenerated by /usr/sbin/dahdi_genconf on Sat Dec  5 11:11:06 2009
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER) 
;;; line="1 WCTDM/4/0 FXSKS  (SWEC: OSLEC)"
signalling=fxs_ks
callerid=asreceived
group=0
context=pstn
channel => 1

Dahdi time shift error on xen

In /ets/sysctl.conf

#Dahdi time shift logs errors (this should stop it)
xen.independent_wallclock = 1