"modprobe wctdm" problem


#1

i have asterisk/zaptel 1.2 install on centos 4.2 with amp, i run into this error:
line 0: Unable to open master device ‘/dev/zap/ctl’ when doing modprobe wctdm. however the modules are loaded. dmesg shows:
Zapata Telephony Interface Registered on major 196
ACPI: PCI interrupt 0000:01:00.0[A] -> GSI 11 (level, low) -> IRQ 11
Freshmaker version: 73
Freshmaker passed register test
Module 0: Installed – AUTO FXS/DPO
Module 1: Not installed
Module 2: Not installed
Module 3: Installed – AUTO FXO (FCC mode)
Found a Wildcard TDM: Wildcard TDM400P REV I (2 modules)

asterisk cannot start at this stage, i have to do 1 more time ztcfg -v then can start asterisk, any idea?
i have changed udev which required for 2.6 kernel for zaptel setup.


#2

This is a known problem when using udev. There is a delay between loading the modules and the creation of the directory /dev/zap/ctl. Try using a sleep before running ztcfg if you are using a startup script.


#3

so zmanea how do i do a ‘sleep’ b4 running ztcfg? modprobe wctdm has already done a ztcfg (define in modprobe.conf) but seems like doesn’t work at that stage, i put the following in my /etc/rc.d/rc.local to start asterisk which don’t work,

/sbin/modprobe wctdm
/usr/sbin/amportal start

then i insert another line b4 amportal start
/sbin/ztcfg -v
also cannot, seems like /dev/zap/ has not finish creation of those directory.
is there a remedy to put a pause for few seconds after modprobe wctdm.


#4

okay, i got it work.

i change this line in /etc/modprobe.conf
install wctdm /sbin/modprobe --ignore-install wctdm && /sbin/ztcfg
to
install wctdm /sbin/modprobe --ignore-install wctdm && /bin/sleep 8 && /sbin/ztcfg

so it will delay 8 seconds before ztcfg

i put this in my /etc/rc.d/rc.local for asterisk&AMP startup on boot

/sbin/modprobe wctdm
/usr/sbin/amportal start