Update readme.md

This commit is contained in:
2026-04-22 12:28:42 -05:00
parent 59f7f77ca0
commit a15c767684
+12 -1
View File
@@ -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.
<br>
## 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.
<br>
<div style="border-left: 6px solid #FFA500; padding: 10px;">
<strong>⚠️ Warning:</strong> Make sure the config follows proper json syntax.
@@ -31,13 +35,20 @@ prepend_extensions
<br>
#### 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
```
<br>