Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

The fundamentals of how user presence is represented in Asterisk mirrors the concepts currently used with device state. Device state changes are triggered by device state providers.

Code Block
borderStylesolid
titleExample Device State provider mapped to extension.
borderStylesolid
A hint for extension 1111 is mapped to the sip peer 1111 device state provider.  In this example, endpoints subscribing to hint 1111 will receive a device state update anytime the device state changes for sip peer 1111.

exten => 1111,hint,SIP/1111

exten => 1111,1,Dial(SIP/1111)

Using the same pattern, user presence is changed by a CustomPresence user presence provider. A CustomPresence provider works in the same way a Custom device state provider does. CustomPresence providers are both defined and updated using a dialplan function, PRESENCE_STATE().

Code Block
borderStylesolid
titleExample Device State and Presence State providers mapped to a single extension.
borderStylesolid
A hint for extension 1111 is mapped to both the sip peer 1111 device state provider and the CustomerPresence:1111 user presence provider.  Endpoints subscribing to hint 1111 will receive both device state and user presence notifications for extension 1111.

exten => 1111,hint,SIP/1111,CustomPresence:1111

exten => 1111,1,Dial(SIP/1111)

...