Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Stasis Messages and Data Types for System events. More...
#include "asterisk.h"
#include "asterisk/astobj2.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_system.h"
Go to the source code of this file.
Variables | |
static struct stasis_topic * | system_topic |
The Stasis Message Bus API topic for system level changes. More... | |
Stasis Messages and Data Types for System events.
Definition in file stasis_system.c.
int ast_stasis_system_init | ( | void | ) |
Initialize the system level items for Stasis Message Bus API.
Initialize the stasis system topic and message types.
Definition at line 373 of file stasis_system.c.
References ast_cc_available_type(), ast_cc_callerrecalling_type(), ast_cc_callerstartmonitoring_type(), ast_cc_callerstopmonitoring_type(), ast_cc_failure_type(), ast_cc_monitorfailed_type(), ast_cc_offertimerstart_type(), ast_cc_recallcomplete_type(), ast_cc_requestacknowledged_type(), ast_cc_requested_type(), ast_cluster_discovery_type(), ast_network_change_type(), ast_register_cleanup(), ast_system_registry_type(), STASIS_MESSAGE_TYPE_INIT, stasis_system_cleanup(), stasis_topic_create(), and system_topic.
Referenced by asterisk_daemon().
void ast_system_publish_registry | ( | const char * | channeltype, |
const char * | username, | ||
const char * | domain, | ||
const char * | status, | ||
const char * | cause | ||
) |
Publish a channel driver outgoing registration message.
channeltype | The channel driver that published the message |
username | The username that was used to register |
domain | The domain that was used to register |
status | The result of the registration |
cause | The reason for the result |
Definition at line 118 of file stasis_system.c.
References ao2_ref, ast_json_pack(), ast_json_payload_create(), ast_json_unref(), ast_system_registry_type(), ast_system_topic(), S_OR, stasis_message_create(), stasis_publish(), and status.
Referenced by handle_registration_response(), and iax2_publish_registry().
struct stasis_topic * ast_system_topic | ( | void | ) |
A Stasis Message Bus API topic which publishes messages regarding system changes.
NULL | on error |
Definition at line 347 of file stasis_system.c.
References system_topic.
Referenced by ast_system_publish_registry(), cc_publish(), load_module(), manager_system_init(), network_change_stasis_subscribe(), pjsip_outbound_registration_metrics_init(), publish_cluster_discovery_to_stasis_full(), publish_format_update(), and stun_monitor_request().
|
static |
Definition at line 185 of file stasis_system.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), EVENT_FLAG_CC, ast_json_payload::json, service, and stasis_message_data().
|
static |
Definition at line 284 of file stasis_system.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), EVENT_FLAG_CC, ast_json_payload::json, and stasis_message_data().
|
static |
Definition at line 269 of file stasis_system.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), EVENT_FLAG_CC, ast_json_payload::json, and stasis_message_data().
|
static |
Definition at line 254 of file stasis_system.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), EVENT_FLAG_CC, ast_json_payload::json, and stasis_message_data().
|
static |
Definition at line 314 of file stasis_system.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), EVENT_FLAG_CC, ast_json_payload::json, and stasis_message_data().
|
static |
Definition at line 332 of file stasis_system.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), EVENT_FLAG_CC, ast_json_payload::json, and stasis_message_data().
|
static |
Definition at line 203 of file stasis_system.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), EVENT_FLAG_CC, ast_json_payload::json, and stasis_message_data().
|
static |
Definition at line 299 of file stasis_system.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), EVENT_FLAG_CC, ast_json_payload::json, and stasis_message_data().
|
static |
Definition at line 239 of file stasis_system.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), EVENT_FLAG_CC, ast_json_payload::json, and stasis_message_data().
|
static |
Definition at line 221 of file stasis_system.c.
References ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), EVENT_FLAG_CC, ast_json_payload::json, and stasis_message_data().
STASIS_MESSAGE_TYPE_DEFN | ( | ast_cc_available_type | , |
. | to_ami = cc_available_to_ami |
||
) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_cc_callerrecalling_type | , |
. | to_ami = cc_callerrecalling_to_ami |
||
) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_cc_callerstartmonitoring_type | , |
. | to_ami = cc_callerstartmonitoring_to_ami |
||
) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_cc_callerstopmonitoring_type | , |
. | to_ami = cc_callerstopmonitoring_to_ami |
||
) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_cc_failure_type | , |
. | to_ami = cc_failure_to_ami |
||
) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_cc_monitorfailed_type | , |
. | to_ami = cc_monitorfailed_to_ami |
||
) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_cc_offertimerstart_type | , |
. | to_ami = cc_offertimerstart_to_ami |
||
) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_cc_recallcomplete_type | , |
. | to_ami = cc_recallcomplete_to_ami |
||
) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_cc_requestacknowledged_type | , |
. | to_ami = cc_requestacknowledged_to_ami |
||
) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_cc_requested_type | , |
. | to_ami = cc_requested_to_ami |
||
) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_cluster_discovery_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_network_change_type | ) |
STASIS_MESSAGE_TYPE_DEFN | ( | ast_system_registry_type | , |
. | to_ami = system_registry_to_ami |
||
) |
|
static |
Cleanup the Stasis Message Bus API system level items.
Definition at line 353 of file stasis_system.c.
References ao2_cleanup, ast_cc_available_type(), ast_cc_callerrecalling_type(), ast_cc_callerstartmonitoring_type(), ast_cc_callerstopmonitoring_type(), ast_cc_failure_type(), ast_cc_monitorfailed_type(), ast_cc_offertimerstart_type(), ast_cc_recallcomplete_type(), ast_cc_requestacknowledged_type(), ast_cc_requested_type(), ast_cluster_discovery_type(), ast_network_change_type(), ast_system_registry_type(), NULL, STASIS_MESSAGE_TYPE_CLEANUP, and system_topic.
Referenced by ast_stasis_system_init().
|
static |
Definition at line 152 of file stasis_system.c.
References ast_free, ast_json_object_get(), ast_json_string_get(), ast_manager_event_blob_create(), ast_str_buffer(), ast_str_create, ast_str_set(), ast_strlen_zero(), EVENT_FLAG_SYSTEM, ast_json_payload::json, NULL, RAII_VAR, stasis_message_data(), and status.
|
static |
The Stasis Message Bus API topic for system level changes.
Definition at line 68 of file stasis_system.c.
Referenced by ast_stasis_system_init(), ast_system_topic(), manager_system_init(), and stasis_system_cleanup().