Reboot all Phones

#!/bin/bash
 
cp /etc/asterisk/sip_notify.conf /etc/asterisk/sip_notify.conf.back.$(date -I)
 
cat <<EOF>> /etc/asterisk/sip_notify.conf
[reboot-snom]
Event=>reboot
Content-Length=>0
EOF
 
cat <<EOF> /etc/asterisk/extensions.reboot.conf
exten => 666,1,System(/usr/sbin/asterisk -rx "sip notify reboot-snom pako sip2 sip3")
exten => 666,n,Hangup()
EOF
 
add "#include extensions.reboot.conf" to /etc/asterisk/extensions.conf
 
 
# Links
http://www.voip-info.org/wiki/view/Asterisk+phone+snom
http://das-asterisk-buch.de/2.1/telefone-snom.html