Asterisk - The Open Source Telephony Project
21.4.1
|
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.
Functions | |
int | ast_stasis_system_init (void) |
Initialize the system level items for Stasis Message Bus API. More... | |
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. More... | |
struct stasis_topic * | ast_system_topic (void) |
A Stasis Message Bus API topic which publishes messages regarding system changes. More... | |
static struct ast_manager_event_blob * | cc_available_to_ami (struct stasis_message *message) |
static struct ast_manager_event_blob * | cc_callerrecalling_to_ami (struct stasis_message *message) |
static struct ast_manager_event_blob * | cc_callerstartmonitoring_to_ami (struct stasis_message *message) |
static struct ast_manager_event_blob * | cc_callerstopmonitoring_to_ami (struct stasis_message *message) |
static struct ast_manager_event_blob * | cc_failure_to_ami (struct stasis_message *message) |
static struct ast_manager_event_blob * | cc_monitorfailed_to_ami (struct stasis_message *message) |
static struct ast_manager_event_blob * | cc_offertimerstart_to_ami (struct stasis_message *message) |
static struct ast_manager_event_blob * | cc_recallcomplete_to_ami (struct stasis_message *message) |
static struct ast_manager_event_blob * | cc_requestacknowledged_to_ami (struct stasis_message *message) |
static struct ast_manager_event_blob * | cc_requested_to_ami (struct stasis_message *message) |
STASIS_MESSAGE_TYPE_DEFN (ast_network_change_type) | |
STASIS_MESSAGE_TYPE_DEFN (ast_system_registry_type,.to_ami=system_registry_to_ami,) | |
STASIS_MESSAGE_TYPE_DEFN (ast_cc_available_type,.to_ami=cc_available_to_ami,) | |
STASIS_MESSAGE_TYPE_DEFN (ast_cc_offertimerstart_type,.to_ami=cc_offertimerstart_to_ami,) | |
STASIS_MESSAGE_TYPE_DEFN (ast_cc_requested_type,.to_ami=cc_requested_to_ami,) | |
STASIS_MESSAGE_TYPE_DEFN (ast_cc_requestacknowledged_type,.to_ami=cc_requestacknowledged_to_ami,) | |
STASIS_MESSAGE_TYPE_DEFN (ast_cc_callerstopmonitoring_type,.to_ami=cc_callerstopmonitoring_to_ami,) | |
STASIS_MESSAGE_TYPE_DEFN (ast_cc_callerstartmonitoring_type,.to_ami=cc_callerstartmonitoring_to_ami,) | |
STASIS_MESSAGE_TYPE_DEFN (ast_cc_callerrecalling_type,.to_ami=cc_callerrecalling_to_ami,) | |
STASIS_MESSAGE_TYPE_DEFN (ast_cc_recallcomplete_type,.to_ami=cc_recallcomplete_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_cluster_discovery_type) | |
static void | stasis_system_cleanup (void) |
Cleanup the Stasis Message Bus API system level items. | |
static struct ast_manager_event_blob * | system_registry_to_ami (struct stasis_message *message) |
Variables | |
static struct stasis_topic * | system_topic |
The Stasis Message Bus API topic for system level changes. | |
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_register_cleanup(), STASIS_MESSAGE_TYPE_INIT, stasis_system_cleanup(), and stasis_topic_create().
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_topic(), S_OR, stasis_message_create(), and stasis_publish().
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(), manager_system_init(), pjsip_outbound_registration_metrics_init(), publish_cluster_discovery_to_stasis_full(), and stun_monitor_request().