Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, 25 Jun 2010 08:59:32 +0200, Gilles 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 AddressSize Name 17 0xc040 7a05b0 kernel 21 0xc0ba1000 5c304acpi.ko 121 0xc2d69000 19000linux.ko # /usr/local/etc/rc.d/zaptel start zaptel Keyword: [fxsks], Value: [1] Keyword: [loadzone], Value: [fr] Keyword: [defaultzone], Value: [fr] # kldstat Id Refs AddressSize Name 1 17 0xc040 7a05b0 kernel 21 0xc0ba1000 5c304acpi.ko 121 0xc2d69000 19000linux.ko 139 0xc2ca7000 32000zaptel.ko 141 0xc2cdd000 7000 qozap.ko 151 0xc2ce7000 2tau32pci.ko 161 0xc2d09000 5000 wcfxo.ko 171 0xc2d0f000 a000 wcfxs.ko 181 0xc2d1f000 6000 wct1xxp.ko 191 0xc2d25000 c000 wct4xxp.ko 201 0xc2d31000 a000 wcte11xp.ko 211 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. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, 25 Jun 2010 12:32:03 -0400, Barry Miller wrote: >Hi Gilles. You appear to be both posting to newsgroup >gmane.comp.telephony.pbx.asterisk.user AND sending the same message >directly to the asterisk-users list. This means that we list subscribers >see two copies of all your messages: one from gmane, one from you. (They >don't show up that way on gmane because it suppresses duplicates.) Sorry guys :-/ I think I fixed it in my NNTP reader. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, 25 Jun 2010 06:45:29 -0700 (PDT), Steve Edwards wrote: >However, the "philosophy" of regularly rebooting the box ensures that you >will never find the source of the problem. I think I'll just stop/start Zaptel and see if this is the cause for Asterisk no longer taking call after X weeks. >Hey Gilles, any chance of you fixing whatever it is that you are doing >that causes you to double-post EVERYTHING? Sorry about that. I think I fixed it. It looks like a wrong setting in the NTTP reader I'm using to access the mailing list through Gmane. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, 25 Jun 2010 13:25:18 +0300, Tzafrir Cohen wrote: >Asterisk 1.4.x works with Zaptel as well. > >But yes, this means an upgrade of Asterisk, and maybe you'd like to >avoid that. Yup. I'll just stop/start Zaptel every night and see if that fixes the problem. Thank you. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, 25 Jun 2010 11:19:25 +0100, 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. Mmm... Great tip. I hadn't thought of this. Thanks -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
Hi Gilles. You appear to be both posting to newsgroup gmane.comp.telephony.pbx.asterisk.user AND sending the same message directly to the asterisk-users list. This means that we list subscribers see two copies of all your messages: one from gmane, one from you. (They don't show up that way on gmane because it suppresses duplicates.) Can you please pick one or the other? Thanks. Sorry for interrupting. -- Barry -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [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.co...@xorcom.com +972-50-7952406 mailto:tzafrir.co...@xorcom.com http://www.xorcom.com iax:gu...@local.xorcom.com/tzafrir -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
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: # check for a zaptel driver for this kernel if [ ! -s /lib/modules/`uname -r`/*/zaptel.ko ] thenecho "Rebuilding zaptel" $0 rebuild fi (and then a bit later in the file) # rebuild the zaptel driver rebuild) if [ -d /usr/src/zaptel/ ] thencd /usr/src/zaptel/ make clean make make install elseecho "You need to download and untar the zaptel" echo "driver source to /usr/src/zaptel." fi ;; However, the "philosophy" of regularly rebooting the box ensures that you will never find the source of the problem. Hey Gilles, any chance of you fixing whatever it is that you are doing that causes you to double-post EVERYTHING? -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, Jun 25, 2010 at 11:46:37AM +0200, Gilles wrote: > >'dahdi restart' has become more relaible as of 1.4.22 ... > > If possible, I'd rather not uninstall Zaptel and install Dahdi because > the system works OK the rest of the time (installed about 3 years > ago). > > So I guess I'll just send the stop/start commands and see how it goes. Asterisk 1.4.x works with Zaptel as well. But yes, this means an upgrade of Asterisk, and maybe you'd like to avoid that. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.co...@xorcom.com +972-50-7952406 mailto:tzafrir.co...@xorcom.com http://www.xorcom.com iax:gu...@local.xorcom.com/tzafrir -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, Jun 25, 2010 at 12:10 PM, Gilles wrote: > Sorry for the misunderstanding. So I can just run "reboot" from a CRON > job then. >From root's cron, yes -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
Hugo Serrano wrote: > On 25/06/10 10:44, Gilles wrote: >> On Fri, 25 Jun 2010 09:53:34 +0200, Randy R >> wrote: >> >>> 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. >>> >> Right, but he won't remember to do this, and I don't want to do it >> myself :-) >> >> > You can set it up. > > #crontab -e > > 0 3 15 * * /sbin/reboot > > > This examples should reboot the server every day 15 of any month at 3 a.m. > > 0 -> minutes > 3 -> hours > 15 -> Day of the Month > * -> Month > * -> Day of the week > /sbin/reboot -> Comand > 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. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On 25/06/10 10:44, Gilles wrote: > On Fri, 25 Jun 2010 09:53:34 +0200, Randy R > wrote: > >> 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. >> > Right, but he won't remember to do this, and I don't want to do it > myself :-) > > You can set it up. #crontab -e 0 3 15 * * /sbin/reboot This examples should reboot the server every day 15 of any month at 3 a.m. 0 -> minutes 3 -> hours 15 -> Day of the Month * -> Month * -> Day of the week /sbin/reboot -> Comand -- Hugo Serrano hugo.serr...@javali.pt Javali Administração e Desenvolvimento de Sistemas Informáticos, Lda. Madan ParqueEdifício VI Campus da FCT/UNL Quinta da Torre 2829-516 Caparica Portugal Phone: +351 212949666 Fax: +351 212948313 www.javali.pt i...@javali.pt -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, 25 Jun 2010 12:09:09 +0200, Randy R wrote: >No I meant as a CRON job! No one will be calling at 3AM, there's ample >time to reboot once a month for example. Sorry for the misunderstanding. So I can just run "reboot" from a CRON job then. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, Jun 25, 2010 at 11:44 AM, Gilles wrote: > On Fri, 25 Jun 2010 09:53:34 +0200, Randy R >>once a week or once a month or some interval that you're comfortable >>with. We used to do this for a similar reason. > > Right, but he won't remember to do this, and I don't want to do it > myself :-) No I meant as a CRON job! No one will be calling at 3AM, there's ample time to reboot once a month for example. Of course as Tzafrir points out, this doesn't tell you what's wrong. What it does do is lessen any possible problems with memory leaks, etc. /r -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, 25 Jun 2010 11:43:04 +0300, Tzafrir Cohen wrote: >That does not really check if that is the problem. Mind giving more >information as for the nature of the problem? I don't have more information. Could just be the Zaptel driver working with the OpenVoice card, in which case unloading/reloading Zaptel could solve the problem. >'dahdi restart' has become more relaible as of 1.4.22 ... If possible, I'd rather not uninstall Zaptel and install Dahdi because the system works OK the rest of the time (installed about 3 years ago). So I guess I'll just send the stop/start commands and see how it goes. Thank you. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, 25 Jun 2010 09:53:34 +0200, Randy R wrote: >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. Right, but he won't remember to do this, and I don't want to do it myself :-) -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [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.co...@xorcom.com +972-50-7952406 mailto:tzafrir.co...@xorcom.com http://www.xorcom.com iax:gu...@local.xorcom.com/tzafrir -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?
On Fri, Jun 25, 2010 at 8:59 AM, 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. 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 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[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. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users