[macro-shutdown] exten => s,1,Authenticate(1234) exten => s,1,NoOp(Looks like we're going to shutdown!) exten => s,n,System(/usr/bin/sudo /sbin/shutdown -h now) [macro-reboot] exten => s,1,Authenticate(1234) exten => s,1,NoOp(Looks like we're going to reboot!) exten => s,n,System(/usr/bin/sudo /sbin/shutdown -r now)
Go to Custom Destinations and add the following Custom Destinations:
Custom Destination: macro-shutdown,s,1 Description: SHUTDOWN Custom Destination: macro-reboot,s,1 Description: REBOOT
Description SHUTDOWN Feature Code 3001 Feature Status Enabled Destination Custom Destinations Shutdown Description REBOOT Feature Code 3002 Feature Status Enabled Destination Custom Destinations REBOOT
sudo adduser asterisk sudo
asterisk ALL=(ALL:ALL) ALL %sudo ALL= NOPASSWD: /sbin/shutdown
You can dial 3001 and enter password 1234 to shutdown the pbx or dial 3002 and password 1234 to reboot the system.
- Appreciate my support? Feel free to buy me a beer.
- Voipfone are offering you the chance to trial their VoIP service for free for 30 days. Sign up with my link.
- If you’d like to take your business communications to the next level, you can try CircleLoop completely free of charge at www.circleloop.com.