Re: [asterisk-users] Can't restart asterisk from script

2009-12-11 Thread Steve Edwards
On Wed, 9 Dec 2009, Michelle Dupuis wrote:

 However, I have a cron job that tries to restart asterisk and gets this 
 error:

 No such command 'restart gracefully' (type 'help restart gracefully' for 
 other possible commands)

Did you find a solution -- inquiring minds want to know...

-- 
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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-11 Thread Michelle Dupuis
Looks like single quotes did the trick.  No idea why...but the error is gone
from my log 

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards
Sent: Friday, December 11, 2009 4:23 PM
To: Asterisk Users List
Subject: Re: [asterisk-users] Can't restart asterisk from script

On Wed, 9 Dec 2009, Michelle Dupuis wrote:

 However, I have a cron job that tries to restart asterisk and gets 
 this
 error:

 No such command 'restart gracefully' (type 'help restart gracefully' 
 for other possible commands)

Did you find a solution -- inquiring minds want to know...

--
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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-11 Thread Steve Edwards
Un-top-posting...

 On Wed, 9 Dec 2009, Michelle Dupuis wrote:

 However, I have a cron job that tries to restart asterisk and gets
 this
 error:

 No such command 'restart gracefully' (type 'help restart gracefully'
 for other possible commands)

 On Behalf Of Steve Edwards
 Sent: Friday, December 11, 2009 4:23 PM

 Did you find a solution -- inquiring minds want to know...

On Fri, 11 Dec 2009, Michelle Dupuis wrote:

 Looks like single quotes did the trick. No idea why...but the error is 
 gone from my log

I believe this to be a red-herring. Single or double quotes should produce 
exactly the same result in your situation.

-- 
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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-11 Thread Danny Nicholas
restart when convenient

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards
Sent: Friday, December 11, 2009 4:47 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Can't restart asterisk from script

Un-top-posting...

 On Wed, 9 Dec 2009, Michelle Dupuis wrote:

 However, I have a cron job that tries to restart asterisk and gets
 this
 error:

 No such command 'restart gracefully' (type 'help restart gracefully'
 for other possible commands)

 On Behalf Of Steve Edwards
 Sent: Friday, December 11, 2009 4:23 PM

 Did you find a solution -- inquiring minds want to know...

On Fri, 11 Dec 2009, Michelle Dupuis wrote:

 Looks like single quotes did the trick. No idea why...but the error is 
 gone from my log

I believe this to be a red-herring. Single or double quotes should produce 
exactly the same result in your situation.

-- 
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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-10 Thread Michelle Dupuis
I encounter an interesting situation where the internet connection goes down
and then goes back up.  The IAX trunks are then unregistered, and * is
confused...only a restart allows * to function again.  I have a cron script
that tests for an internet outage and then restarts * after the conncection
is back up.   This is not a daily kill

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Alex Balashov
Sent: Thursday, December 10, 2009 2:11 AM
To: Asterisk Users List
Subject: Re: [asterisk-users] Can't restart asterisk from script

On 12/10/2009 02:07 AM, Tzafrir Cohen wrote:

 Why would one want a daily sabotage of the system in the first place?

An apt question.

--
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-10 Thread Michelle Dupuis
Ok that makes sense...but what would * try to execute requiring the path?
All modules are loaded by * using the built directory name... 

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bill Kenworthy
Sent: Wednesday, December 09, 2009 11:04 PM
To: Asterisk Users List
Subject: Re: [asterisk-users] Can't restart asterisk from script

Yes, but if asterisk cant find some of its components due to abbreviated
path or ...

Just run a cron that prints the results from env and compare and see if
there is something obvious - there may also be privilege issues


BillK


