Asterisk - The Open Source Telephony Project GIT-master-0644429
|
Stasis endpoint API. More...
#include "asterisk.h"
#include "asterisk/astobj2.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_endpoints.h"
Go to the source code of this file.
Variables | |
static struct stasis_cp_all * | endpoint_cache_all |
Stasis endpoint API.
Definition in file stasis_endpoints.c.
struct ast_json * ast_endpoint_snapshot_to_json | ( | const struct ast_endpoint_snapshot * | snapshot, |
const struct stasis_message_sanitizer * | sanitize | ||
) |
Build a JSON object from a ast_endpoint_snapshot.
snapshot | Endpoint snapshot. |
sanitize | The message sanitizer to use on the snapshot |
NULL | on error |
Definition at line 398 of file stasis_endpoints.c.
References ast_assert, ast_endpoint_state_to_string(), ast_json_array_append(), ast_json_integer_create(), ast_json_object_get(), ast_json_object_set(), ast_json_pack(), ast_json_string_create(), ast_json_unref(), stasis_message_sanitizer::channel_id, ast_endpoint_snapshot::channel_ids, ast_endpoint_snapshot::max_channels, NULL, ast_endpoint_snapshot::num_channels, ast_endpoint_snapshot::resource, ast_endpoint_snapshot::state, and ast_endpoint_snapshot::tech.
Referenced by ast_ari_endpoints_get(), ast_ari_endpoints_list(), ast_ari_endpoints_list_by_tech(), contactstatus_to_json(), message_received_handler(), multi_user_event_to_json(), peerstatus_to_json(), and simple_endpoint_event().
int ast_endpoint_stasis_init | ( | void | ) |
Initialization function for endpoint stasis support.
Definition at line 458 of file stasis_endpoints.c.
References ast_endpoint_contact_state_type(), ast_endpoint_snapshot_type(), ast_endpoint_state_type(), ast_register_cleanup(), endpoint_cache_all, endpoint_snapshot_get_id(), endpoints_stasis_cleanup(), stasis_cp_all_create(), and STASIS_MESSAGE_TYPE_INIT.
Referenced by asterisk_daemon().
|
static |
Definition at line 203 of file stasis_endpoints.c.
References ast_free, ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), ast_str_append(), ast_str_buffer(), ast_str_create, ast_endpoint_blob::blob, EVENT_FLAG_SYSTEM, NULL, RAII_VAR, stasis_message_data(), and value.
|
static |
Definition at line 237 of file stasis_endpoints.c.
References ast_endpoint_snapshot_to_json(), ast_json_object_get(), ast_json_pack(), ast_json_string_get(), ast_json_timeval(), ast_json_unref(), ast_strlen_zero(), ast_endpoint_blob::blob, NULL, ast_endpoint_blob::snapshot, stasis_message_data(), and stasis_message_timestamp().
|
static |
Definition at line 286 of file stasis_endpoints.c.
References ao2_cleanup, and ast_json_unref().
Referenced by ast_endpoint_blob_create().
|
static |
Callback extract a unique identity from a snapshot message.
This identity is unique to the underlying object of the snapshot, such as the UniqueId field of a channel.
message | Message to extract id from. |
NULL | if the message_type of the message isn't a handled snapshot. |
Definition at line 384 of file stasis_endpoints.c.
References ast_endpoint_snapshot_type(), ast_endpoint_snapshot::id, NULL, stasis_message_data(), and stasis_message_type().
Referenced by ast_endpoint_stasis_init().
|
static |
Definition at line 448 of file stasis_endpoints.c.
References ao2_cleanup, ast_endpoint_contact_state_type(), ast_endpoint_snapshot_type(), ast_endpoint_state_type(), endpoint_cache_all, NULL, and STASIS_MESSAGE_TYPE_CLEANUP.
Referenced by ast_endpoint_stasis_init().
|
static |
Definition at line 128 of file stasis_endpoints.c.
References ast_free, ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), ast_str_append(), ast_str_buffer(), ast_str_create, ast_endpoint_blob::blob, EVENT_FLAG_SYSTEM, NULL, RAII_VAR, ast_endpoint_snapshot::resource, ast_endpoint_blob::snapshot, stasis_message_data(), ast_endpoint_snapshot::tech, and value.
|
static |
Definition at line 163 of file stasis_endpoints.c.
References ast_endpoint_snapshot_to_json(), ast_json_object_create(), ast_json_object_update(), ast_json_pack(), ast_json_timeval(), ast_json_unref(), ast_endpoint_blob::blob, NULL, ast_endpoint_blob::snapshot, stasis_message_data(), and stasis_message_timestamp().
STASIS_MESSAGE_TYPE_DEFN | ( | ast_endpoint_contact_state_type | , |
. | to_ami = contactstatus_to_ami , |
||
. | to_json = contactstatus_to_json |
||
) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_endpoint_snapshot_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_endpoint_state_type | , |
. | to_ami = peerstatus_to_ami , |
||
. | to_json = peerstatus_to_json |
||
) |
|
static |
Definition at line 104 of file stasis_endpoints.c.
Referenced by ast_endpoint_cache(), ast_endpoint_cache_all(), ast_endpoint_stasis_init(), ast_endpoint_topic_all(), ast_endpoint_topic_all_cached(), and endpoints_stasis_cleanup().