Asterisk - The Open Source Telephony Project GIT-master-7805f28
|
#include "asterisk.h"
#include "asterisk/channel.h"
#include "asterisk/astobj2.h"
#include "channelstorage.h"
#include "channel_private.h"
Go to the source code of this file.
Data Structures | |
struct | ast_channel_iterator |
struct | ast_channelstorage_driver_pvt |
Macros | |
#define | getdb(driver) (driver->handle->handle) |
Functions | |
static void | __startup (void) |
static int | active_channels (struct ast_channelstorage_instance *driver) |
returns number of active/allocated channels More... | |
static int | by_exten_cb (void *obj, void *arg, void *data, int flags) |
static int | by_name_cb (void *obj, void *arg, void *data, int flags) |
static int | by_uniqueid_cb (void *obj, void *arg, void *data, int flags) |
static struct ast_channel * | callback (struct ast_channelstorage_instance *driver, ao2_callback_data_fn *cb_fn, void *arg, void *data, int ao2_flags) |
static int | channel_cmp_cb (void *obj_left, void *obj_right, int flags) |
static void | close_instance (struct ast_channelstorage_instance *driver) |
static int | delete_channel (struct ast_channelstorage_instance *driver, struct ast_channel *chan, int lock) |
static struct ast_channel * | get_by_exten (struct ast_channelstorage_instance *driver, const char *exten, const char *context) |
static struct ast_channel * | get_by_name_prefix (struct ast_channelstorage_instance *driver, const char *name, size_t name_len) |
static struct ast_channel * | get_by_uniqueid (struct ast_channelstorage_instance *driver, const char *uniqueid) |
static struct ast_channelstorage_instance * | get_instance (const char *name) |
static int | hash_cb (const void *obj, const int flags) |
static int | insert_channel (struct ast_channelstorage_instance *driver, struct ast_channel *chan, int flags, int lock) |
static struct ast_channel_iterator * | iterator_all_new (struct ast_channelstorage_instance *driver) |
static struct ast_channel_iterator * | iterator_by_exten_new (struct ast_channelstorage_instance *driver, const char *exten, const char *context) |
static struct ast_channel_iterator * | iterator_by_name_new (struct ast_channelstorage_instance *driver, const char *name, size_t name_len) |
static struct ast_channel_iterator * | iterator_destroy (struct ast_channelstorage_instance *driver, struct ast_channel_iterator *i) |
static struct ast_channel * | iterator_next (struct ast_channelstorage_instance *driver, struct ast_channel_iterator *i) |
static void | lock_driver (struct ast_channelstorage_instance *driver) |
static void | prnt_channel_key (void *v_obj, void *where, ao2_prnt_fn *prnt) |
static void | unlock_driver (struct ast_channelstorage_instance *driver) |
Variables | |
static struct ast_channelstorage_instance | channelstorage_instance |
static struct ast_channelstorage_driver | driver_type |
#define getdb | ( | driver | ) | (driver->handle->handle) |
Definition at line 30 of file channelstorage_ao2_legacy.c.
|
static |
Definition at line 392 of file channelstorage_ao2_legacy.c.
References ast_channelstorage_register_driver(), and driver_type.
|
static |
returns number of active/allocated channels
Definition at line 61 of file channelstorage_ao2_legacy.c.
References ao2_container_count(), and getdb.
Referenced by ast_active_channels(), and really_quit().
|
static |
Definition at line 94 of file channelstorage_ao2_legacy.c.
References ast_channel_context(), ast_channel_exten(), ast_channel_lock, ast_channel_unlock, CMP_MATCH, voicemailpwcheck::context, ast_channel::data, and ast_channel::exten.
Referenced by get_by_exten(), and iterator_by_exten_new().
|
static |
Definition at line 72 of file channelstorage_ao2_legacy.c.
References ast_channel_lock, ast_channel_name(), ast_channel_unlock, CMP_MATCH, CMP_STOP, ast_channel::data, ast_channel::flags, name, and OBJ_MULTIPLE.
Referenced by get_by_name_prefix(), and iterator_by_name_new().
|
static |
Definition at line 112 of file channelstorage_ao2_legacy.c.
References ast_channel_lock, ast_channel_uniqueid(), ast_channel_unlock, ast_log, ast_strlen_zero(), CMP_MATCH, CMP_STOP, ast_channel::data, LOG_ERROR, and ast_channel::uniqueid.
Referenced by get_by_name_prefix(), and get_by_uniqueid().
|
static |
Definition at line 66 of file channelstorage_ao2_legacy.c.
References ao2_callback_data, ast_channel::data, and getdb.
Referenced by __stasis_subscribe(), __stasis_subscribe_pool(), application_tuple_alloc(), ast_ari_invoke(), ast_bridge_channel_queue_callback(), ast_bridge_channel_write_callback(), ast_bridge_dtmf_hook(), ast_bridge_features_do(), ast_bridge_features_register(), ast_bridge_features_set_limits(), ast_bridge_hangup_hook(), ast_bridge_interval_hook(), ast_bridge_interval_register(), ast_bridge_join_hook(), ast_bridge_leave_hook(), ast_bridge_move_hook(), ast_bridge_set_after_callback(), ast_bridge_talk_detector_hook(), ast_cc_callback(), ast_channel_callback(), ast_devstate_prov_add(), ast_dial_set_state_callback(), ast_dns_query_set_resolve_async(), ast_dns_resolve_async(), ast_dns_resolve_recurring(), ast_io_add(), ast_io_change(), ast_mwi_subscribe_pool(), ast_netsock_bind(), ast_netsock_bindaddr(), ast_presence_state_prov_add(), ast_sched_add(), ast_sched_add_variable(), ast_sched_replace(), ast_sched_replace_variable(), ast_search_dns(), ast_sip_send_out_of_dialog_request(), ast_sip_send_request(), ast_sip_session_media_add_read_callback(), ast_sip_session_media_set_write_callback(), AST_TEST_DEFINE(), ast_udptl_set_callback(), ast_websocket_add_protocol(), ast_websocket_remove_protocol(), ast_websocket_server_add_protocol(), ast_websocket_server_remove_protocol(), bridge_hook_generic(), bridge_other_hook(), channelstorage_by_exten(), channelstorage_by_uniqueid(), cli_aor_iterate(), cli_channel_iterate(), cli_channelstats_iterate(), cli_contact_iterate(), cli_endpoint_iterate(), cli_iterate(), cli_iterator(), cli_unid_iterate(), command_create(), dahdi_cc_callback(), db_execute_sql(), defer_action(), dns_parse_answer(), dns_query_alloc(), get_by_exten(), get_by_name_prefix(), get_by_uniqueid(), iax2_sched_add(), iax2_sched_replace(), iax_firmware_traverse(), internal_stasis_subscribe(), iterator_by_exten_new(), iterator_by_name_new(), messaging_app_subscribe_endpoint(), payload_helper_cb(), play_message_callerid(), prometheus_callback_register(), prometheus_callback_unregister(), realtime_sqlite3_exec_query(), realtime_sqlite3_exec_query_with_handle(), route_table_add(), scrape_metrics(), send_request_data_alloc(), stasis_message_router_add(), stasis_message_router_add_cache_update(), stasis_message_router_set_default(), stasis_message_router_set_formatters_default(), stasis_state_subscribe_pool(), unload_module(), websocket_add_protocol_internal(), and websocket_remove_protocol_internal().
|
static |
Definition at line 326 of file channelstorage_ao2_legacy.c.
References ast_channel_name(), CMP_MATCH, ast_channel::flags, OBJ_SEARCH_KEY, OBJ_SEARCH_MASK, OBJ_SEARCH_OBJECT, and OBJ_SEARCH_PARTIAL_KEY.
Referenced by get_instance().
|
static |
Definition at line 287 of file channelstorage_ao2_legacy.c.
References ao2_container_unregister(), ao2_ref, ast_debug, ast_free, getdb, ast_channelstorage_instance::handle, ast_channelstorage_instance::name, and NULL.
Referenced by get_instance().
|
static |
Definition at line 52 of file channelstorage_ao2_legacy.c.
References ao2_unlink, getdb, and ast_channel::linked_in_container.
|
static |
Definition at line 246 of file channelstorage_ao2_legacy.c.
References by_exten_cb(), callback(), voicemailpwcheck::context, and ast_channel::exten.
Referenced by ast_channel_get_by_exten().
|
static |
Definition at line 224 of file channelstorage_ao2_legacy.c.
References ast_strlen_zero(), by_name_cb(), by_uniqueid_cb(), callback(), name, NULL, and OBJ_KEY.
Referenced by channelstorage_by_name_prefix_or_uniqueid().
|
static |
Definition at line 214 of file channelstorage_ao2_legacy.c.
References by_uniqueid_cb(), callback(), and ast_channel::uniqueid.
Referenced by ast_channel_get_by_uniqueid(), channelstorage_by_name_prefix_or_uniqueid(), and do_ids_conflict().
|
static |
Definition at line 349 of file channelstorage_ao2_legacy.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_container_register(), ast_calloc, ast_debug, ast_log, AST_NUM_CHANNEL_BUCKETS, channel_cmp_cb(), channelstorage_instance, close_instance(), getdb, ast_channelstorage_instance::handle, hash_cb(), LOG_ERROR, ast_channelstorage_instance::name, name, NULL, and prnt_channel_key().
|
static |
Definition at line 255 of file channelstorage_ao2_legacy.c.
References ast_channel_name(), ast_str_case_hash(), ast_strlen_zero(), ast_channel::flags, name, and OBJ_KEY.
Referenced by get_instance().
|
static |
Definition at line 42 of file channelstorage_ao2_legacy.c.
References ao2_link_flags, getdb, and ast_channel::linked_in_container.
|
static |
Definition at line 194 of file channelstorage_ao2_legacy.c.
References ast_channel_iterator::active_iterator, ao2_iterator_init(), ast_calloc, getdb, NULL, and ast_channel_iterator::simple_iterator.
Referenced by ast_channel_iterator_all_new().
|
static |
Definition at line 152 of file channelstorage_ao2_legacy.c.
References ast_channel_iterator::active_iterator, ast_calloc, ast_free, by_exten_cb(), callback(), voicemailpwcheck::context, NULL, and OBJ_MULTIPLE.
Referenced by ast_channel_iterator_by_exten_new().
|
static |
Definition at line 173 of file channelstorage_ao2_legacy.c.
References ast_channel_iterator::active_iterator, ast_calloc, ast_free, by_name_cb(), callback(), name, NULL, OBJ_KEY, and OBJ_MULTIPLE.
Referenced by ast_channel_iterator_by_name_new().
|
static |
Definition at line 143 of file channelstorage_ao2_legacy.c.
References ast_channel_iterator::active_iterator, ao2_iterator_destroy(), ast_free, and NULL.
Referenced by ast_channel_iterator_destroy().
|
static |
Definition at line 208 of file channelstorage_ao2_legacy.c.
References ast_channel_iterator::active_iterator, and ao2_iterator_next.
Referenced by ast_channel_iterator_next().
|
static |
Definition at line 32 of file channelstorage_ao2_legacy.c.
|
static |
Definition at line 277 of file channelstorage_ao2_legacy.c.
References ast_channel_name().
Referenced by get_instance().
|
static |
Definition at line 37 of file channelstorage_ao2_legacy.c.
References ao2_unlock, and getdb.
|
static |
Definition at line 306 of file channelstorage_ao2_legacy.c.
Referenced by get_instance().
|
static |
Definition at line 387 of file channelstorage_ao2_legacy.c.
Referenced by __startup(), and ast_channelstorage_register_driver().