System information

If you would like to dive deeper into the processing of distributed device state changes,
there are some useful debug messages that can be enabled. First, enable debug on the
Asterisk console in /etc/asterisk/logger.conf. Then, enable debugging at the Asterisk
CLI:
*CLI> core set debug 1
With the debug output enabled, you will see some messages that show how Asterisk
is processing each state change. When the state of a device changes on one server,
Asterisk checks the state information it has for that device on all servers and determines
the overall device state. The following examples illustrate:
*CLI> dialplan set global DEVICE_STATE(Custom:abc) NOT_INUSE
-- Global variable 'DEVICE_STATE(Custom:abc)' set to 'NOT_INUSE'
[Nov 13 13:27:12] DEBUG[14801]: devicestate.c:652
handle_devstate_change: Processing device state change for 'Custom:abc'
[Nov 13 13:27:12] DEBUG[14801]: devicestate.c:602
process_collection: Adding per-server state of 'Not in use' for 'Custom:abc'
[Nov 13 13:27:12] DEBUG[14801]: devicestate.c:602
process_collection: Adding per-server state of 'Not in use' for 'Custom:abc'
[Nov 13 13:27:12] DEBUG[14801]: devicestate.c:609
process_collection: Aggregate devstate result is 'Not in use' for 'Custom:abc'
[Nov 13 13:27:12] DEBUG[14801]: devicestate.c:631
process_collection: Aggregate state for device 'Custom:abc' has changed to
'Not in use'
*CLI> dialplan set global DEVICE_STATE(Custom:abc) INUSE
-- Global variable 'DEVICE_STATE(Custom:abc)' set to 'INUSE'
[Nov 13 13:29:30] DEBUG[14801]: devicestate.c:652 handle_devstate_change:
Processing device state change for 'Custom:abc'
[Nov 13 13:29:30] DEBUG[14801]: devicestate.c:602 process_collection:
Adding per-server state of 'Not in use' for 'Custom:abc'
[Nov 13 13:29:30] DEBUG[14801]: devicestate.c:602 process_collection:
Adding per-server state of 'In use' for 'Custom:abc'
[Nov 13 13:29:30] DEBUG[14801]: devicestate.c:609 process_collection:
Aggregate devstate result is 'In use' for 'Custom:abc'
[Nov 13 13:29:30] DEBUG[14801]: devicestate.c:631 process_collection:
Aggregate state for device 'Custom:abc' has changed to 'In use'
Using XMPP
The eXtensible Messaging and Presence Protocol (XMPP), formerly (and still com-
monly) known as Jabber, is an IETF standardized communications protocol. It is most
commonly known as an IM protocol, but it can be used for a number of other interesting
applications as well. The XMPP Standards Foundation (XSF) works to standardize
extensions to the XMPP protocol. One such extension, referred to as PubSub, provides
a publish/subscribe mechanism.
314 | Chapter 14:Device States