System information
To get started with testing out basic OpenAIS connectivity, try starting the aisexec
application in the foreground and watching the output:
$ sudo aisexec -f
For example, if you watch the output of aisexec on the first node while you bring up
the second node, you should see output that reflects that the cluster now has two
connected nodes:
Nov 13 06:55:30 corosync [CLM ] CLM CONFIGURATION CHANGE
Nov 13 06:55:30 corosync [CLM ] New Configuration:
Nov 13 06:55:30 corosync [CLM ] r(0) ip(10.24.22.144)
Nov 13 06:55:30 corosync [CLM ] r(0) ip(10.24.22.242)
Nov 13 06:55:30 corosync [CLM ] Members Left:
Nov 13 06:55:30 corosync [CLM ] Members Joined:
Nov 13 06:55:30 corosync [CLM ] r(0) ip(10.24.22.242)
Nov 13 06:55:30 corosync [TOTEM ] A processor joined or left the membership and a new
membership was formed.
Nov 13 06:55:30 corosync [MAIN ] Completed service synchronization, ready to provide
service.
If you have any trouble getting the nodes to sync up with each other,
one thing to check is that there are no firewall rules on the nodes that
are blocking the multicast traffic that is used for the nodes to commu-
nicate with each other.
Asterisk configuration
The res_ais module for Asterisk has a single configuration file, /etc/asterisk/ais.conf.
One short section is required in this file to enable distributed device state in an AIS
cluster. Place the following contents in the /etc/asterisk/ais.conf file:
[device_state]
type = event_channel
publish_event = device_state
subscribe_event = device_state
There is an Asterisk CLI command that can be used to ensure that this configuration
has been loaded properly:
*CLI> ais evt show event channels
=============================================================
=== Event Channels ==========================================
=============================================================
===
=== ---------------------------------------------------------
=== Event Channel Name: device_state
=== ==> Publishing Event Type: device_state
=== ==> Subscribing to Event Type: device_state
312 | Chapter 14: Device States