Theo Band
2007-Apr-19 09:28 UTC
[asterisk-users] ztdummy does not load properly at server startup
Hi I run asterisk 1.4.2 with zaptel 1.4.1. Zaptel is only needed for the ztdummy driver to get the Meetme() application to work. I don't have any specific hardware. And it does work nicely. When I reboot the machine however I have to manually load the driver like this: [root@vink ~]# modprobe ztdummy Notice: Configuration file is /etc/zaptel.conf line 0: Unable to open master device '/dev/zap/ctl' 1 error(s) detected FATAL: Error running install command for ztdummy [root@vink ~]# modprobe -r ztdummy [root@vink ~]# modprobe ztdummy Notice: Configuration file is /etc/zaptel.conf line 0: Unable to open master device '/dev/zap/ctl' 1 error(s) detected FATAL: Error running install command for ztdummy [root@vink ~]# modprobe ztdummy So a simple load of the driver does not seem to be enough. I need to remove then wait and then load again. My modprobe.conf contains (amongst others) this line: install ztdummy /sbin/modprobe --ignore-install ztdummy && /sbin/ztcfg What is the proper way to get this driver loaded at startup? Have I missed a configuration somewhere? Thanks for any help, Theo
Matthew J. Roth
2007-Apr-19 10:19 UTC
[asterisk-users] ztdummy does not load properly at server startup
Theo, Unless things have changed significantly in the newer releases, you must load zaptel prior to loading ztdummy. Additionally, the zaptel devices are not created instantly, so after you load zaptel you must wait a few seconds before loading ztdummy. You can perform some sort of polling if you want to script this, but a less sophisticated method is just to sleep for 10 or 15 seconds between the calls to modprobe. If your goal is to start Asterisk automatically at boot, some init scripts for different distributions are available at <http://svn.digium.com/view/asterisk/branches/1.4/contrib/init.d/>. I'm using Fedora, so I installed 'rc.redhat.asterisk' with chkconfig as follows: # install -m 755 ./rc.redhat.asterisk /etc/rc.d/init.d/asterisk # chkconfig --add asterisk # chkconfig --list asterisk asterisk 0:off 1:off 2:on 3:on 4:on 5:on 6:off Note that I made the following customizations to the script prior to installing it: * I don't want to run safe_asterisk, so I comment out all of the lines that reference the SAFE_ASTERISK variable. * I want to load ztdummy and raise the open file limit, so I add the following lines to the start() function immediately prior to the 'daemon' statement: modprobe zaptel > /dev/null 2> /dev/null sleep 15 modprobe ztdummy > /dev/null 2> /dev/null ztcfg > /dev/null 2> /dev/null ulimit -n 65536 > /dev/null 2> /dev/null * And add the following lines to the stop() function, immediately after the 'RETVAL=$?' line: rmmod ztdummy > /dev/null 2> /dev/null rmmod zaptel > /dev/null 2> /dev/null Things will differ depending on your distribution, but that should be enough to get you going in the right direction. Matthew Roth InterMedia Marketing Solutions Software Engineer and Systems Developer
Tzafrir Cohen
2007-Apr-19 11:45 UTC
[asterisk-users] ztdummy does not load properly at server startup
On Thu, Apr 19, 2007 at 06:28:51PM +0200, Theo Band wrote:> Hi > > I run asterisk 1.4.2 with zaptel 1.4.1. > Zaptel is only needed for the ztdummy driver to get the Meetme() > application to work. I don't have any specific hardware. > And it does work nicely. When I reboot the machine however I have to > manually load the driver like this: > > [root@vink ~]# modprobe ztdummy > Notice: Configuration file is /etc/zaptel.conf > line 0: Unable to open master device '/dev/zap/ctl' > > 1 error(s) detectedThe error message is meaningless for ztdummy. Please test if you have a working timing source with: zttest -v To get rid of this error, remove the line that runs an automatic ztcfg at the load of ztdummy: sed -i '/ztdummy/d' -- Tzafrir Cohen icq#16849755 jabber:tzafrir@jabber.org +972-50-7952406 mailto:tzafrir.cohen@xorcom.com http://www.xorcom.com iax:guest@local.xorcom.com/tzafrir
Darryl Dunkin
2007-Apr-19 15:06 UTC
[asterisk-users] ztdummy does not load properly at server startup
It's not playing a wav file at all, it is mixing the live audio from all of the callers in that conference room and sending it back out to them. ________________________________ From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Theo Band Sent: Thursday, April 19, 2007 13:36 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] ztdummy does not load properly at server startup Or add /dev/null Why would one application need a special driver? What so different about the Meetme() application? Playing a wav file doesn't need a special timing source for instance. But, I'm just a simple end user of course, not understanding all the complex details of a PBX :-) Theo -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070419/7fb89e69/attachment-0001.htm