Philipp von Klitzing
2003-Dec-02 06:44 UTC
[Asterisk-Users] How to restart * thru phone "when convenient"
Hi there, here is my attempt to initiate a "restart when convenient" from a software SIP phone. exten => 588,1,Answer exten => 588,2,Wait(1) exten => 588,3,Playback(restart-convenient) exten => 588,4,Wait(1) exten => 588,5,Authenticate(00000) exten => 588,6,System(/usr/sbin/asterisk -rx "restart when convenient") exten => 588,7,Hangup The problem: We never reach the "convenient" state because the SIP client will stay connected until priority 6 has been executed - so I locked myself in basically. Any suggestion how to accomplish this? With "restart now" there is no problem, but that's not what I want... BTW: Where exactly is the difference between Hangup and Softhangup()? Cheers, Philipp
Cees de Groot
2003-Dec-02 07:13 UTC
[Asterisk-Users] Re: How to restart * thru phone "when convenient"
Philipp von Klitzing <asterisk-users@lists.digium.com> said:>exten => 588,6,System(/usr/sbin/asterisk -rx "restart when convenient") >Put an & behind the line? -- Cees de Groot http://www.tric.nl <cg@tric.nl> tric, the new way helpdesk/ticketing software, VoIP/CTI, web applications, custom development
Steven Critchfield
2003-Dec-02 07:30 UTC
[Asterisk-Users] How to restart * thru phone "when convenient"
On Tue, 2003-12-02 at 07:44, Philipp von Klitzing wrote:> Hi there, > > here is my attempt to initiate a "restart when convenient" from a > software SIP phone. > > exten => 588,1,Answer > exten => 588,2,Wait(1) > exten => 588,3,Playback(restart-convenient) > exten => 588,4,Wait(1) > exten => 588,5,Authenticate(00000) > exten => 588,6,System(/usr/sbin/asterisk -rx "restart when convenient") > exten => 588,7,Hangup > > The problem: We never reach the "convenient" state because the SIP client > will stay connected until priority 6 has been executed - so I locked > myself in basically. Any suggestion how to accomplish this? With "restart > now" there is no problem, but that's not what I want...You could use "at" to issue the command at a deferred time. You could always determine what you think is causing trouble that needs a restart and fix it. You could cron this so it happens regularly and therefore doesn't need a phone call to do it.> BTW: Where exactly is the difference between Hangup and Softhangup()?Hangup is something done in the course of the dialplan and works on the current channel where softhangup is a cli command that works on a named channel. -- Steven Critchfield <critch@basesys.com>
Philipp von Klitzing
2003-Dec-02 09:50 UTC
[Asterisk-Users] How to restart * thru phone "when convenient"
Hi!> > exten => 588,1,Answer > > exten => 588,2,Wait(1) > > exten => 588,3,Playback(restart-convenient) > > exten => 588,4,Wait(1) > > exten => 588,5,Authenticate(00000) > > exten => 588,6,System(/usr/sbin/asterisk -rx "restart when convenient") > > exten => 588,7,Hangup > > > > The problem: We never reach the "convenient" state because the SIP client > > will stay connected until priority 6 has been executed - so I locked > > myself in basically. Any suggestion how to accomplish this? With "restart > > now" there is no problem, but that's not what I want...> >exten => 588,6,System(/usr/sbin/asterisk -rx "restart when convenient") > > > Put an & behind the line?It does help to get a proper hang up for the client, but there is no restart initiated at all... looks like now the system calls gets cancelled due to the fact that the client is gone.> You could use "at" to issue the command at a deferred time.Yes, sure, but this ain't that nice "asterisk only". :->> You could always determine what you think is causing trouble that needs > a restart and fix it.In case you are interested as to why I am doing this (MGCP): http://bugs.digium.com/bug_view_page.php?bug_id=0000611>You could cron this so it happens regularly and therefore > doesn't needa phone call to do it. That is already in place just in case there is no-one with knowledge around to trigger the reset when it is needed. However I don't want to restart too often... Cheers, Philipp