Is there a was to reset asterisk by dialing? Eg *99 and have it execute the commands to stop now and restart? Also eg *56 to reload? The reason for the restart command is over the weekend it started acting weird, the voice got really choppy and aver i restarted asterisk it was fine. We are just in testing right now but it would be nice to know how to do this if it were to happen again and im not here or cant SSH in to restart it. I could tell the users to dial *99 to fix the problem. Kyle -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040426/16bcc973/attachment.htm
sure... just dial-an-agi (tm) :) seriously, just write down an agi script (c/bash/perl/php/whatever) that is called from an exten, like exten => 1234,1,Agi(restart.php) (restart.php must be an agi script written by you and located under /var/lib/asterisk/agi-bin) or use app_system... exten => 1234,1,System("/usr/sbin/asterisk -rx reload") blah blah blah :) matteo. Il lun, 2004-04-26 alle 20:06, Kyle Hagan ha scritto:> Is there a was to reset asterisk by dialing? Eg *99 and have it > execute the commands to stop now and restart? > > Also eg *56 to reload? > > The reason for the restart command is over the weekend it started > acting weird, the voice got really choppy and aver i restarted > asterisk it was fine. We are just in testing right now but it would be > nice to know how to do this if it were to happen again and im not here > or cant SSH in to restart it. I could tell the users to dial *99 to > fix the problem. > > Kyle-- Brancaleoni Matteo <mbrancaleoni@espia.it> Espia - Emmegi Srl
Use System command in extensions.conf, or use AGI to do this. -----Mensaje original----- De: asterisk-users-admin@lists.digium.com [mailto:asterisk-users-admin@lists.digium.com]En nombre de Kyle Hagan Enviado el: Lunes, 26 de Abril de 2004 03:06 p.m. Para: asterisk-users@lists.digium.com Asunto: [Asterisk-Users] Resetting Asterisk Is there a was to reset asterisk by dialing? Eg *99 and have it execute the commands to stop now and restart? Also eg *56 to reload? The reason for the restart command is over the weekend it started acting weird, the voice got really choppy and aver i restarted asterisk it was fine. We are just in testing right now but it would be nice to know how to do this if it were to happen again and im not here or cant SSH in to restart it. I could tell the users to dial *99 to fix the problem. Kyle -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040426/266db26f/attachment.htm
Hello. Kyle Hagan wrote:> '/bin/sh: line 1: /usr/sbin/asterisk -rx reload: No such file > or directory'.It looks like /bin/sh is being given your entire command line as a single argument. If /bin/sh were unable to find /usr/sbin/asterisk its error should look like: '/bin/sh: line 1: /usr/sbin/asterisk: No such file or directory' Instead it is looking for /usr/sbin/asterisk\ -rx\ reload (as if it were the complete filename) You may need to either modify your exten entry to something like: (I'm not sure if this syntax works in Asterisk) exten => *99,1,System("/usr/sbin/asterisk","-rx","reload") Or just create a shell script (i.e. /usr/local/sbin/reload-asterisk.sh) that you can call using: exten => *99,1,System("/usr/local/sbin/reload-asterisk.sh") The script could be as simple as: #!/bin/sh /usr/sbin/asterisk -rx reload ... Just an idea. -- Tony Kava Senior Network Administrator Pottawattamie County, Iowa
> Use System command in extensions.conf, or use AGI to do this.> Is there a was to reset asterisk by dialing? Eg *99 and have it execute > the commands to stop now and restart?Example: exten => 123,1,System(/usr/sbin/asterisk -rx reload >&/dev/null) Be warned: Don't reload to often, Asterisk is very likely to become unstable. Make sure you have a daily CRON "restart" (or "restart when convenient") if you do daily "reloads". Cheers, Philipp