Skip to Main Content
Asterisk: The Definitive Guide, 5th Edition
book

Asterisk: The Definitive Guide, 5th Edition

by Jim Van Meggelen, Russell Bryant, Leif Madsen
June 2019
Intermediate to advanced content levelIntermediate to advanced
412 pages
11h 4m
English
O'Reilly Media, Inc.
Book available
Content preview from Asterisk: The Definitive Guide, 5th Edition

Chapter 13. Device States

Out of clutter, find simplicity.

Albert Einstein

It is often useful to be able to determine the state of the devices that are attached to a telephone system. For example, a receptionist might require the ability to see the statuses of everyone in the office in order to determine whether somebody can take a phone call. Asterisk itself needs this same information. As another example, if you were building a call queue, as discussed in Chapter 12, Asterisk needs to know when an agent is available so that another call can be delivered. This chapter discusses device state concepts in Asterisk, as well as how devices and applications use and access this information.

Device States

There are two categories of devices that Asterisk provides state information for: channel devices (such as PJSIP endpoints) and virtual devices (which are built-in services that one might wish to monitor, such as conference rooms).

To reference the state of a channel, you do so in exactly the same way you would with Dial(), for example DEVICE_STATE(PJSIP/000f300B0B02), whereas to reference the state of a virtual device, the format is virtual device type:identifier, for example DEVICE_STATE(ConfBridge:1234).

Virtual devices include things that are inside Asterisk but provide useful state information (see Table 13-1).

Table 13-1. Devices for which Asterisk can provide state information
DeviceDescription
PJSIP/channel nameMany channels can have their state monitored, but the PJSIP channel offers ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

UNIX and Linux System Administration Handbook, 5th Edition

UNIX and Linux System Administration Handbook, 5th Edition

Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin
TCP/IP Guide

TCP/IP Guide

Charles M. Kozierok
Asterisk: The Definitive Guide, 4th Edition

Asterisk: The Definitive Guide, 4th Edition

Russell Bryant, Leif Madsen, Jim Van Meggelen

Publisher Resources

ISBN: 9781492031598Errata PageSupplemental Content