How to backup your Yealink local contacts to the FreePBX provisioning directory
-
Back in 2016 or so, Yelaink added the ability to automatically upload your local contacts everytime you made a change.
But because everything I do uses HTTP, there was no easy way to get the files up to the provisioning directory.
Well 2 weeks ago, @xrobau posted a small script to github to handle Polycom requirements that the log files be uploaded on reboot, etc (hate these phones btw).
A couple days ago I had a user complaint remind me that Yealink added this functionality and boom the two thoughts connected.
I just banged this out tonight and tested it on my T46G desk phone. It works perfectly.
https://github.com/sorvani/freepbx-helper-scripts/tree/master/Backup_Yealink_Local_Contacts
- Download and copy the
put.yealink
file to the/tftfpboot
directory - Give Asterisk ownership of the file
chown asterisk:asterisk /tftpboot/put.yealink
- Download and copy the
yealink.conf
file to the/etc/httpd/conf.d
directory - Restart Apache
systemctl restart httpd
- Edit your provisioning file to enable the remote backup
static.auto_provision.local_contact.backup.enable= 1
- Edit your provisioning file with the URL
static.auto_provision.local_contact.backup.path =
- HTTPS:
https://pbx.domain.com:1443
- HTTP:
http://pbx.domain.com:84
- Or it could include a username and password
https://123456:[email protected]:1443
- Or if you have the Commerical EPM use this in basfile edit:
__provisionAddress__
- HTTPS:
- Reprovision or reboot your phone to pick up the change
- Edit one of your local contacts once to force it to upload the file
- Download and copy the
-
If you upgrade to FreePBX 16, the script handler needs updated to reflect PHP7.
The
git
repository is updated, but if you have an existing install, this will fix it for yousudo sed -i "s/php5/php7/" /etc/httpd/conf.d/yealink.conf sudo systemctl restart httpd