Asterisk - The Open Source Telephony Project
18.5.0
|
The Asterisk Management Interface - AMI (MWI event handling) More...
#include "asterisk.h"
#include "asterisk/manager.h"
#include "asterisk/app.h"
#include "asterisk/mwi.h"
#include "asterisk/channel.h"
#include "asterisk/stasis_message_router.h"
#include "asterisk/stasis.h"
Go to the source code of this file.
Functions | |
static int | exclude_event_cb (const char *key) |
Callback function used by mwi_app_event_cb to weed out "Event" keys. More... | |
int | manager_mwi_init (void) |
Initialize support for AMI MWI events. More... | |
static void | manager_mwi_shutdown (void) |
static void | mwi_app_event_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
Generic MWI event callback used for one-off events from voicemail modules. More... | |
static void | mwi_update_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
Variables | |
struct stasis_message_router * | mwi_state_router |
static struct stasis_forward * | topic_forwarder |
The Stasis Message Bus API subscription returned by the forwarding of the MWI topic to the manager topic. More... | |
The Asterisk Management Interface - AMI (MWI event handling)
Definition in file manager_mwi.c.
|
static |
Callback function used by mwi_app_event_cb to weed out "Event" keys.
Definition at line 46 of file manager_mwi.c.
Referenced by mwi_app_event_cb().
int manager_mwi_init | ( | void | ) |
Initialize support for AMI MWI events.
0 | on success |
non-zero | on error |
Definition at line 153 of file manager_mwi.c.
References ast_manager_get_message_router(), ast_manager_get_topic(), ast_mwi_state_type(), ast_mwi_topic_all(), ast_mwi_vm_app_type(), ast_register_cleanup(), manager_mwi_shutdown(), manager_topic, mwi_app_event_cb(), mwi_update_cb(), NULL, stasis_forward_all(), and stasis_message_router_add().
Referenced by subscribe_all().
|
static |
Definition at line 147 of file manager_mwi.c.
References NULL, and stasis_forward_cancel().
Referenced by manager_mwi_init().
|
static |
Generic MWI event callback used for one-off events from voicemail modules.
Definition at line 55 of file manager_mwi.c.
References ast_free, ast_json_object_get(), ast_json_string_get(), ast_log, AST_LOG_WARNING, ast_manager_build_channel_state_string(), ast_manager_str_from_json_object(), ast_str_buffer(), ast_mwi_blob::blob, EVENT_FLAG_CALL, exclude_event_cb(), manager_event, ast_mwi_blob::mwi_state, NULL, RAII_VAR, ast_mwi_state::snapshot, stasis_message_data(), and ast_mwi_state::uniqueid.
Referenced by manager_mwi_init().
|
static |
Definition at line 86 of file manager_mwi.c.
References AS_OR, ast_app_has_voicemail(), ast_free, ast_manager_build_channel_state_string(), ast_mwi_state_type(), EVENT_FLAG_CALL, manager_event, ast_mwi_state::new_msgs, NULL, ast_mwi_state::old_msgs, RAII_VAR, ast_mwi_state::snapshot, stasis_message_data(), stasis_message_type(), and ast_mwi_state::uniqueid.
Referenced by manager_mwi_init().
struct stasis_message_router* mwi_state_router |
Definition at line 35 of file manager_mwi.c.
|
static |
The Stasis Message Bus API subscription returned by the forwarding of the MWI topic to the manager topic.
Definition at line 43 of file manager_mwi.c.