Example1: Setting both the user state and message using SetVar action in conjunction with PRESENCE_STATE() dialplan function.
Action: Setvar
ActionID:1234
Variable: PRESENCE_STATE(CustomPresence:Batman)
Value:away,In the batcave, Making a new batch of batarangs
Example2: Setting state information that must be base64 encoded because it contains newlines and/or commas.
Action: Setvar
ActionID:1234
Variable: PRESENCE_STATE(CustomPresence:Batman)
Value:away,ISDW982KLJ90==,20DJKL23JK==,e
Example3: Reading user state and message using GetVar action.
Action: Getvar
ActionID:1234
Variable: PRESENCE_STATE(CustomPresence:Batman,value)
Action: Getvar
ActionID:1234
Variable: PRESENCE_STATE(CustomPresence:Batman,subtype)
Action: Getvar
ActionID:1234
Variable: PRESENCE_STATE(CustomPresence:Batman,message)
Example4: Reading subtype and message fields as base64 values.
Action: Getvar
ActionID:1234
Variable: PRESENCE_STATE(CustomPresence:Batman,subtype,e)
Action: Getvar
ActionID:1234
Variable: PRESENCE_STATE(CustomPresence:Batman,message,e)
User Presence in the DPMA
The DPMA does all of the user presence manipulation of the CustomPresence providers behind the scenes. Phones subscribe to a set of user
extensions to receive both device state and user presence updates. The DPMA is in change of defining the hints the phones subscribe to, and
mapping those hints to the correct device state and presence state providers. When a phone user updates their user presence, the DPMA
internally updates that user's CustomPresence provider to reflect the change using the PRESENCE_STATE() dialplan function. This results in any
watcher of the hint mapped to that CustomPresence provider receiving an update indicating the new user presence.
...
v20120424.1