How to add ability to FreePBX to reload Yealink config without a reboot



  • The point of this is to be able to tell a Yealink phone to check its provisioning file without having to go to the phone or have a user reboot their phone.

    Rebooting would also work, but that can be disruptive to the user if their computer is connected to their phone.

    This is a two part change.
    First you need to add the sip notify command. You can call it whatever you want, but there is already an existing command to reboot. so we will just duplicate that and tweak.

    Open /etc/asterisk/sip_notify_custom.conf and put this in it. The file will likely be empty. You can edit it from the CLI or the FreePBX web GUI

    [reload-yealink]
    Event=>check-sync\;reboot=false
    

    I am not certain what level of restart is required for certian, but if the normal fwconsole reload doesn't cause this to work, just reboot.

    Next you need to change the existing config file for your Yealink phones.
    You need to add this line.

    sip.notify_reboot_enable = 0
    

    This is what that option does:

    It configures the IP phone behavior when receiving a SIP NOTIFY message which contains the header “Event: check-sync”.

    0-The IP phone will reboot only if the SIP NOTIFY message contains an additional string “reboot=true”.

    1-The IP phone will be forced to reboot. (This is the default setting)

    2-The IP phone will ignore the SIP NOTIFY message.

    So technically the command in step one could simply be check-sync, but I like the clear false showing there.

    Now reboot your phone so it pulls the new config file telling that it nno longer has to reboot.

    Finally you are ready to test this.

    Manually change something on your phone or change something in the config file on the server.

    SSH into your PBX and issue the command to reload the config on your extension.

    asterisk -rx 'pjsip send notify reload-yealink endpoint 103`
    

    The setting you manually changed should revert, or the change from the config file should be applied. which ever method you did for testing.

    ModEdit: corrected spelling.



  • @jaredbusch said in How to add ability to FreePBX to reload Yealink config without a reboot:

    ModEdit: corrected spelling.

    Hahahahahahahahahahahha





  • The downside to this is that the FreePBX team simply implemented the no reboot flag to the existing reboot-yealink command. unlike the multiple commands for the Sangoma phones.

    0_1543282841223_bc79c9df-ec75-492b-a23b-d976e99dd85a-image.png

    So this means, you have no way to reboot Yealink phones at all with a built in sip notify command.