From a15c767684ade9eaae7f303c7fc19da0bf58c8d3 Mon Sep 17 00:00:00 2001 From: poslop Date: Wed, 22 Apr 2026 12:28:42 -0500 Subject: [PATCH] Update readme.md --- readme.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 942c9b8..cce8ce2 100644 --- a/readme.md +++ b/readme.md @@ -1,12 +1,16 @@ ## Gen PC Sidecar Script The files are stored typically inside of `/var/lib/asterisk/PC-Contact-Sync` and the scripts should be run every 6 hours by a cron job. +Make sure that all files are owned by asterisk user including the output files and the cronjob. +
## Quickstart #### Config Fields `config.json` has several fields. The config file needs to be next to the script in order to be read. +See the example [config.json](./config.json) included. +
⚠️ Warning: Make sure the config follows proper json syntax. @@ -31,13 +35,20 @@ prepend_extensions
#### Cronjob Example +Create the cronjob as asterisk user. + +``` +EDITOR=vim crontab -e -u asterisk +``` + +Append this to the crontab ``` # Run Polycom directory sync every 4 hours at :00 0 */4 * * * /usr/bin/php /var/lib/asterisk/PC-Contact-Sync/gen_polycom_directory.php --notify >> /var/log/gen_polycom_directory.log 2>&1 # Run PC sidecar sync every 4 hours at :05 (5 mins after) -10 */4 * * * /usr/bin/php /var/lib/asterisk/PC-Contact-Sync/gen_pc_sidecar.php >> /var/log/gen_pc_sidecar.log 2>&1 +5 */4 * * * /usr/bin/php /var/lib/asterisk/PC-Contact-Sync/gen_pc_sidecar.php >> /var/log/gen_pc_sidecar.log 2>&1 ```