Pjsip send notify

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.

pjsip send notify reboot-yealink endpoints 203 204 205 206 207 209 210 211

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.

[root@vpbx ~]# grep yealink /etc/asterisk/vitalpbx/*.conf
pjsip_notify__10-default.conf:[yealink-check-cfg]
pjsip_notify__10-default.conf:[yealink-reboot]
sip_notify__50-events.conf:[reboot-yealink]

So the command syntax would be:

rasterisk -x ‘sip notify reboot-yealink 200’

rasterisk -x ‘pjsip send notify yealink-reboot endpoint 200’

Also Fanvil:
rasterisk -x ‘pjsip send notify yealink-reboot endpoint 111’

asterisk -x"pjsip send notify yealink-reboot "

You can enter the command fro the gui, PBX - Tools - Asterisk CLI

Do my commands help you?

You said nothing about that in your reply.

The command, pjsip send notify reboot-yealink endpoint 201 works, 201 will reboot.

I was trying to find away to do a range like, pjsip send notify reboot-yealink endpoint 201-299

I will try to find how endpoint manager does this with out any configuration changes to the phone.

I should of mentioned I’m using VitalPBX 4.0.3-5

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.

Thank you mo10

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