|
Asterisk - The Open Source Telephony Project GIT-master-6144b6b
|
#include "asterisk/pbx.h"

Go to the source code of this file.
Data Structures | |
| struct | ast_extension_state_device_snapshot |
| Device snapshot for an extension state. More... | |
| struct | ast_extension_state_device_state_info |
| Individual device states that contributed to snapshot. More... | |
| struct | ast_extension_state_presence_snapshot |
| Presence snapshot for an extension state. More... | |
| struct | ast_extension_state_remove_message |
| Stasis message for extension state removal message. More... | |
| struct | ast_extension_state_update_message |
| Stasis message for extension state update message. More... | |
Functions | |
| struct ast_channel * | ast_extension_state_get_device_causing_channel (const char *device, enum ast_device_state device_state) |
| Get the channel that is causing the device to be in the given state, if any. | |
| struct ast_extension_state_device_snapshot * | ast_extension_state_get_latest_device_snapshot (struct ast_channel *chan, const char *exten, const char *context) |
| Get the latest device state message for an extension. | |
| struct ast_extension_state_presence_snapshot * | ast_extension_state_get_latest_presence_snapshot (struct ast_channel *chan, const char *exten, const char *context) |
| Get the latest presence state message for an extension. | |
| struct stasis_message_type * | ast_extension_state_remove_message_type (void) |
| Get extension state remove message type. | |
| struct stasis_topic * | ast_extension_state_topic (const char *exten, const char *context) |
| Get the Stasis topic to receive extension state messages for a specific extension. | |
| struct stasis_topic * | ast_extension_state_topic_all (void) |
| Get the Stasis topic to receive all extension state messages. | |
| struct stasis_message_type * | ast_extension_state_update_message_type (void) |
| Get extension state update message type. | |
API providing extension state management.
Definition in file extension_state.h.
| struct ast_channel * ast_extension_state_get_device_causing_channel | ( | const char * | device, |
| enum ast_device_state | device_state | ||
| ) |
Get the channel that is causing the device to be in the given state, if any.
| device | The device itself |
| device_state | The state of the device |
| NULL | if there is no channel causing the device to be in the given state |
Definition at line 1070 of file extension_state.c.
References ast_channel_creationtime(), ast_channel_iterator_by_name_new(), ast_channel_iterator_destroy(), ast_channel_iterator_next(), ast_channel_lock, AST_CHANNEL_NAME, ast_channel_ref, ast_channel_unlock, ast_channel_unref, AST_DEVICE_BUSY, AST_DEVICE_INUSE, AST_DEVICE_INVALID, AST_DEVICE_NOT_INUSE, AST_DEVICE_ONHOLD, AST_DEVICE_RINGING, AST_DEVICE_RINGINUSE, AST_DEVICE_TOTAL, AST_DEVICE_UNAVAILABLE, AST_DEVICE_UNKNOWN, AST_STATE_BUSY, AST_STATE_RINGING, AST_STATE_UP, ast_tvcmp(), match(), and NULL.
Referenced by extension_state_legacy_create_device_state_info().
| struct ast_extension_state_device_snapshot * ast_extension_state_get_latest_device_snapshot | ( | struct ast_channel * | chan, |
| const char * | exten, | ||
| const char * | context | ||
| ) |
Get the latest device state message for an extension.
| chan | The optional channel to get the underlying hint from, if it needs to be created |
| exten | The extension to get the device state message for |
| context | The context of the extension |
| NULL | if the extension does not have a configured hint |
Definition at line 1317 of file extension_state.c.
References ao2_bump, ao2_lock, ao2_ref, ao2_unlock, extension_state_get(), and NULL.
Referenced by ast_extension_state(), and ast_extension_state_extended().
| struct ast_extension_state_presence_snapshot * ast_extension_state_get_latest_presence_snapshot | ( | struct ast_channel * | chan, |
| const char * | exten, | ||
| const char * | context | ||
| ) |
Get the latest presence state message for an extension.
| chan | The optional channel to get the underlying hint from, if it needs to be created |
| exten | The extension to get the presence state message for |
| context | The context of the extension |
| NULL | if the extension does not have a configured hint |
Definition at line 1336 of file extension_state.c.
References ao2_bump, ao2_lock, ao2_ref, ao2_unlock, extension_state_get(), and NULL.
Referenced by ast_hint_presence_state().
| struct stasis_message_type * ast_extension_state_remove_message_type | ( | void | ) |
Get extension state remove message type.
| Stasis | message type for extension state remove messages |
Referenced by ast_extension_state_init(), extension_state_cleanup(), extension_state_legacy_add_destroy(), and extension_state_remove_message_create().
| struct stasis_topic * ast_extension_state_topic | ( | const char * | exten, |
| const char * | context | ||
| ) |
Get the Stasis topic to receive extension state messages for a specific extension.
| exten | The extension to receive extension state messages for |
| context | The context of the extension |
| NULL | if it has not been allocated |
Definition at line 1299 of file extension_state.c.
References ao2_bump, ao2_lock, ao2_ref, ao2_unlock, extension_state_get(), and NULL.
Referenced by extension_state_legacy_add_destroy().
| struct stasis_topic * ast_extension_state_topic_all | ( | void | ) |
Get the Stasis topic to receive all extension state messages.
| NULL | if it has not been allocated |
Definition at line 1294 of file extension_state.c.
References extension_state_topic_all.
Referenced by extension_state_legacy_add_destroy().
| struct stasis_message_type * ast_extension_state_update_message_type | ( | void | ) |
Get extension state update message type.
| Stasis | message type for extension state update messages |
Referenced by ast_extension_state_init(), extension_state_cleanup(), extension_state_device_state_cb(), extension_state_legacy_add_destroy(), extension_state_presence_state_cb(), and extension_state_update_sources().