Re: [asterisk-users] Starting Asterisk on Ubuntu 7.04
Tzafrir Cohen wrote: What I say is that you have the worse of both worlds: - downtime of at ~1/2 a minute (avarage, if a cron runs every minute). In the case a restart is all it take. - A bigger downtime in case a restart is not what it takes. Because your logs will be flooded. - And a most unpredicatable behaviour. So why would Asterisk crash? And if so: would a simple restart really do? Tzafrir; Well I would seriously disagree. Assuming that asterisk just hit a bump in the road and needs a restart then an average downtime of 30 seconds is minimal. I'm assuming that scripts like safe_asterisk include restart delays anyway, just to let things settle before trying again. So there is really is no difference here. As for bigger downtime, well if asterisk won't restart your startup method isn't gonna change anything. Most monitoring scripts will keep trying just as cron will the difference is that the script can be set to stop after a certain number of time (maybe a dozen or so depends on the config). So your logs will be just as full anyway. And the behavior is in no way unpredictable. If anything it is predictable with clock-work efficiency (please excuse the pun). Lets face it that in a production environment if asterisk dies the manager that is on will be calling from their cell phone to get someone to fixit ASAP. I did say originally that this was a simple and less then perfect way to handle things, but it does work well. If you don't like it that is just fine. I have found that it is a reliable way to insure that asterisk will restart on a stable system that does not support inittab. Mark C. ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Starting Asterisk on Ubuntu 7.04
On Fri, May 04, 2007 at 09:59:36PM -1000, Mark Coccimiglio wrote: Tzafrir; Actually I have found this config to work really well. I prefer to use a script run from inittab but Ubuntu doesn't work like Redhat or BSD. On a production box keeping asterisk up and running is THE TOP priority. If you would rather check every five minutes then replace the first * with */5. I will address your points as it seems that you haven't really thought about this. What I say is that you have the worse of both worlds: - downtime of at ~1/2 a minute (avarage, if a cron runs every minute). In the case a restart is all it take. - A bigger downtime in case a restart is not what it takes. Because your logs will be flooded. - And a most unpredicatable behaviour. So why would Asterisk crash? And if so: would a simple restart really do? -- Tzafrir Cohen icq#16849755jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Starting Asterisk on Ubuntu 7.04
Tzafrir; Actually I have found this config to work really well. I prefer to use a script run from inittab but Ubuntu doesn't work like Redhat or BSD. On a production box keeping asterisk up and running is THE TOP priority. If you would rather check every five minutes then replace the first * with */5. I will address your points as it seems that you haven't really thought about this. 1) In a production environment you should NOT be messing with the config. That's what test hardware is for. 2) The answer to this question is: crontab -e its really not that hard. I'm not running asterisk every minute. I'm looking to see if asterisk is running and then act accordingly 3) If asterisk fails believe me a full mailbox is the least of my worries. As for full logs I'd rather have more informationgrep awk are your friends. I prefer to keep things as simple as possible. Sure scripts like safe_asterisk are nice and do some really neat things but lets face it how often do you actually sit at the console of your asterisk box. My main PBX is located about 7 feet from my office desk and I still mostly use ssh (not even telnet) to get into the box. Mark C http://www.psh-inc.com Tzafrir Cohen wrote: On Fri, May 04, 2007 at 01:59:41PM -1000, Mark Coccimiglio wrote: What I do is add an entry in the crontab file as such: * * * * * if [ ! `/bin/pidof -s asterisk` ] ; then /usr/sbin/asterisk; fi Its simple and it works. Additionally if asterisk crashes then cron restarts the server in about a minute. Just be careful with your configs. It will not Just Work, because: 1. you may want to give Asterisk other command-line parameters (-p, -U) and not do that through asterisk.conf . 2. You may have your own reasons for wanting to stop asterisk occasionally. Having it run every minute from a cron job is a source for problems. 3. In case running asterisk generates an error, you get a very ugly flood in your logs and your mailbox. ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Starting Asterisk on Ubuntu 7.04
Mark Coccimiglio wrote: Tzafrir; Actually I have found this config to work really well. I prefer to use a script run from inittab but Ubuntu doesn't work like Redhat or BSD. On a production box keeping asterisk up and running is THE TOP priority. If you would rather check every five minutes then replace the first * with */5. I will address your points as it seems that you haven't really thought about this. 1) In a production environment you should NOT be messing with the config. That's what test hardware is for. 2) The answer to this question is: crontab -e its really not that hard. I'm not running asterisk every minute. I'm looking to see if asterisk is running and then act accordingly 3) If asterisk fails believe me a full mailbox is the least of my worries. As for full logs I'd rather have more informationgrep awk are your friends. I prefer to keep things as simple as possible. Sure scripts like safe_asterisk are nice and do some really neat things but lets face it how often do you actually sit at the console of your asterisk box. My main PBX is located about 7 feet from my office desk and I still mostly use ssh (not even telnet) to get into the box. at least on ubuntu 6.10 safe_asterisk requires one simple fix, not really a headbreaker (something with output redirection). You could actually edit the script to not start a console if you dont' want it to (say for security reasons). If you wanted to start asterisk and keep monitoring it, that is what init is for. I don't know about ubuntu startup, but traditional sysV init would simply restart a process if it ever quits (respawn). My bet is that startup can do the same somehow, this is a far better way to keep * up -- Remco Post I didn't write all this code, and I can't even pretend that all of it makes sense. -- Glen Hattrup ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Starting Asterisk on Ubuntu 7.04
On Sat, May 05, 2007 at 06:23:43PM +0200, Remco Post wrote: Mark Coccimiglio wrote: Tzafrir; Actually I have found this config to work really well. I prefer to use a script run from inittab but Ubuntu doesn't work like Redhat or BSD. On a production box keeping asterisk up and running is THE TOP priority. If you would rather check every five minutes then replace the first * with */5. I will address your points as it seems that you haven't really thought about this. 1) In a production environment you should NOT be messing with the config. That's what test hardware is for. 2) The answer to this question is: crontab -e its really not that hard. I'm not running asterisk every minute. I'm looking to see if asterisk is running and then act accordingly 3) If asterisk fails believe me a full mailbox is the least of my worries. As for full logs I'd rather have more informationgrep awk are your friends. I prefer to keep things as simple as possible. Sure scripts like safe_asterisk are nice and do some really neat things but lets face it how often do you actually sit at the console of your asterisk box. My main PBX is located about 7 feet from my office desk and I still mostly use ssh (not even telnet) to get into the box. at least on ubuntu 6.10 safe_asterisk requires one simple fix, not really a headbreaker (something with output redirection). Bashism? The rule in Debian is that a bourne shell script (#!/bin/sh) should not use bash-specific features, such as . If it does, it should explicitly ask for bash: '#!/bin/bash' You could actually edit the script to not start a console if you dont' want it to (say for security reasons). Could you please elaborate? I believe that this would wreck the error handling in that script. If you wanted to start asterisk and keep monitoring it, that is what init is for. I don't know about ubuntu startup, but traditional sysV init would simply restart a process if it ever quits (respawn). My bet is that startup can do the same somehow, this is a far better way to keep * up But this means editing /etc/inittab every time you actually want to stop asterisk. -- Tzafrir Cohen icq#16849755jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Starting Asterisk on Ubuntu 7.04
Tzafrir Cohen wrote: On Sat, May 05, 2007 at 06:23:43PM +0200, Remco Post wrote: Mark Coccimiglio wrote: Tzafrir; Actually I have found this config to work really well. I prefer to use a script run from inittab but Ubuntu doesn't work like Redhat or BSD. On a production box keeping asterisk up and running is THE TOP priority. If you would rather check every five minutes then replace the first * with */5. I will address your points as it seems that you haven't really thought about this. 1) In a production environment you should NOT be messing with the config. That's what test hardware is for. 2) The answer to this question is: crontab -e its really not that hard. I'm not running asterisk every minute. I'm looking to see if asterisk is running and then act accordingly 3) If asterisk fails believe me a full mailbox is the least of my worries. As for full logs I'd rather have more informationgrep awk are your friends. I prefer to keep things as simple as possible. Sure scripts like safe_asterisk are nice and do some really neat things but lets face it how often do you actually sit at the console of your asterisk box. My main PBX is located about 7 feet from my office desk and I still mostly use ssh (not even telnet) to get into the box. at least on ubuntu 6.10 safe_asterisk requires one simple fix, not really a headbreaker (something with output redirection). Bashism? The rule in Debian is that a bourne shell script (#!/bin/sh) should not use bash-specific features, such as . If it does, it should explicitly ask for bash: '#!/bin/bash' hmmm, you might have a point there, never thought of that. You could actually edit the script to not start a console if you dont' want it to (say for security reasons). Could you please elaborate? Change: CONSOLE=yes # Whether or not you want a console To 'CONSOLE=no' I believe that this would wreck the error handling in that script. If you wanted to start asterisk and keep monitoring it, that is what init is for. I don't know about ubuntu startup, but traditional sysV init would simply restart a process if it ever quits (respawn). My bet is that startup can do the same somehow, this is a far better way to keep * up But this means editing /etc/inittab every time you actually want to stop asterisk. Or change runlevel... well that is maybe a bit to much AIX :) -- Remco Post I didn't write all this code, and I can't even pretend that all of it makes sense. -- Glen Hattrup ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Starting Asterisk on Ubuntu 7.04
Hi all, Could someone please tell me how to make Asterisk start at boot on Ubuntu Feisty 7.04? Many thanks, Christian ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Starting Asterisk on Ubuntu 7.04
On Fri, May 04, 2007 at 02:04:55PM +0200, Christian wrote: Hi all, Could someone please tell me how to make Asterisk start at boot on Ubuntu Feisty 7.04? Many thanks, Christian apt-get install asterisk Look at the init.d scripts. Note that in Ubuntu, subdirectories under /var/run are deleted at boot, and hence that script generates /var/run/asterisk (with proper ownership) at boot time. -- Tzafrir Cohen icq#16849755jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re[2]: [asterisk-users] Starting Asterisk on Ubuntu 7.04
Hi, I have already done: apt-get build-dep asterisk and then installed libpri, zaptel and asterisk from the latest sources. So what should i do then? New to Ubuntu. many thanks, Christian On 2007-05-04 at 17:00 Tzafrir Cohen wrote: On Fri, May 04, 2007 at 02:04:55PM +0200, Christian wrote: Hi all, Could someone please tell me how to make Asterisk start at boot on Ubuntu Feisty 7.04? Many thanks, Christian apt-get install asterisk Look at the init.d scripts. Note that in Ubuntu, subdirectories under /var/run are deleted at boot, and hence that script generates /var/run/asterisk (with proper ownership) at boot time. -- Tzafrir Cohen icq#16849755jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Starting Asterisk on Ubuntu 7.04
Christian, You can follow this procedure http://www.aussievoip.com/wiki/freePBX-Ubuntu Regards, Nitesh Christian wrote: Hi, I have already done: apt-get build-dep asterisk and then installed libpri, zaptel and asterisk from the latest sources. So what should i do then? New to Ubuntu. many thanks, Christian On 2007-05-04 at 17:00 Tzafrir Cohen wrote: On Fri, May 04, 2007 at 02:04:55PM +0200, Christian wrote: Hi all, Could someone please tell me how to make Asterisk start at boot on Ubuntu Feisty 7.04? Many thanks, Christian apt-get install asterisk Look at the init.d scripts. Note that in Ubuntu, subdirectories under /var/run are deleted at boot, and hence that script generates /var/run/asterisk (with proper ownership) at boot time. -- Tzafrir Cohen icq#16849755jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: Re[2]: [asterisk-users] Starting Asterisk on Ubuntu 7.04
If you do make config when compiling zaptel and asterisk, it should put the script in /etc/init.d, and add the relevant entries to the various start levels. Thanks, James Texter On Fri, 2007-05-04 at 18:44 +0200, Christian wrote: Hi, I have already done: apt-get build-dep asterisk and then installed libpri, zaptel and asterisk from the latest sources. So what should i do then? New to Ubuntu. many thanks, Christian On 2007-05-04 at 17:00 Tzafrir Cohen wrote: On Fri, May 04, 2007 at 02:04:55PM +0200, Christian wrote: Hi all, Could someone please tell me how to make Asterisk start at boot on Ubuntu Feisty 7.04? Many thanks, Christian apt-get install asterisk Look at the init.d scripts. Note that in Ubuntu, subdirectories under /var/run are deleted at boot, and hence that script generates /var/run/asterisk (with proper ownership) at boot time. -- Tzafrir Cohen icq#16849755jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Starting Asterisk on Ubuntu 7.04
On Fri, May 04, 2007 at 01:31:19PM -0400, Nitesh Divecha wrote: Christian, You can follow this procedure http://www.aussievoip.com/wiki/freePBX-Ubuntu If you like hard work, that is. I wonder how our frePBX debs fare on Ubuntu (deb http://updates.xorcom.com etch main ). Theretically they should work. -- Tzafrir Cohen icq#16849755jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re[2]: [asterisk-users] Starting Asterisk on Ubuntu 7.04
Hi, Many thanks got it working now. All the best, Christian On 2007-05-04 at 13:31 Nitesh Divecha wrote: Christian, You can follow this procedure http://www.aussievoip.com/wiki/freePBX-Ubuntu Regards, Nitesh Christian wrote: Hi, I have already done: apt-get build-dep asterisk and then installed libpri, zaptel and asterisk from the latest sources. So what should i do then? New to Ubuntu. many thanks, Christian On 2007-05-04 at 17:00 Tzafrir Cohen wrote: On Fri, May 04, 2007 at 02:04:55PM +0200, Christian wrote: Hi all, Could someone please tell me how to make Asterisk start at boot on Ubuntu Feisty 7.04? Many thanks, Christian apt-get install asterisk Look at the init.d scripts. Note that in Ubuntu, subdirectories under /var/run are deleted at boot, and hence that script generates /var/run/asterisk (with proper ownership) at boot time. -- Tzafrir Cohen icq#16849755jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: Re[2]: [asterisk-users] Starting Asterisk on Ubuntu 7.04
From: James Texter [EMAIL PROTECTED] Date: Fri, 04 May 2007 12:28:39 -0500 If you do make config when compiling zaptel and asterisk, it should put the script in /etc/init.d, and add the relevant entries to the various start levels. Not with 1.4 at least. makefile is not looking in the right place and not the right script. Yuan Liu Thanks, James Texter On Fri, 2007-05-04 at 18:44 +0200, Christian wrote: Hi, I have already done: apt-get build-dep asterisk and then installed libpri, zaptel and asterisk from the latest sources. So what should i do then? New to Ubuntu. many thanks, Christian On 2007-05-04 at 17:00 Tzafrir Cohen wrote: On Fri, May 04, 2007 at 02:04:55PM +0200, Christian wrote: Hi all, Could someone please tell me how to make Asterisk start at boot on Ubuntu Feisty 7.04? Many thanks, Christian apt-get install asterisk Look at the init.d scripts. Note that in Ubuntu, subdirectories under /var/run are deleted at boot, and hence that script generates /var/run/asterisk (with proper ownership) at boot time. -- Tzafrir Cohen icq#16849755jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Starting Asterisk on Ubuntu 7.04
What I do is add an entry in the crontab file as such: * * * * * if [ ! `/bin/pidof -s asterisk` ] ; then /usr/sbin/asterisk; fi Its simple and it works. Additionally if asterisk crashes then cron restarts the server in about a minute. Just be careful with your configs. Mark Coccimiglio IS Manager Payroll Services Hawaii, Inc. http://www.psh-inc.com Christian wrote: Hi all, Could someone please tell me how to make Asterisk start at boot on Ubuntu Feisty 7.04? Many thanks, Christian ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Starting Asterisk on Ubuntu 7.04
On Fri, May 04, 2007 at 01:59:41PM -1000, Mark Coccimiglio wrote: What I do is add an entry in the crontab file as such: * * * * * if [ ! `/bin/pidof -s asterisk` ] ; then /usr/sbin/asterisk; fi Its simple and it works. Additionally if asterisk crashes then cron restarts the server in about a minute. Just be careful with your configs. It will not Just Work, because: 1. you may want to give Asterisk other command-line parameters (-p, -U) and not do that through asterisk.conf . 2. You may have your own reasons for wanting to stop asterisk occasionally. Having it run every minute from a cron job is a source for problems. 3. In case running asterisk generates an error, you get a very ugly flood in your logs and your mailbox. -- Tzafrir Cohen icq#16849755jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users