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.
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().
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)