Action: ExtensionState
Parameters: Exten, Context, ActionID
SEND:
Context: default
Exten: idonno
ActionID: 1
RECEIVE:
ActionID: 1
Message: Extension Status
Exten: idonno
Context: default
Hint:
Status: -1
Status codes:
-1 = Extension not found
0 = Idle
1 = In Use
2 = Busy
4 = Unavailable
8 = Ringing
16 = On Hold
Back
NOTE:
Status codes are BIT SHIFTED and can be COMBINED, ie you could receive a 9 indicating Ringing (8) and In use (1)
see source in /include/asterisk/pbx.h
/*! \brief Extension states
\note States can be combined
– \ref AstExtState
- /
enum ast_extension_states {
AST_EXTENSION_REMOVED = -2, /*!< Extension removed */
AST_EXTENSION_DEACTIVATED = -1, /*!< Extension hint removed */
AST_EXTENSION_NOT_INUSE = 0, /*!< No device INUSE or BUSY */
AST_EXTENSION_INUSE = 1 << 0, /*!< One or more devices INUSE */
AST_EXTENSION_BUSY = 1 << 1, /*!< All devices BUSY */
AST_EXTENSION_UNAVAILABLE = 1 << 2, /*!< All devices UNAVAILABLE/UNREGISTERED */
AST_EXTENSION_RINGING = 1 << 3, /*!< All devices RINGING */
AST_EXTENSION_ONHOLD = 1 << 4, /*!< All devices ONHOLD */
};