Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

PRESENCE_STATE()

Synopsis

Get or Set a presence state.

Description

The PRESENCE_STATE function can be used to retrieve the presence from any presence provider. For example:

NoOp(SIP/mypeer has presence ${PRESENCE_STATE(SIP/mypeer,value)})

NoOp(Conference number 1234 has presence message ${PRESENCE_STATE(MeetMe:1234,message)})

The PRESENCE_STATE function can also be used to set custom presence state from the dialplan. The CustomPresence: prefix must be used. For example:

Set(PRESENCE_STATE(CustomPresence:lamp1)=away,temporary,Out to lunch)

Set(PRESENCE_STATE(CustomPresence:lamp2)=dnd,,Trying to get work done)

You can subscribe to the status of a custom presence state using a hint in the dialplan:

exten => 1234,hint,CustomPresence:lamp1

The possible values for both uses of this function are:

not_set | unavailable | available | away | xa | chat | dnd

Syntax

PRESENCE_STATE(provider,field[,options])
Arguments
  • provider - The provider of the presence, such as CustomPresence
  • field - Which field of the presence state information is wanted.
    • value - The current presence, such as away
    • subtype - Further information about the current presence
    • message - A custom message that may indicate further details about the presence
  • options
    • e - Base-64 encode the data.

Import Version

This documentation was imported from Asterisk Version SVN-trunk-r370328

  • No labels