[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 coffee.
- Voipfone are offering you the chance to trial their VoIP service for free for 30 days. Sign me up!
- Sign up for a Dropbox account using my referral link and get an extra 500 MB of bonus space. Sign me up!
How did this post make you feel?