Warning |
---|
Under Construction |
Overview
Extension state is the state of an Asterisk extension, as opposed to the direct state of a device or a user. It is the aggregate of Device state from devices mapped to the extension through a hint directive. See the States and Presence section for a diagram showing the relationship of all the various states.
...
- You may notice that the syntax for a hint is similar to a regular extension, except you use the hint keyword in place of the priority. Remember these special hint directives are used at load-time and not during run-time, so there is no need for a priority.
- Multiple devices can be mapped to an extension by providing an ampersand delimited list.
- A presence state ID is set after the device state IDs. If set with only a presence state provider you must be sure to include a blank field after the hint as in the example for extension 6005.
- Hints can be anywhere in the dialplan. Though, remember that dialplan referencing the extension and devices subscribing to it will need use the extension number/name and context. The hints shown above would be [email protected], [email protected], etc, just like regular extensions.
Querying Extension State
Once The Querying and Manipulating State section covers accessing and affecting the various types of state.
For a quick CLI example, once you have defined some hints, you can easily check from the CLI to verify they get loaded correctly.
...
In this example I was lazy, so they don't have real providers mapped otherwise you would see various states represented.
See the Querying and Manipulating State section for more about accessing the state from dialplan or Asterisk applications.
SIP Subscription to Asterisk hints
Under Construction!
Once a hint is configured, Asterisk's SIP drivers can be configured to allow SIP User Agents to subscribe to the hints. A subscription will result in state change notifications being sent to the subscriber.
Configuration for chan_sip is discussed in Configuring chan_sip for Presence Subscriptions
Configuration for res_pjsip is discussed in Configuring res_pjsip for Presence Subscriptions