System information

Chapter 20 discusses the Asterisk Manager Interface (AMI). The Get
Var manager action can be used to retrieve device state values in an
external program. You can use it to get the value of either a normal
variable or a dialplan function, such as DEVICE_STATE().
The following list includes the possible values that will come back from the
DEVICE_STATE() function:
UNKNOWN
NOT_INUSE
INUSE
BUSY
INVALID
UNAVAILABLE
RINGING
RINGINUSE
ONHOLD
Extension States
Extension states are another important concept in Asterisk. Extension states are what
SIP devices subscribe to for presence information. (SIP presence is discussed in more
detail in “SIP Presence” on page 306). The state of an extension is determined by
checking the state of one or more devices. The list of devices that map to extension
states is defined in the Asterisk dialplan, /etc/asterisk/extensions.conf, using a special
hint directive. Figure 14-2 shows the mapping between devices, device states, and
extension states.
Hints
To define an extension state hint in the dialplan, the keyword hint is used in place of
a priority. Here is a simple example dialplan that relates to Figure 14-2:
[default]
exten => 1234,hint,SIP/phoneA&SIP/phoneB&SIP/phoneC
exten => 5555,hint,DAHDI/1
exten => 31337,hint,MeetMe:31337
Extension States | 303
Downloa d f r o m W o w ! e B o o k < w w w.woweb o o k . c o m >