File Synchronization

When using XDS architecture one should activate the File Synchronization between XiVO Main and MDS.


  1. One must initialize the configuration on XiVO Main: refer to XDS File Synchronization section in Installation page.


    What does the initialization do ? The xivo-xds-sync -i is to be run on XiVO Main and will:

    1. generate a ssh key pair: ~/.ssh/rsync_xds and ~/.ssh/
    2. copy the public key to /usr/share/xivo-certs/
    3. make the public key available at https://XIVO_HOST/ssh-key/
    4. create cron job /etc/cron.d/xivo-xds-sync to schedule the synchronization
  2. The configuration on MDS is automatic when installing a new MDS.


    What does the MDS install script do ? When running the script it will:

    1. get the XiVO Main pub key from https://XIVO_HOST/ssh-key/
    2. and put it in the ssh authorized_keys

What is synchronized ?

Synchronized dirs

  • /etc/asterisk/extensions_extra.d

  • /var/lib/xivo/moh

  • /var/lib/xivo/sounds

  • /var/lib/xivo/sounds/recordings


    Specifically this /var/lib/xivo/sounds/recordings directory is synchronized both ways:

    • from Main to each MDS
    • and then from each MDS to Main


    Because of the both ways sync, it means that the deletion of files in this folder won’t be taken into account. Deleting a file will delete it on (for example) the Main, but during next sync, it will be retrieved back from the MDS. If you want to delete/clean this folder you currently need to:

    1. Delete it on Main:

      rm /var/lib/xivo/sounds/recordings/*.wav
    2. And then delete it also on each MDS:

      ssh -i /root/.ssh/rsync_xds root@MDS_IP "rm /var/lib/xivo/sounds/recordings/*.wav"

Synchronization period

Every 15 min


  • Files in the above listed folders prefixed with xds_override won’t be synchronized.


    For example if you create on the XiVO Main the file /etc/asterisk/extensions_extra.d/xds_override_mydialplan.conf, it won’t be synchronized to the other MDS.

  • Files in /etc/asterisk/extensions_extra.d/ are not overriden on MDS. It means that if you create on MDS1 a file in /etc/asterisk/extensions_extra.d/ it will remain on MDS1 (as long as the filename is not the same as one on the XiVO Main).


All files are synchronized to every configured MDS (MDS as defined in Configuration ‣ Management ‣ Media Servers).


And therefore uses the MDS so-called VoIP IP address.


Dialplan (dialplan reload) and MOH (moh reload) are reloaded on each MDS after each synchronization.

Logging and Troubleshooting

All the script logs are logged in /var/log/syslog. All logs are prefixed with xivo-xds-sync prefix. You can run the following command to get the logs:

grep xivo-xds-sync /var/log/syslog

To see what the script is doing/will do you can run it in dry mode:

xivo-xds-sync -n