Gilles
2010-Jun-25 06:59 UTC
[asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
Hello About every three months, my dad's little Asterisk server that handles his business phone line with an OpenVox PCI card stops taking calls. To check if it's the cause, I'd like to run a CRON job every night to restart Zaptel and Asterisk. Before I go ahead, I'd like to know if I can just send the following commands, or if there are issues I should know about: /usr/local/etc/rc.d/asterisk stop /usr/local/etc/rc.d/zaptel stop /usr/local/etc/rc.d/zaptel start /usr/local/etc/rc.d/asterisk start Or, as I suspect, if there's already a good watchguard applet available, I could use that instead. FWIW, it's a FreeBSD 6.3 host, running Zaptel 1.4.0-BSD and Asterisk 1.4.21.2. Thank you.
Randy R
2010-Jun-25 07:53 UTC
[asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, Jun 25, 2010 at 8:59 AM, Gilles <codecomplete at free.fr> wrote:> Hello > > About every three months, my dad's little Asterisk server that handles > his business phone line with an OpenVox PCI card stops taking calls. > > To check if it's the cause, I'd like to run a CRON job every night to > restart Zaptel and Asterisk.IMO, if it's a business phone, you'd do well to just reboot it at 3AM once a week or once a month or some interval that you're comfortable with. We used to do this for a similar reason. /r
Tzafrir Cohen
2010-Jun-25 08:43 UTC
[asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, Jun 25, 2010 at 08:59:32AM +0200, Gilles wrote:> Hello > > About every three months, my dad's little Asterisk server that handles > his business phone line with an OpenVox PCI card stops taking calls. > > To check if it's the cause, I'd like to run a CRON job every night to > restart Zaptel and Asterisk.That does not really check if that is the problem. Mind giving more information as for the nature of the problem?> > Before I go ahead, I'd like to know if I can just send the following > commands, or if there are issues I should know about: > > /usr/local/etc/rc.d/asterisk stop > /usr/local/etc/rc.d/zaptel stop > /usr/local/etc/rc.d/zaptel start > /usr/local/etc/rc.d/asterisk start > > Or, as I suspect, if there's already a good watchguard applet > available, I could use that instead. > > FWIW, it's a FreeBSD 6.3 host, running Zaptel 1.4.0-BSD and Asterisk > 1.4.21.2.'dahdi restart' has become more relaible as of 1.4.22 ... -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Tzafrir Cohen
2010-Jun-25 15:47 UTC
[asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, Jun 25, 2010 at 06:45:29AM -0700, Steve Edwards wrote:> On Fri, 25 Jun 2010, Gareth Blades wrote: > > > If you are going to reboot the server regularly then make sure and > > system updates are set to not automatically install new kernel versions. > > Otherwise if you get a kernel update and reboot zaptel/dahdi wont load > > until you recompile it. > > I "enhanced" my /etc/init.d/zaptel to rebuild zaptel if the module was not > available for the current kernel:You should look into dkms. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Gilles
2010-Jun-26 11:31 UTC
[asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, 25 Jun 2010 08:59:32 +0200, Gilles <codecomplete at free.fr> wrote:>Before I go ahead, I'd like to know if I can just send the following >commands, or if there are issues I should know about:To avoid issues about the host hanging after a reboot due to upgrades... I think I'll just run a CRON job to stop/start Zaptel and see if it solves the issue I'm having about Asterisk no longer answering calls after X weeks of running fine. Can someone confirm that Zaptel can't be unloaded with Asterisk is still running (this is on a FreeBSD 6.3 host)? ========================# /usr/local/etc/rc.d/asterisk stop Stopping asterisk. kill: 735: No such process # ps aux | grep asterisk | grep -v grep # /usr/local/etc/rc.d/zaptel stop zaptel # kldstat Id Refs Address Size Name 1 7 0xc0400000 7a05b0 kernel 2 1 0xc0ba1000 5c304 acpi.ko 12 1 0xc2d69000 19000 linux.ko # /usr/local/etc/rc.d/zaptel start zaptel Keyword: [fxsks], Value: [1] Keyword: [loadzone], Value: [fr] Keyword: [defaultzone], Value: [fr] # kldstat Id Refs Address Size Name 1 17 0xc0400000 7a05b0 kernel 2 1 0xc0ba1000 5c304 acpi.ko 12 1 0xc2d69000 19000 linux.ko 13 9 0xc2ca7000 32000 zaptel.ko 14 1 0xc2cdd000 7000 qozap.ko 15 1 0xc2ce7000 20000 tau32pci.ko 16 1 0xc2d09000 5000 wcfxo.ko 17 1 0xc2d0f000 a000 wcfxs.ko 18 1 0xc2d1f000 6000 wct1xxp.ko 19 1 0xc2d25000 c000 wct4xxp.ko 20 1 0xc2d31000 a000 wcte11xp.ko 21 1 0xc2d3b000 d000 wcte12xp.ko # /usr/local/etc/rc.d/asterisk start Starting asterisk. # ps aux | grep asterisk | grep -v grep root 4555 0,0 4,3 21896 16444 ?? Ss 13:22 0:00,67 /usr/local/sbin/asterisk # /usr/local/etc/rc.d/zaptel stop zaptelkldunload: can't unload file: Device busy # /usr/local/etc/rc.d/asterisk stop Stopping asterisk. kill: 4555: No such process # /usr/local/etc/rc.d/zaptel stop zaptelkldunload: can't find file wcte12xp.ko: No such file or directory kldunload: can't find file wcte11xp.ko: No such file or directory kldunload: can't find file wct4xxp.ko: No such file or directory kldunload: can't find file wct1xxp.ko: No such file or directory kldunload: can't find file wcfxo.ko: No such file or directory kldunload: can't find file tau32pci.ko: No such file or directory kldunload: can't find file qozap.ko: No such file or directory kldunload: can't find file zaptel.ko: No such file or directory # /usr/local/etc/rc.d/zaptel start zaptel Keyword: [fxsks], Value: [1] Keyword: [loadzone], Value: [fr] Keyword: [defaultzone], Value: [fr] # /usr/local/etc/rc.d/asterisk start Starting asterisk. # ps aux | grep asterisk | grep -v grep root 4629 0,0 4,3 21896 16444 ?? Ss 13:27 0:00,65 /usr/local/sbin/asterisk ======================== => I guess it's OK to ignore Zaptel's "kldunload: can't find file X.ko: No such file or directory", and just go ahead and stop/start Asterisk and start Zaptel.