Steve Totaro escribió:
On Wed, Feb 27, 2008 at 10:26 AM, Alex Balashov
<[EMAIL PROTECTED]> wrote:
bilal ghayyad wrote:
 > Hi All;
 >
 > How can I configure Asterisk in that way:
 >
 > If I entered code (from my mobile when I call to the
 > Asterisk or from any Internal Phone), then the machine
 > do restart. I need this when I am far from the office
 > and I need to restart the machine and I do not have
 > Internet connection.

 The safest way is to call an AGI script (or System command or whatever)
 from the dial plan that uses some IPC mechanism to pass a message to an
 outside cron job that runs periodically and checks for this flag, and if
 so, restarts asterisk from the CLI ('asterisk -r -x 'stop now'; sleep
 10; asterisk).

 The sleep is desirable because the 'stop now' command is asynchronous
 and Asterisk does not necessarily shut down instantaneously when you
 issue it.

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


The way I read the OP, he wishes to reboot the box, not just restart
asterisk.  In which case, simply having
exten=777,1,Authenticate(whatever)
exten=777,n,System(reboot)

Would be the easiest and somewhat protected way of rebooting.

Thanks,
Steve Totaro
If asterisk is not running as root allow asterisk user to reboot adding to /etc/sudoers for example and...
exten=777,n,system(sudo reboot)


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

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

Reply via email to