Is it possible to send a pjsip message to a range of yealink devices, I would like to reboot 100 phones with 1 command. I know I can put every phone on a list but a range would be better.
Phones Provisioning should be able to do this. Checkmark in multiple phones and then hit reboot.
And there is a .conf file where you should see what it is doing with the yearlink phones to restart.
How did you think you could trigger this?
Found this in my docs
The asterisk command is notify. The notify type is reboot-yealink or yealink-reboot according to a grep of the conf files.
Shell script for example.
Do a for while loop or just put in many lines of the notify.
#!/bin/bash
for ((num=200; num<=1200; num++))
do
echo "Executing: rasterisk -x 'sip notify reboot-yealink $num'"
rasterisk -x "sip notify reboot-yealink $num"
# You can add a sleep command here if you want to introduce a delay between each execution
# sleep 1 # 1-second delay
done
chmod +x reboot_loop.sh
./reboot_loop.sh
You can then do a custom context which will run the shell script.
There are many ways.
same => n,Shell(/root/reboot_loop.sh)
Or System() command.
And i bet the Phone Provisioning will do it exactly the same. Every phone with a command.
That script works great, I changed it a little and ran a test for ext 200 → 205 and all phones rebooted.
#!/bin/bash
for ((num=200; num<=205; num++))
do
echo "Executing: rasterisk -x 'pjsip send notify reboot-yealink endpoint $num'"
rasterisk -x "pjsip send notify reboot-yealink endpoint $num"
# You can add a sleep command here if you want to introduce a delay between each execution
sleep 1 # 1-second delay
done