System information

To accomplish distributed device state, some sort of messaging mechanism must be
used for the servers to communicate with each other. Two such mechanisms are sup-
ported as of Asterisk 1.8: AIS and XMPP.
Using OpenAIS
The Application Interface Specification (AIS) is a standardized set of messaging mid-
dleware APIs. The definition for the APIs is provided by the Service Availability Fo-
rum. The open source implementation of AIS that was used for the development and
testing of this functionality is OpenAIS, which is built on Corosync.
Corosync, and thus OpenAIS, is built in such a way that nodes must be located on the
same high-speed, low-latency LAN. If your deployment is geographically distributed,
you should use the XMPP-based distributed device state support, which is discussed
in “Using XMPP” on page 314.
Installation
The first step to getting the necessary components installed is to install Corosync and
OpenAIS. Corosync depends on the NSS library. Install the libnss3-dev package on
Ubuntu or the nss-devel package on CentOS.
Next, install Corosync and OpenAIS. There may be packages available, but they are
also fairly straightforward to install from source. Download the latest releases from the
Corosync and OpenAIS home pages. Then, execute the following commands to com-
pile and install each package:
$ tar xvzf corosync-1.2.8.tar.gz
$ cd corosync-1.2.8
$ ./configure
$ make
$ sudo make install
$ tar xvzf openais-1.1.4.tar.gz
$ cd openais-1.1.4
$ ./configure
$ make
$ sudo make install
If you installed Asterisk prior to installing Corosync and OpenAIS, you will need to re-
compile and reinstall Asterisk to get AIS support. Start by running the Asterisk config-
ure script. The configure script is responsible for inspecting the system to find out which
optional dependencies can be found so that the build system knows which modules
can be built:
$ cd /path/to/asterisk
$ ./configure
310 | Chapter 14:Device States