System information
=== ---------------------------------------------------------
===
=============================================================
Another useful Asterisk CLI command provided by the res_ais module is used to list
the members of the AIS cluster:
*CLI> ais clm show members
=============================================================
=== Cluster Members =========================================
=============================================================
===
=== ---------------------------------------------------------
=== Node Name: 10.24.22.144
=== ==> ID: 0x9016180a
=== ==> Address: 10.24.22.144
=== ==> Member: Yes
=== ---------------------------------------------------------
===
=== ---------------------------------------------------------
=== Node Name: 10.24.22.242
=== ==> ID: 0xf216180a
=== ==> Address: 10.24.22.242
=== ==> Member: Yes
=== ---------------------------------------------------------
===
=============================================================
Testing device state changes
Now that you’ve set up and configured distributed device state using OpenAIS, there
are some simple tests that can be done using custom device states to ensure that device
states are being communicated between the servers. Start by creating a test hint in the
Asterisk dialplan, /etc/asterisk/extensions.conf:
[devstate_test]
exten => foo,hint,Custom:abc
Now, you can adjust the custom device state from the Asterisk CLI using the dialplan
set global CLI command and then check the state on each server using the core show
hints command. For example, we can use this command to set the state on one server:
pbx1*CLI> dialplan set global DEVICE_STATE(Custom:abc) INUSE
-- Global variable 'DEVICE_STATE(Custom:abc)' set to 'INUSE'
and then, check the state on another server using this command:
*CLI> core show hints
-= Registered Asterisk Dial Plan Hints =-
foo@devstatetest : Custom:abc State:InUse Watchers 0
Distributed Device States | 313