Contact and Presence Sharing

XiVO allow the administrator to share presence and statuses between multiple installations. For example, an enterprise could have a XiVO in each office and still be able to search, contact and view the statuses of colleagues in other offices.

This page will describe the steps that are required to configure such use case.



  1. All XiVO that you interconnect should be on the same version
  2. This configuration is only possible with XiVO 15.19 and above
  3. All ports necessary for communication should be open Network


If you are cloning a virtual machine or copy the database, the UUID of the two XiVO will be the same, you must regenerate them in the infos table of the asterisk database and restart all services. You must also remove all consul data that included the old UUID.


Telephony will be interrupted during the configuration period.


The configuration must be applied to each XiVO you want to interconnect. For example, if 6 different XiVO are to be connected, the configuration for all other XiVO should be added. This does not apply to the message bus which can use a ring policy, each XiVO talking to its two neighbours.


You should use your firewall to restrict access to the HTTP ports of consul and xivo-ctid, because they don’t have any authentication mechanism enabled.


In an architecture with a lot of XiVO, we recommend that you centralize some services, such as xivo-dird, to make your life easier. Don’t forget redundancy. This applies also to RabbitMQ and Consul. In this case, the configuration will have to be done entirely manually in YAML config files.

For this procedure, the following name and IP addresses will be used:

  • XiVO 1:
  • XiVO 2:

Add a Web Service User

The first thing is to make XiVO accept remote connections to your internal users directory. For this, you must create a Web service access by authorizing either an IP address or a login/password.

This can be done in Configuration ‣ Management ‣ Web Services Access


Configuring the directories

Add New Directory Sources for Remote XiVO

For each remote XiVO a new directory has to be created in Configuration ‣ Management ‣ Directories


We recommend doing a working configuration without certificate verification first. Once you get it working, enable certificate verification.


Add a Directory Definition for Each New Directories

To add a new directory definition, go to Services ‣ CTI Server ‣ Directories ‣ Definitions


In each directory definition, add the fields to match the configured Display filters


Add the New Definitions to Your Dird Profiles

At the moment of this writing xivo-dird profiles are mapped directly to the user’s profile. For each internal context where you want to be able to see user’s from other XiVO, add the new directory definitions in Services ‣ CTI Server ‣ Directories ‣ Direct directories.


Restart xivo-dird

To apply the new directory configuration, you can either restart from:

  • Services ‣ IPBX
  • on the command line service xivo-dird restart

Check that the Configuration is Working

At this point, you should be able to search for users on other XiVO from the People Xlet.

Configuring RabbitMQ

Create a RabbitMQ user

rabbitmqctl add_user xivo xivo
rabbitmqctl set_user_tags xivo administrator
rabbitmqctl set_permissions -p / xivo ".*" ".*" ".*"
rabbitmq-plugins enable rabbitmq_federation

Restart RabbitMQ

service rabbitmq-server restart

Setup Message Federation

rabbitmqctl set_parameter federation-upstream xivo-dev-2 '{"uri":"amqp://xivo:xivo@","max-hops":1}'  # remote IP address
rabbitmqctl set_policy federate-xivo 'xivo' '{"federation-upstream-set":"all"}' --priority 1 --apply-to exchanges

Configure xivo-ctid

Create a Custom Configuration File

Create a configuration file for xivo-ctid, e.g /etc/xivo-ctid/conf.d/interconnection.yml

  advertise_address: auto
  advertise_address_interface: eth0  # Interface bearing the IP address of this XiVO, reachable from outside

Restart xivo-ctid

service xivo-ctid restart

Check That Service Discovery is Working

apt-get install consul-cli
consul-cli agent-services --ssl --ssl-verify=false

The output should include a service names xivo-ctid with an address that is reachable from other XiVO.

{"consul": {"ID": "consul",
            "Service": "consul",
            "Tags": [],
            "Port": 8300,
            "Address": ""},
 "e546a652-e290-47e2-8519-ec3642daa6e6": {"ID": "e546a652-e290-47e2-8519-ec3642daa6e6",
                                          "Service": "xivo-ctid",
                                          "Tags": ["xivo-ctid",
                                          "Port": 9495,
                                          "Address": ""}}

Configure Consul

Stop XiVO

xivo-service stop

Remove All Consul Data

rm -rf /var/lib/consul/raft/
rm -rf /var/lib/consul/serf/
rm -rf /var/lib/consul/services/
rm -rf /var/lib/consul/tmp/
rm -rf /var/lib/consul/checks/

Configure Consul to be Reachable from Other XiVO

Add a new configuration file /etc/consul/xivo/interconnection.json with the following content where advertise_addr is reachable from other XiVO.

"client_addr": "",
"bind_addr": "",
"advertise_addr": ""  // The IP address of this XiVO, reachable from outside

Check that the Configuration is Valid

consul configtest --config-dir /etc/consul/xivo/

No output means that the configuration is valid.

Start Consul

service consul start

Start XiVO

xivo-service start

Join the Consul Cluster

Join another member of the Consul cluster. Only one join is required as members will be propagated.

consul join -wan

Check that Consul Sees other Consul

List other members of the cluster with the following command

consul members -wan

Check consul logs for problems

consul monitor

Check That Everything is Working

There is no further configuration needed, you should now be able to connect your XiVO Client and search contacts from the People Xlet. When looking up contacts of another XiVO, you should see their phone status, their user availability, and agent status dynamically.


Chances are that everything won’t work the first time, here are some interesting commands to help you debug the problem.

tail -f /var/log/xivo-dird.log
tail -f /var/log/xivo-ctid.log
tail -f /var/log/xivo-confd.log
consul monitor
consul members -wan
consul-cli agent-services --ssl --ssl-verify=false
rabbitmqctl eval 'rabbit_federation_status:status().'

What’s next?

One you get this part working, check out Phonebook Sharing.