On Thursday 06 Apr 2017, Atux Atux wrote: > hi. i would like to be able to reboot the system from my extension. is that > possible? if yes, how?
It's possible, with something this in extensions.conf; exten => 999999,1,NoOp(Restarting server now) exten => 999999,n,System(shutdown -r now) Then dial 999999. NB this is UNTESTED, for obvious reasons! You probably do not want this extension to be in a context that anyone besides you can access. And if you are not running Asterisk as root, then you will need to write a C wrapper around the shutdown binary and make it setuid root. But just because it is possible, does not mean it is not a really, really terrible idea. The real question is, WHY are you wanting to be able to reboot your server from your extension? Because there is almost certainly a better way of achieving whatever it is that you are hoping to achieve. -- JM or AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk . -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users