On Wed, 2009-12-09 at 22:32 -0500, Michelle Dupuis wrote:
 I had double quotes originally - and that didn't work
 
 -Original Message-
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Juan E.
 Rodríguez
 Sent: Wednesday, December 09, 2009 10:14 PM
 To: Asterisk Users List
 Subject: Re: [asterisk-users] Can't restart asterisk from script
 
 You should replace the single quote with double quote.
 
 --Original Message--
 From: Michelle Dupuis
 Sender: asterisk-users-boun...@lists.digium.com
 To: 'Asterisk Users List'
 ReplyTo: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: Re: [asterisk-users] Can't restart asterisk from script
 Sent: Dec 9, 2009 10:59 PM
 
 But the error message in my log shows the error to be from asterisk, 
 so I'm guessing I'm sending a parameter incorrectly to asterisk - 
 which fits with the no quote theory
 
 -Original Message-
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bill 
 Kenworthy
 Sent: Wednesday, December 09, 2009 9:31 PM
 To: Asterisk Users List
 Subject: Re: [asterisk-users] Can't restart asterisk from script
 
 Keep in mond that cron usually has a very abbreviated environment for 
 security reasons - you may need to set the PATH or other environment 
 variables in the crontab to get it to work.
 
 Billk
 
 
 On Wed, 2009-12-09 at 20:55 -0500, Michelle Dupuis wrote:
  Interesting...I'll try that.  Thanks
  
  
  
  __
  From: asterisk-users-boun...@lists.digium.com
  [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lyle 
  Giese
  Sent: Wednesday, December 09, 2009 8:47 PM
  To: Asterisk Users List
  Subject: Re: [asterisk-users] Can't restart asterisk from script
  
  
  
  Doug Lytle wrote: 
   Warren Selby wrote:
 
On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca 
mailto:supp...@ocg.ca wrote:

I'm running * 1.4 and can successfully restart asterisk from the
command
line with:
/usr/sbin/asterisk -r -x restart gracefully


   
   I have the following cron job:
   
   /usr/sbin/asterisk -r -x 'restart when convenient'
   
   Doug
   
 
  You probably don't need the single or double quotes at all.  I have 
  never used any quoting in crontab.
  
  Lyle Giese
  LCR Computer Services, Inc.
  
  
  ___
  -- Bandwidth and Colocation Provided by http://www.api-digital.com 
  --
  
  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:
 http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 Saludos,
 Juan E. Rodríguez
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-10 Thread Tzafrir Cohen
On Thu, Dec 10, 2009 at 07:49:11AM -0500, Michelle Dupuis wrote:
 I encounter an interesting situation where the internet connection goes down
 and then goes back up.  The IAX trunks are then unregistered, and * is
 confused...only a restart allows * to function again.  I have a cron script
 that tests for an internet outage and then restarts * after the conncection
 is back up.   This is not a daily kill

'iax2 reload' ?

-- 
   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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Michelle Dupuis
I'm running * 1.4 and can successfully restart asterisk from the command
line with:
/usr/sbin/asterisk -r -x restart gracefully 
 
However, I have a cron job that tries to restart asterisk and gets this
error:
No such command 'restart gracefully' (type 'help restart gracefully' for
other possible commands)
 
Can anyone think of why this is happening?
 
Thanks


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Warren Selby
On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca wrote:

 I'm running * 1.4 and can successfully restart asterisk from the command
 line with:
 /usr/sbin/asterisk -r -x restart gracefully

 However, I have a cron job that tries to restart asterisk and gets this
 error:
 No such command 'restart gracefully' (type 'help restart gracefully' for
 other possible commands)

 Can anyone think of why this is happening?

 Thanks


Maybe you need to escape your quotes (\restart gracefully\) in your
script?

Just a thought...


-- 
Thanks,
--Warren Selby
http://www.selbytech.com
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Doug Lytle
Warren Selby wrote:
 On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca 
 mailto:supp...@ocg.ca wrote:

 I'm running * 1.4 and can successfully restart asterisk from the
 command
 line with:
 /usr/sbin/asterisk -r -x restart gracefully


I have the following cron job:

/usr/sbin/asterisk -r -x 'restart when convenient'

Doug

-- 
Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary 
Safety, deserve neither Liberty nor Safety.


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Lyle Giese
Doug Lytle wrote:
 Warren Selby wrote:
   
 On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca 
 mailto:supp...@ocg.ca wrote:

 I'm running * 1.4 and can successfully restart asterisk from the
 command
 line with:
 /usr/sbin/asterisk -r -x restart gracefully

 

 I have the following cron job:

 /usr/sbin/asterisk -r -x 'restart when convenient'

 Doug

   
You probably don't need the single or double quotes at all. I have never
used any quoting in crontab.

Lyle Giese
LCR Computer Services, Inc.


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Michelle Dupuis
But my command works from a bash command line...so something is fishy!

I want to solve this mystery

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Doug Lytle
Sent: Wednesday, December 09, 2009 8:27 PM
To: Asterisk Users List
Subject: Re: [asterisk-users] Can't restart asterisk from script

Warren Selby wrote:
 On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca 
 mailto:supp...@ocg.ca wrote:

 I'm running * 1.4 and can successfully restart asterisk from the
 command
 line with:
 /usr/sbin/asterisk -r -x restart gracefully


I have the following cron job:

/usr/sbin/asterisk -r -x 'restart when convenient'

Doug

--
Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Michelle Dupuis
Interesting...I'll try that.  Thanks

  _  

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lyle Giese
Sent: Wednesday, December 09, 2009 8:47 PM
To: Asterisk Users List
Subject: Re: [asterisk-users] Can't restart asterisk from script


Doug Lytle wrote: 

Warren Selby wrote:

  

On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca 

 mailto:supp...@ocg.ca mailto:supp...@ocg.ca wrote:



I'm running * 1.4 and can successfully restart asterisk from the

command

line with:

/usr/sbin/asterisk -r -x restart gracefully







I have the following cron job:



/usr/sbin/asterisk -r -x 'restart when convenient'



Doug



  

You probably don't need the single or double quotes at all.  I have never
used any quoting in crontab.

Lyle Giese
LCR Computer Services, Inc.



___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Bill Kenworthy
Keep in mond that cron usually has a very abbreviated environment for
security reasons - you may need to set the PATH or other environment
variables in the crontab to get it to work.

Billk


On Wed, 2009-12-09 at 20:55 -0500, Michelle Dupuis wrote:
 Interesting...I'll try that.  Thanks
 
 
 __
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lyle
 Giese
 Sent: Wednesday, December 09, 2009 8:47 PM
 To: Asterisk Users List
 Subject: Re: [asterisk-users] Can't restart asterisk from script
 
 
 
 Doug Lytle wrote: 
  Warren Selby wrote:

   On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca 
   mailto:supp...@ocg.ca wrote:
   
   I'm running * 1.4 and can successfully restart asterisk from the
   command
   line with:
   /usr/sbin/asterisk -r -x restart gracefully
   
   
  
  I have the following cron job:
  
  /usr/sbin/asterisk -r -x 'restart when convenient'
  
  Doug
  

 You probably don't need the single or double quotes at all.  I have
 never used any quoting in crontab.
 
 Lyle Giese
 LCR Computer Services, Inc.
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Michelle Dupuis
But the error message in my log shows the error to be from asterisk, so I'm
guessing I'm sending a parameter incorrectly to asterisk - which fits with
the no quote theory 

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bill Kenworthy
Sent: Wednesday, December 09, 2009 9:31 PM
To: Asterisk Users List
Subject: Re: [asterisk-users] Can't restart asterisk from script

Keep in mond that cron usually has a very abbreviated environment for
security reasons - you may need to set the PATH or other environment
variables in the crontab to get it to work.

Billk


On Wed, 2009-12-09 at 20:55 -0500, Michelle Dupuis wrote:
 Interesting...I'll try that.  Thanks
 
 
 __
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lyle 
 Giese
 Sent: Wednesday, December 09, 2009 8:47 PM
 To: Asterisk Users List
 Subject: Re: [asterisk-users] Can't restart asterisk from script
 
 
 
 Doug Lytle wrote: 
  Warren Selby wrote:

   On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca 
   mailto:supp...@ocg.ca wrote:
   
   I'm running * 1.4 and can successfully restart asterisk from the
   command
   line with:
   /usr/sbin/asterisk -r -x restart gracefully
   
   
  
  I have the following cron job:
  
  /usr/sbin/asterisk -r -x 'restart when convenient'
  
  Doug
  

 You probably don't need the single or double quotes at all.  I have 
 never used any quoting in crontab.
 
 Lyle Giese
 LCR Computer Services, Inc.
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Juan E. Rodríguez
You should replace the single quote with double quote.

--Original Message--
From: Michelle Dupuis
Sender: asterisk-users-boun...@lists.digium.com
To: 'Asterisk Users List'
ReplyTo: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Can't restart asterisk from script
Sent: Dec 9, 2009 10:59 PM

But the error message in my log shows the error to be from asterisk, so I'm
guessing I'm sending a parameter incorrectly to asterisk - which fits with
the no quote theory 

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bill Kenworthy
Sent: Wednesday, December 09, 2009 9:31 PM
To: Asterisk Users List
Subject: Re: [asterisk-users] Can't restart asterisk from script

Keep in mond that cron usually has a very abbreviated environment for
security reasons - you may need to set the PATH or other environment
variables in the crontab to get it to work.

Billk


On Wed, 2009-12-09 at 20:55 -0500, Michelle Dupuis wrote:
 Interesting...I'll try that.  Thanks
 
 
 __
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lyle 
 Giese
 Sent: Wednesday, December 09, 2009 8:47 PM
 To: Asterisk Users List
 Subject: Re: [asterisk-users] Can't restart asterisk from script
 
 
 
 Doug Lytle wrote: 
  Warren Selby wrote:

   On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca 
   mailto:supp...@ocg.ca wrote:
   
   I'm running * 1.4 and can successfully restart asterisk from the
   command
   line with:
   /usr/sbin/asterisk -r -x restart gracefully
   
   
  
  I have the following cron job:
  
  /usr/sbin/asterisk -r -x 'restart when convenient'
  
  Doug
  

 You probably don't need the single or double quotes at all.  I have 
 never used any quoting in crontab.
 
 Lyle Giese
 LCR Computer Services, Inc.
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Saludos,
Juan E. Rodríguez
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Michelle Dupuis
I had double quotes originally - and that didn't work 

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Juan E.
Rodríguez
Sent: Wednesday, December 09, 2009 10:14 PM
To: Asterisk Users List
Subject: Re: [asterisk-users] Can't restart asterisk from script

You should replace the single quote with double quote.

--Original Message--
From: Michelle Dupuis
Sender: asterisk-users-boun...@lists.digium.com
To: 'Asterisk Users List'
ReplyTo: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Can't restart asterisk from script
Sent: Dec 9, 2009 10:59 PM

But the error message in my log shows the error to be from asterisk, so I'm
guessing I'm sending a parameter incorrectly to asterisk - which fits with
the no quote theory 

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bill Kenworthy
Sent: Wednesday, December 09, 2009 9:31 PM
To: Asterisk Users List
Subject: Re: [asterisk-users] Can't restart asterisk from script

Keep in mond that cron usually has a very abbreviated environment for
security reasons - you may need to set the PATH or other environment
variables in the crontab to get it to work.

Billk


On Wed, 2009-12-09 at 20:55 -0500, Michelle Dupuis wrote:
 Interesting...I'll try that.  Thanks
 
 
 __
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lyle 
 Giese
 Sent: Wednesday, December 09, 2009 8:47 PM
 To: Asterisk Users List
 Subject: Re: [asterisk-users] Can't restart asterisk from script
 
 
 
 Doug Lytle wrote: 
  Warren Selby wrote:

   On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca 
   mailto:supp...@ocg.ca wrote:
   
   I'm running * 1.4 and can successfully restart asterisk from the
   command
   line with:
   /usr/sbin/asterisk -r -x restart gracefully
   
   
  
  I have the following cron job:
  
  /usr/sbin/asterisk -r -x 'restart when convenient'
  
  Doug
  

 You probably don't need the single or double quotes at all.  I have 
 never used any quoting in crontab.
 
 Lyle Giese
 LCR Computer Services, Inc.
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Saludos,
Juan E. Rodríguez
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Bill Kenworthy
Yes, but if asterisk cant find some of its components due to abbreviated
path or ...

Just run a cron that prints the results from env and compare and see
if there is something obvious - there may also be privilege issues


BillK


On Wed, 2009-12-09 at 22:32 -0500, Michelle Dupuis wrote:
 I had double quotes originally - and that didn't work 
 
 -Original Message-
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Juan E.
 Rodríguez
 Sent: Wednesday, December 09, 2009 10:14 PM
 To: Asterisk Users List
 Subject: Re: [asterisk-users] Can't restart asterisk from script
 
 You should replace the single quote with double quote.
 
 --Original Message--
 From: Michelle Dupuis
 Sender: asterisk-users-boun...@lists.digium.com
 To: 'Asterisk Users List'
 ReplyTo: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: Re: [asterisk-users] Can't restart asterisk from script
 Sent: Dec 9, 2009 10:59 PM
 
 But the error message in my log shows the error to be from asterisk, so I'm
 guessing I'm sending a parameter incorrectly to asterisk - which fits with
 the no quote theory 
 
 -Original Message-
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bill Kenworthy
 Sent: Wednesday, December 09, 2009 9:31 PM
 To: Asterisk Users List
 Subject: Re: [asterisk-users] Can't restart asterisk from script
 
 Keep in mond that cron usually has a very abbreviated environment for
 security reasons - you may need to set the PATH or other environment
 variables in the crontab to get it to work.
 
 Billk
 
 
 On Wed, 2009-12-09 at 20:55 -0500, Michelle Dupuis wrote:
  Interesting...I'll try that.  Thanks
  
  
  __
  From: asterisk-users-boun...@lists.digium.com
  [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lyle 
  Giese
  Sent: Wednesday, December 09, 2009 8:47 PM
  To: Asterisk Users List
  Subject: Re: [asterisk-users] Can't restart asterisk from script
  
  
  
  Doug Lytle wrote: 
   Warren Selby wrote:
 
On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca 
mailto:supp...@ocg.ca wrote:

I'm running * 1.4 and can successfully restart asterisk from the
command
line with:
/usr/sbin/asterisk -r -x restart gracefully


   
   I have the following cron job:
   
   /usr/sbin/asterisk -r -x 'restart when convenient'
   
   Doug
   
 
  You probably don't need the single or double quotes at all.  I have 
  never used any quoting in crontab.
  
  Lyle Giese
  LCR Computer Services, Inc.
  
  
  ___
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
  
  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:
 http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 Saludos,
 Juan E. Rodríguez
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Steve Edwards
On Wed, 9 Dec 2009, Michelle Dupuis wrote:

 I'm running * 1.4 and can successfully restart asterisk from the command 
 line with: /usr/sbin/asterisk -r -x restart gracefully

 However, I have a cron job that tries to restart asterisk and gets this 
 error:

 No such command 'restart gracefully' (type 'help restart gracefully' for 
 other possible commands)

By cron job do you mean an entry in the-user-executing-asterisk's 
crontab like one of the following?

@daily /usr/sbin/asterisk -r -x restart gracefully
@daily /usr/sbin/asterisk -r -x 'restart gracefully'
@daily /usr/sbin/asterisk -r -x restart gracefully
@daily /scripts/restart-when-convenient.sh

The first 2 work, the 3rd doesn't. If you are using something like the 
4th, the error is in your script so you should post the script.

The difference between the first 2 is that 1 uses double quotes and 2 uses 
single quotes. Quotes mean pass everything between the quotes as a single 
argument. Double quotes mean evaluate any expressions or environment 
variables before passing. Single quotes mean pass everything literally, 
without evaluation or substitution.

Single quotes are better than double quotes because we already know 
there is nothing to evaluate or substitute in restart gracefully so 
there is no need to pass the quoted string through the 
evaluation/substitution code in the shell.

The 3rd doesn't work because just restart is passed as the argument to 
the x option and restart by itself is not a valid Asterisk command.

Please paste your crontab if you still need help.

-- 
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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Tzafrir Cohen
On Wed, Dec 09, 2009 at 03:28:19PM -0600, Warren Selby wrote:
 On Wed, Dec 9, 2009 at 3:08 PM, Michelle Dupuis supp...@ocg.ca wrote:
 
  I'm running * 1.4 and can successfully restart asterisk from the command
  line with:
  /usr/sbin/asterisk -r -x restart gracefully
 
  However, I have a cron job that tries to restart asterisk and gets this
  error:
  No such command 'restart gracefully' (type 'help restart gracefully' for
  other possible commands)
 
  Can anyone think of why this is happening?
 
  Thanks
 
 
 Maybe you need to escape your quotes (\restart gracefully\) in your
 script?

Huh? As you can see, Asterisk got the string as-intended. No need for
funny quoting tricks.

-- 
   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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Olivier
2009/12/9 Michelle Dupuis supp...@ocg.ca

 I'm running * 1.4 and can successfully restart asterisk from the command
 line with:
 /usr/sbin/asterisk -r -x restart gracefully

 However, I have a cron job that tries to restart asterisk and gets this
 error:
 No such command 'restart gracefully' (type 'help restart gracefully' for
 other possible commands)

 Can anyone think of why this is happening?



I've met a situation where a call remained active tough obviously, no one
was talking to anyone.
This kept gracefully restart from working.

So, would a 'restart now' behave differently ?


 Thanks


 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Tzafrir Cohen
On Thu, Dec 10, 2009 at 08:02:22AM +0100, Olivier wrote:
 2009/12/9 Michelle Dupuis supp...@ocg.ca
 
  I'm running * 1.4 and can successfully restart asterisk from the command
  line with:
  /usr/sbin/asterisk -r -x restart gracefully
 
  However, I have a cron job that tries to restart asterisk and gets this
  error:
  No such command 'restart gracefully' (type 'help restart gracefully' for
  other possible commands)
 
  Can anyone think of why this is happening?
 
 
 
 I've met a situation where a call remained active tough obviously, no one
 was talking to anyone.
 This kept gracefully restart from working.
 
 So, would a 'restart now' behave differently ?

Why would one want a daily sabotage of the system in the first place?

-- 
   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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Alex Balashov
On 12/10/2009 02:07 AM, Tzafrir Cohen wrote:

 Why would one want a daily sabotage of the system in the first place?

An apt question.

-- 
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Can't restart asterisk from script

2009-12-09 Thread Olivier
2009/12/10 Tzafrir Cohen tzafrir.co...@xorcom.com

 On Thu, Dec 10, 2009 at 08:02:22AM +0100, Olivier wrote:
  2009/12/9 Michelle Dupuis supp...@ocg.ca
 
   I'm running * 1.4 and can successfully restart asterisk from the
 command
   line with:
   /usr/sbin/asterisk -r -x restart gracefully
  
   However, I have a cron job that tries to restart asterisk and gets this
   error:
   No such command 'restart gracefully' (type 'help restart gracefully'
 for
   other possible commands)
  
   Can anyone think of why this is happening?
  
  
 
  I've met a situation where a call remained active tough obviously, no one
  was talking to anyone.
  This kept gracefully restart from working.
 
  So, would a 'restart now' behave differently ?

 Why would one want a daily sabotage of the system in the first place?


Reading this thread, I wondered why a gracefully restart wouldn't work in
the first place and focused my modest contribution on this.

You're right that a daily restart now in not recommended.
IMHO, for daily maintenance, taking this specific case (a ghost call is
keeping restart gracefully from running) into account is necessary.



 --
   Tzafrir Cohen
 icq#16849755  
 jabber:tzafrir.co...@xorcom.comjabber%3atzafrir.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 --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users