Asterisk - The Open Source Telephony Project
18.5.0
|
Data Structures | |
struct | actions |
list of actions registered More... | |
struct | all_events |
struct | ast_manager_user |
user descriptor, as read from the config file. More... | |
struct | eventqent |
struct | fast_originate_helper |
helper function for originate More... | |
struct | manager_hooks |
list of hooks registered More... | |
struct | mansession |
In case you didn't read that giant block of text above the mansession_session struct, the struct mansession is named this solely to keep the API the same in Asterisk. This structure really represents data that is different from Manager action to Manager action. The mansession_session pointer contained within points to session-specific data. More... | |
struct | mansession_session |
struct | permalias |
struct | users |
list of users found in the config file More... | |
Macros | |
#define | any_manager_listeners(sessions) ((sessions && ao2_container_count(sessions)) || !AST_RWLIST_EMPTY(&manager_hooks)) |
#define | ASTMAN_APPEND_BUF_INITSIZE 256 |
initial allocated size for the astman_append_buf and astman_send_*_va More... | |
#define | DEFAULT_REALM "asterisk" |
#define | EVENT_FLAG_SHUTDOWN -1 |
Fake event class used to end sessions at shutdown. More... | |
#define | GET_HEADER_FIRST_MATCH 0 |
#define | GET_HEADER_LAST_MATCH 1 |
#define | GET_HEADER_SKIP_EMPTY 2 |
#define | MANAGER_EVENT_BUF_INITSIZE 256 |
#define | manager_event_sessions(sessions, category, event, contents, ...) __manager_event_sessions(sessions, category, event, 0, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, contents , ## __VA_ARGS__) |
#define | MAX_AUTH_PERM_STRING 150 |
#define | MAX_BLACKLIST_CMD_LEN 2 |
Descriptor for a manager session, either on the AMI socket or over HTTP. More... | |
#define | MAX_VARS 128 |
#define | MGR_SHOW_TERMINAL_WIDTH 80 |
#define | MSG_MOREDATA ((char *)astman_send_response) |
Functions | |
int | __ast_manager_event_multichan (int category, const char *event, int chancount, struct ast_channel **chans, const char *file, int line, const char *func, const char *fmt,...) |
static const char * | __astman_get_header (const struct message *m, char *var, int mode) |
Return a matching header value. More... | |
static void | __init_astman_append_buf (void) |
thread local buffer for astman_append More... | |
static void | __init_manager_event_buf (void) |
static void | __init_userevent_buf (void) |
static int | __manager_event_sessions (struct ao2_container *sessions, int category, const char *event, int chancount, struct ast_channel **chans, const char *file, int line, const char *func, const char *fmt,...) |
static int | __manager_event_sessions_va (struct ao2_container *sessions, int category, const char *event, int chancount, struct ast_channel **chans, const char *file, int line, const char *func, const char *fmt, va_list ap) |
static void | acl_change_stasis_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | acl_change_stasis_subscribe (void) |
static void | acl_change_stasis_unsubscribe (void) |
static int | action_aocmessage (struct mansession *s, const struct message *m) |
static int | action_atxfer (struct mansession *s, const struct message *m) |
static int | action_blind_transfer (struct mansession *s, const struct message *m) |
static int | action_cancel_atxfer (struct mansession *s, const struct message *m) |
static int | action_challenge (struct mansession *s, const struct message *m) |
static int | action_command (struct mansession *s, const struct message *m) |
Manager command "command" - execute CLI command. More... | |
static int | action_coresettings (struct mansession *s, const struct message *m) |
Show PBX core settings information. More... | |
static int | action_coreshowchannels (struct mansession *s, const struct message *m) |
Manager command "CoreShowChannels" - List currently defined channels and some information about them. More... | |
static int | action_corestatus (struct mansession *s, const struct message *m) |
Show PBX core status information. More... | |
static int | action_createconfig (struct mansession *s, const struct message *m) |
static void | action_destroy (void *obj) |
static int | action_events (struct mansession *s, const struct message *m) |
static int | action_extensionstate (struct mansession *s, const struct message *m) |
static int | action_filter (struct mansession *s, const struct message *m) |
Manager command to add an event filter to a manager session. More... | |
static struct manager_action * | action_find (const char *name) |
static int | action_getconfig (struct mansession *s, const struct message *m) |
static int | action_getconfigjson (struct mansession *s, const struct message *m) |
static int | action_getvar (struct mansession *s, const struct message *m) |
static int | action_hangup (struct mansession *s, const struct message *m) |
static int | action_listcategories (struct mansession *s, const struct message *m) |
static int | action_listcommands (struct mansession *s, const struct message *m) |
static int | action_loggerrotate (struct mansession *s, const struct message *m) |
Manager command "LoggerRotate" - reloads and rotates the logger in the same manner as the CLI command 'logger rotate'. More... | |
static int | action_login (struct mansession *s, const struct message *m) |
static int | action_logoff (struct mansession *s, const struct message *m) |
static int | action_mailboxcount (struct mansession *s, const struct message *m) |
static int | action_mailboxstatus (struct mansession *s, const struct message *m) |
static int | action_originate (struct mansession *s, const struct message *m) |
static int | action_ping (struct mansession *s, const struct message *m) |
static int | action_presencestate (struct mansession *s, const struct message *m) |
static int | action_redirect (struct mansession *s, const struct message *m) |
action_redirect: The redirect manager command More... | |
static int | action_reload (struct mansession *s, const struct message *m) |
Send a reload event. More... | |
static int | action_sendtext (struct mansession *s, const struct message *m) |
static int | action_setvar (struct mansession *s, const struct message *m) |
static int | action_status (struct mansession *s, const struct message *m) |
Manager "status" command to show channels. More... | |
static int | action_timeout (struct mansession *s, const struct message *m) |
static int | action_updateconfig (struct mansession *s, const struct message *m) |
static int | action_userevent (struct mansession *s, const struct message *m) |
static int | action_waitevent (struct mansession *s, const struct message *m) |
static struct eventqent * | advance_event (struct eventqent *e) |
static | AO2_GLOBAL_OBJ_STATIC (mgr_sessions) |
static | AO2_GLOBAL_OBJ_STATIC (event_docs) |
A container of event documentation nodes. More... | |
static int | aocmessage_get_unit_entry (const struct message *m, struct ast_aoc_unit_entry *entry, unsigned int entry_num) |
static void | append_channel_vars (struct ast_str **pbuf, struct ast_channel *chan) |
static int | append_event (const char *str, int category) |
events are appended to a queue from where they can be dispatched to clients. More... | |
int | ast_hook_send_action (struct manager_custom_hook *hook, const char *msg) |
access for hooks to send action messages to ami More... | |
static int | ast_instring (const char *bigstr, const char *smallstr, const char delim) |
int | ast_manager_check_enabled (void) |
Check if AMI is enabled. More... | |
struct stasis_message_router * | ast_manager_get_message_router (void) |
Get the stasis_message_router for AMI. More... | |
struct stasis_topic * | ast_manager_get_topic (void) |
Get the Stasis Message Bus API topic for AMI. More... | |
void | ast_manager_publish_event (const char *type, int class_type, struct ast_json *obj) |
Publish an event to AMI. More... | |
int | ast_manager_register2 (const char *action, int auth, int(*func)(struct mansession *s, const struct message *m), struct ast_module *module, const char *synopsis, const char *description) |
register a new command with manager, including online help. This is the preferred way to register a manager command More... | |
void | ast_manager_register_hook (struct manager_custom_hook *hook) |
Add a custom hook to be called when an event is fired. More... | |
static int | ast_manager_register_struct (struct manager_action *act) |
struct ast_str * | ast_manager_str_from_json_object (struct ast_json *blob, key_exclusion_cb exclusion_cb) |
Convert a JSON object into an AMI compatible string. More... | |
int | ast_manager_unregister (const char *action) |
support functions to register/unregister AMI action handlers, More... | |
void | ast_manager_unregister_hook (struct manager_custom_hook *hook) |
Delete a custom hook to be called when an event is fired. More... | |
int | ast_webmanager_check_enabled (void) |
Check if AMI/HTTP is enabled. More... | |
void | astman_append (struct mansession *s, const char *fmt,...) |
static void | astman_append_headers (struct message *m, const struct ast_variable *params) |
Append additional headers into the message structure from params. More... | |
static void | astman_append_json (struct mansession *s, const char *str) |
static void | astman_flush (struct mansession *s, struct ast_str *buf) |
static void | astman_free_headers (struct message *m) |
Free headers inside message structure, but not the message structure itself. More... | |
const char * | astman_get_header (const struct message *m, char *var) |
Return the first matching variable from an array. More... | |
struct ast_variable * | astman_get_variables (const struct message *m) |
Get a linked list of the Variable: headers. More... | |
struct ast_variable * | astman_get_variables_order (const struct message *m, enum variable_orders order) |
Get a linked list of the Variable: headers with order specified. More... | |
void | astman_send_ack (struct mansession *s, const struct message *m, char *msg) |
Send ack in manager transaction. More... | |
void | astman_send_error (struct mansession *s, const struct message *m, char *error) |
Send error in manager transaction. More... | |
void | astman_send_error_va (struct mansession *s, const struct message *m, const char *fmt,...) |
Send error in manager transaction (with va_args support) More... | |
static void | astman_send_list_complete (struct mansession *s, const struct message *m, const char *event_name, int count) |
void | astman_send_list_complete_end (struct mansession *s) |
End the list complete event. More... | |
void | astman_send_list_complete_start (struct mansession *s, const struct message *m, const char *event_name, int count) |
Start the list complete event. More... | |
static struct ast_str * | astman_send_list_complete_start_common (struct mansession *s, const struct message *m, const char *event_name, int count) |
void | astman_send_listack (struct mansession *s, const struct message *m, char *msg, char *listflag) |
Send ack in manager transaction to begin a list. More... | |
void | astman_send_response (struct mansession *s, const struct message *m, char *resp, char *msg) |
Send response in manager transaction. More... | |
static void | astman_send_response_full (struct mansession *s, const struct message *m, char *resp, char *msg, char *listflag) |
send a response with an optional message, and terminate it with an empty line. m is used only to grab the 'ActionID' field. More... | |
static void | astman_start_ack (struct mansession *s, const struct message *m) |
static int | authenticate (struct mansession *s, const struct message *m) |
static const char * | authority_to_str (int authority, struct ast_str **res) |
Convert authority code to a list of options. Note that the EVENT_FLAG_ALL authority will always be returned. More... | |
static int | blackfilter_cmp_fn (void *obj, void *arg, void *data, int flags) |
static struct mansession_session * | build_mansession (const struct ast_sockaddr *addr) |
Allocate manager session structure and add it to the list of sessions. More... | |
static int | check_blacklist (const char *cmd) |
static int | check_manager_session_inuse (const char *name) |
static void | destroy_fast_originate_helper (struct fast_originate_helper *doomed) |
static int | do_message (struct mansession *s) |
static void | event_filter_destructor (void *obj) |
static void * | fast_originate (void *data) |
static int | function_capable_string_allowed_with_auths (const char *evaluating, int writepermlist) |
Checks to see if a string which can be used to evaluate functions should be rejected. More... | |
static void | generate_status (struct mansession *s, struct ast_channel *chan, char **vars, int varc, int all_variables, char *id_text, int *count) |
static int | get_input (struct mansession *s, char *output) |
static struct ast_manager_user * | get_manager_by_name_locked (const char *name) |
static int | get_perm (const char *instr) |
static struct eventqent * | grab_last (void) |
static char * | handle_manager_reload (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
CLI command manager reload. More... | |
static char * | handle_mandebug (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static void | handle_parse_error (struct mansession *s, struct message *m, char *error) |
static char * | handle_showmanager (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_showmanagers (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_showmancmd (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_showmancmds (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
CLI command manager list commands. More... | |
static char * | handle_showmanconn (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
CLI command manager list connected. More... | |
static char * | handle_showmaneventq (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
CLI command manager list eventq. More... | |
static enum error_type | handle_updates (struct mansession *s, const struct message *m, struct ast_config *cfg, const char *dfn) |
helper function for action_updateconfig More... | |
static void | json_escape (char *out, const char *in) |
static void | log_action (const struct message *m, const char *action) |
static struct ast_variable * | man_do_variable_value (struct ast_variable *head, const char *hdr_val) |
static enum add_filter_result | manager_add_filter (const char *filter_pattern, struct ao2_container *whitefilters, struct ao2_container *blackfilters) |
Add an event filter to a manager session. More... | |
static void | manager_default_msg_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static int | manager_displayconnects (struct mansession_session *session) |
Get displayconnects config option. More... | |
static void | manager_generic_msg_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | manager_json_array_with_key (struct ast_json *obj, const char *key, size_t index, struct ast_str **res, key_exclusion_cb exclusion_cb) |
static void | manager_json_obj_with_key (struct ast_json *obj, const char *key, const char *parent_key, struct ast_str **res, key_exclusion_cb exclusion_cb) |
static void | manager_json_to_ast_str (struct ast_json *obj, const char *key, struct ast_str **res, key_exclusion_cb exclusion_cb) |
static void | manager_json_value_str_append (struct ast_json *value, const char *key, struct ast_str **res) |
static int | manager_modulecheck (struct mansession *s, const struct message *m) |
Manager function to check if module is loaded. More... | |
static int | manager_moduleload (struct mansession *s, const struct message *m) |
static int | manager_state_cb (const char *context, const char *exten, struct ast_state_cb_info *info, void *data) |
static int | mansession_cmp_fn (void *obj, void *arg, int flags) |
static enum ast_transport | mansession_get_transport (const struct mansession *s) |
static void | mansession_lock (struct mansession *s) |
Lock the 'mansession' structure. More... | |
static void | mansession_unlock (struct mansession *s) |
Unlock the 'mansession' structure. More... | |
static int | match_filter (struct mansession *s, char *eventdata) |
static void | print_event_instance (struct ast_cli_args *a, struct ast_xml_doc_item *instance) |
static int | process_events (struct mansession *s) |
static int | process_message (struct mansession *s, const struct message *m) |
Process an AMI message, performing desired action. Return 0 on success, -1 on error that require the session to be destroyed. More... | |
static void | purge_events (void) |
static void | purge_sessions (int n_max) |
remove at most n_max stale session from the list. More... | |
static int | queue_read_action_payload (struct ast_channel *chan, const unsigned char *payload, size_t payload_size, enum ast_frame_read_action action) |
Queue a given read action containing a payload onto a channel. More... | |
static int | queue_sendtext (struct ast_channel *chan, const char *body) |
Queue a read action to send a text message. More... | |
static int | queue_sendtext_data (struct ast_channel *chan, const char *body, const char *content_type) |
Queue a read action to send a text data message. More... | |
static int | reload_module (void) |
static void | report_auth_success (const struct mansession *s) |
static void | report_failed_acl (const struct mansession *s, const char *username) |
static void | report_failed_challenge_response (const struct mansession *s, const char *response, const char *expected_response) |
static void | report_inval_password (const struct mansession *s, const char *username) |
static void | report_invalid_user (const struct mansession *s, const char *username) |
static void | report_req_bad_format (const struct mansession *s, const char *action) |
static void | report_req_not_allowed (const struct mansession *s, const char *action) |
static void | report_session_limit (const struct mansession *s) |
static int | send_string (struct mansession *s, char *string) |
static void | session_destroy (struct mansession_session *s) |
static void | session_destructor (void *obj) |
static void * | session_do (void *data) |
The body of the individual manager session. Call get_input() to read one line at a time (or be woken up on new events), collect the lines in a message until found an empty line, and execute the request. In any case, deliver events asynchronously through process_events() (called from here if no line is available, or at the end of process_message(). ) More... | |
static int | set_eventmask (struct mansession *s, const char *eventmask) |
Rather than braindead on,off this now can also accept a specific int mask value or a ',' delim list of mask strings (the same as manager.conf) -anthm. More... | |
static int | strings_to_mask (const char *string) |
static struct mansession_session * | unref_mansession (struct mansession_session *s) |
Unreference manager session object. If no more references, then go ahead and delete it. More... | |
static const char * | user_authority_to_str (int authority, struct ast_str **res) |
Convert authority code to a list of options for a user. This will only display those authority codes that have an explicit match on authority. More... | |
static int | whitefilter_cmp_fn (void *obj, void *arg, void *data, int flags) |
Variables | |
static struct stasis_subscription * | acl_change_sub |
static struct actions | actions = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
static struct all_events | all_events = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
static int | allowmultiplelogin = 1 |
static struct ast_threadstorage | astman_append_buf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_astman_append_buf , .custom_init = NULL , } |
static int | authlimit |
static int | authtimeout |
static int | broken_events_action = 0 |
struct { | |
const char * words [AST_MAX_CMD_LEN] | |
} | command_blacklist [] |
static int | displayconnects = 1 |
static char | global_realm [MAXHOSTNAMELEN] |
static int | httptimeout = 60 |
static char * | manager_channelvars |
static int | manager_debug = 0 |
static int | manager_enabled = 0 |
static struct ast_threadstorage | manager_event_buf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_manager_event_buf , .custom_init = NULL , } |
static struct manager_hooks | manager_hooks = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
static struct stasis_topic * | manager_topic |
A stasis_topic that all topics AMI cares about will be forwarded to. More... | |
static const struct permalias | perms [] |
static struct stasis_forward * | rtp_topic_forwarder |
The stasis_subscription for forwarding the RTP topic to the AMI topic. More... | |
static struct stasis_forward * | security_topic_forwarder |
The stasis_subscription for forwarding the Security topic to the AMI topic. More... | |
static struct stasis_message_router * | stasis_router |
The stasis_message_router for all Stasis Message Bus API messages. More... | |
static int | subscribed = 0 |
static struct stasis_forward * | test_suite_forwarder |
The stasis_subscription for forwarding the Test topic to the AMI topic. More... | |
static int | timestampevents |
static int | unauth_sessions = 0 |
static struct ast_threadstorage | userevent_buf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_userevent_buf , .custom_init = NULL , } |
static struct users | users = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
static int | webmanager_enabled = 0 |
STASIS_MESSAGE_TYPE_DEFN (ast_manager_get_generic_type) | |
Define AMI message types. More... | |
#define any_manager_listeners | ( | sessions | ) | ((sessions && ao2_container_count(sessions)) || !AST_RWLIST_EMPTY(&manager_hooks)) |
Definition at line 1835 of file manager.c.
Referenced by __ast_manager_event_multichan(), manager_default_msg_cb(), and manager_generic_msg_cb().
#define ASTMAN_APPEND_BUF_INITSIZE 256 |
initial allocated size for the astman_append_buf and astman_send_*_va
Definition at line 3066 of file manager.c.
Referenced by astman_append(), astman_send_error_va(), astman_send_list_complete_start_common(), and astman_send_response_full().
#define DEFAULT_REALM "asterisk" |
Definition at line 1483 of file manager.c.
Referenced by manager_set_defaults().
#define EVENT_FLAG_SHUTDOWN -1 |
Fake event class used to end sessions at shutdown.
Definition at line 1511 of file manager.c.
Referenced by __manager_event_sessions_va(), authority_to_str(), manager_shutdown(), and process_events().
#define GET_HEADER_FIRST_MATCH 0 |
Definition at line 2766 of file manager.c.
Referenced by astman_get_header().
#define GET_HEADER_LAST_MATCH 1 |
Definition at line 2767 of file manager.c.
Referenced by __astman_get_header().
#define GET_HEADER_SKIP_EMPTY 2 |
Definition at line 2768 of file manager.c.
Referenced by __astman_get_header(), and process_message().
#define MANAGER_EVENT_BUF_INITSIZE 256 |
Definition at line 7110 of file manager.c.
Referenced by __manager_event_sessions_va().
#define manager_event_sessions | ( | sessions, | |
category, | |||
event, | |||
contents, | |||
... | |||
) | __manager_event_sessions(sessions, category, event, 0, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, contents , ## __VA_ARGS__) |
Definition at line 1832 of file manager.c.
Referenced by manager_default_msg_cb(), and manager_generic_msg_cb().
#define MAX_AUTH_PERM_STRING 150 |
Maximum string length of the AMI authority permission string buildable from perms[].
Definition at line 2043 of file manager.c.
Referenced by __manager_event_sessions_va(), action_listcommands(), action_login(), handle_showmanager(), and handle_showmancmd().
#define MAX_BLACKLIST_CMD_LEN 2 |
Descriptor for a manager session, either on the AMI socket or over HTTP.
Definition at line 1523 of file manager.c.
Referenced by check_blacklist().
#define MAX_VARS 128 |
Definition at line 1508 of file manager.c.
Referenced by load_channelvars().
#define MGR_SHOW_TERMINAL_WIDTH 80 |
Definition at line 1506 of file manager.c.
Referenced by handle_showmancmds().
#define MSG_MOREDATA ((char *)astman_send_response) |
Definition at line 3114 of file manager.c.
Referenced by action_command(), astman_send_response_full(), and astman_start_ack().
enum add_filter_result |
Enumerator | |
---|---|
FILTER_SUCCESS | |
FILTER_ALLOC_FAILED | |
FILTER_COMPILE_FAIL |
enum error_type |
Doxygen group
Definition at line 1419 of file manager.c.
Enumerator | |
---|---|
MESSAGE_OKAY | |
MESSAGE_LINE_TOO_LONG |
Definition at line 1615 of file manager.c.
int __ast_manager_event_multichan | ( | int | category, |
const char * | event, | ||
int | chancount, | ||
struct ast_channel ** | chans, | ||
const char * | file, | ||
int | line, | ||
const char * | func, | ||
const char * | contents, | ||
... | |||
) |
External routines may send asterisk manager events this way
category | Event category, matches manager authorization |
event | Event name |
chancount | Number of channels in chans parameter |
chans | A pointer to an array of channels involved in the event |
file,line,func | |
contents | Format string describing event |
... |
Definition at line 7233 of file manager.c.
References __manager_event_sessions_va(), any_manager_listeners, ao2_cleanup, and ao2_global_obj_ref.
|
static |
Return a matching header value.
Generic function to return either the first or the last matching header from a list of variables, possibly skipping empty strings.
Definition at line 2783 of file manager.c.
References ast_skip_blanks(), ast_strlen_zero, GET_HEADER_LAST_MATCH, GET_HEADER_SKIP_EMPTY, message::hdrcount, message::headers, result, and value.
Referenced by astman_get_header(), and process_message().
|
static |
thread local buffer for astman_append
|
static |
|
static |
Definition at line 7211 of file manager.c.
References __manager_event_sessions_va().
|
static |
Definition at line 7112 of file manager.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, append_channel_vars(), append_event(), ast_atomic_fetchadd_int(), ast_config_AST_SYSTEM_NAME, ast_mutex_lock, ast_mutex_unlock, AST_PTHREADT_NULL, AST_RWLIST_EMPTY, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_str_alloca, ast_str_append(), ast_str_append_va(), ast_str_buffer(), ast_str_set(), ast_str_thread_get(), ast_strlen_zero, ast_tvnow(), authority_to_str(), buf, chancount, EVENT_FLAG_SHUTDOWN, manager_custom_hook::helper, manager_debug, manager_event_buf, MANAGER_EVENT_BUF_INITSIZE, MAX_AUTH_PERM_STRING, mansession_session::notify_lock, mansession_session::pending_event, eventqent::seq, session, timestampevents, unref_mansession(), and mansession_session::waiting_thread.
Referenced by __ast_manager_event_multichan(), and __manager_event_sessions().
|
static |
Definition at line 9637 of file manager.c.
References __init_manager(), ast_log, ast_named_acl_change_type(), LOG_NOTICE, and stasis_message_type().
Referenced by acl_change_stasis_subscribe().
|
static |
Definition at line 1534 of file manager.c.
References acl_change_stasis_cb(), ast_named_acl_change_type(), ast_security_topic(), NULL, stasis_subscribe, stasis_subscription_accept_message_type(), STASIS_SUBSCRIPTION_FILTER_SELECTIVE, and stasis_subscription_set_filter().
Referenced by __init_manager().
|
static |
Definition at line 1544 of file manager.c.
References stasis_unsubscribe_and_join().
Referenced by __init_manager(), and manager_shutdown().
|
static |
Definition at line 5518 of file manager.c.
References ast_aoc_unit_entry::amount, aocmessage_get_unit_entry(), ast_aoc_add_unit_entry(), AST_AOC_BILLING_CALL_DEFLECTION, AST_AOC_BILLING_CALL_FWD_BUSY, AST_AOC_BILLING_CALL_FWD_NO_REPLY, AST_AOC_BILLING_CALL_FWD_UNCONDITIONAL, AST_AOC_BILLING_CALL_TRANSFER, AST_AOC_BILLING_CREDIT_CARD, AST_AOC_BILLING_NA, AST_AOC_BILLING_NORMAL, AST_AOC_BILLING_REVERSE_CHARGE, AST_AOC_CHARGE_CURRENCY, AST_AOC_CHARGE_FREE, AST_AOC_CHARGE_NA, AST_AOC_CHARGE_UNIT, ast_aoc_create(), AST_AOC_D, ast_aoc_destroy_decoded(), ast_aoc_destroy_encoded(), AST_AOC_E, ast_aoc_encode(), AST_AOC_MULT_HUNDRED, AST_AOC_MULT_ONE, AST_AOC_MULT_ONEHUNDREDTH, AST_AOC_MULT_ONETENTH, AST_AOC_MULT_ONETHOUSANDTH, AST_AOC_MULT_TEN, AST_AOC_MULT_THOUSAND, ast_aoc_set_association_id(), ast_aoc_set_association_number(), ast_aoc_set_billing_id(), ast_aoc_set_currency_info(), ast_aoc_set_total_type(), AST_AOC_SUBTOTAL, AST_AOC_TOTAL, ast_channel_get_by_name(), ast_channel_get_by_name_prefix(), ast_channel_unref, AST_CONTROL_AOC, ast_indicate_data(), ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), NULL, ast_aoc_unit_entry::type, ast_aoc_unit_entry::valid_amount, and ast_aoc_unit_entry::valid_type.
Referenced by __init_manager().
|
static |
Definition at line 5164 of file manager.c.
References ast_channel_get_by_name(), ast_channel_lock, ast_channel_unlock, ast_channel_unref, AST_FEATURE_MAX_LEN, AST_FRAME_DTMF, ast_get_builtin_feature(), ast_queue_frame(), ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), context, digit, exten, name, NULL, and pbx_builtin_setvar_helper().
Referenced by __init_manager().
|
static |
Definition at line 5118 of file manager.c.
References ast_bridge_transfer_blind(), AST_BRIDGE_TRANSFER_FAIL, AST_BRIDGE_TRANSFER_INVALID, AST_BRIDGE_TRANSFER_NOT_PERMITTED, AST_BRIDGE_TRANSFER_SUCCESS, ast_channel_context(), ast_channel_get_by_name(), ast_channel_unref, ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), context, exten, name, and NULL.
Referenced by __init_manager().
|
static |
Definition at line 5218 of file manager.c.
References ast_channel_get_by_name(), ast_channel_lock, ast_channel_unlock, ast_channel_unref, AST_FRAME_DTMF, ast_free, ast_get_chan_features_atxferabort(), ast_queue_frame(), ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), digit, name, and NULL.
Referenced by __init_manager().
|
static |
Definition at line 4442 of file manager.c.
References ast_random(), ast_strlen_zero, astman_append(), astman_get_header(), astman_send_error(), astman_start_ack(), mansession_session::challenge, mansession_lock(), mansession_unlock(), and mansession::session.
Referenced by __init_manager().
|
static |
Manager command "command" - execute CLI command.
Definition at line 5295 of file manager.c.
References ast_free, ast_malloc, ast_strlen_zero, astman_append(), astman_get_header(), astman_send_error(), astman_send_error_va(), astman_send_response_full(), buf, check_blacklist(), errno, len(), MSG_MOREDATA, NULL, RESULT_SUCCESS, strsep(), and term_strip().
Referenced by __init_manager().
|
static |
Show PBX core settings information.
Definition at line 6276 of file manager.c.
References AMI_VERSION, ast_cdr_is_enabled(), AST_CLI_YESNO, ast_config_AST_RUN_GROUP, ast_config_AST_RUN_USER, ast_config_AST_SYSTEM_NAME, ast_get_version(), ast_option_maxcalls, ast_option_maxfiles, ast_option_maxload, ast_realtime_enabled(), ast_strlen_zero, ast_webmanager_check_enabled(), astman_append(), and astman_get_header().
Referenced by __init_manager().
|
static |
Manager command "CoreShowChannels" - List currently defined channels and some information about them.
Definition at line 6390 of file manager.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_channel_snapshot_dialplan::appl, ast_channel_cache_by_name(), ast_free, ast_manager_build_channel_state_string_prefix(), ast_str_buffer(), ast_strlen_zero, ast_tvdiff_ms(), ast_tvnow(), ast_tvzero(), astman_append(), astman_get_header(), astman_send_list_complete(), astman_send_listack(), ast_channel_snapshot::base, ast_channel_snapshot::bridge, channels, ast_channel_snapshot_base::creationtime, ast_channel_snapshot_dialplan::data, ast_channel_snapshot::dialplan, and ast_channel_snapshot_bridge::id.
Referenced by __init_manager().
|
static |
Show PBX core status information.
Definition at line 6318 of file manager.c.
References ast_active_channels(), ast_lastreloadtime, ast_localtime(), ast_startuptime, ast_strftime(), ast_strlen_zero, astman_append(), astman_get_header(), and NULL.
Referenced by __init_manager().
|
static |
Definition at line 4188 of file manager.c.
References ast_config_AST_CONFIG_DIR, AST_FILE_MODE, ast_str_alloca, ast_str_append(), ast_str_buffer(), ast_str_set(), astman_get_header(), astman_send_ack(), astman_send_error(), errno, and PATH_MAX.
Referenced by __init_manager().
|
static |
Definition at line 7372 of file manager.c.
References ao2_cleanup, ast_string_field_free_memory, manager_action::final_response, manager_action::list_responses, and manager_action::synopsis.
Referenced by ast_manager_register2().
|
static |
Definition at line 4343 of file manager.c.
References ARRAY_LEN, ast_strlen_zero, astman_append(), astman_get_header(), astman_send_error(), broken_events_action, permalias::num, perms, and set_eventmask().
Referenced by __init_manager().
|
static |
Definition at line 5974 of file manager.c.
References ast_extension_state(), ast_extension_state2str(), ast_get_hint(), ast_strlen_zero, astman_append(), astman_get_header(), astman_send_error(), astman_start_ack(), context, exten, NULL, and status.
Referenced by __init_manager().
|
static |
Manager command to add an event filter to a manager session.
Definition at line 6111 of file manager.c.
References astman_get_header(), astman_send_ack(), astman_send_error(), mansession_session::blackfilters, filter(), FILTER_ALLOC_FAILED, FILTER_COMPILE_FAIL, FILTER_SUCCESS, manager_add_filter(), mansession::session, and mansession_session::whitefilters.
Referenced by __init_manager().
|
static |
Definition at line 1704 of file manager.c.
References manager_action::action, ao2_t_ref, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, and AST_RWLIST_UNLOCK.
Referenced by ast_hook_send_action(), and process_message().
|
static |
Definition at line 3620 of file manager.c.
References ast_category_browse_filtered(), ast_category_first(), ast_category_get_name(), ast_category_get_templates(), ast_category_is_template(), ast_config_destroy(), ast_config_load2(), ast_free, ast_str_buffer(), ast_str_strlen(), ast_strlen_zero, astman_append(), astman_get_header(), astman_send_error(), astman_start_ack(), eventqent::category, CONFIG_FLAG_NOCACHE, CONFIG_FLAG_WITHCOMMENTS, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEMISSING, filter(), ast_variable::name, ast_variable::next, NULL, templates, and ast_variable::value.
Referenced by __init_manager().
|
static |
Definition at line 3750 of file manager.c.
References ast_category_browse_filtered(), ast_category_first(), ast_category_get_name(), ast_category_get_templates(), ast_category_is_template(), ast_config_destroy(), ast_config_load2(), ast_free, ast_str_buffer(), ast_str_strlen(), ast_strlen_zero, astman_append(), astman_append_json(), astman_get_header(), astman_send_error(), astman_start_ack(), eventqent::category, CONFIG_FLAG_NOCACHE, CONFIG_FLAG_WITHCOMMENTS, CONFIG_STATUS_FILEINVALID, filter(), ast_variable::name, ast_variable::next, NULL, templates, and ast_variable::value.
Referenced by __init_manager().
|
static |
Definition at line 4610 of file manager.c.
References ast_channel_get_by_name(), ast_channel_unref, ast_dummy_channel_alloc, ast_func_read(), ast_log, ast_strlen_zero, astman_append(), astman_get_header(), astman_send_error(), astman_start_ack(), c, function_capable_string_allowed_with_auths(), LOG_ERROR, name, NULL, pbx_retrieve_variable(), S_OR, mansession::session, and mansession_session::writeperm.
Referenced by __init_manager().
|
static |
Definition at line 4460 of file manager.c.
References mansession_session::addr, ast_channel_get_by_name(), ast_channel_iterator_all_new(), ast_channel_iterator_destroy(), ast_channel_iterator_next(), ast_channel_name(), ast_channel_softhangup_withcause_locked(), ast_channel_unref, ast_free, ast_log, ast_regex_string_to_regex_pattern(), ast_sockaddr_stringify_addr(), ast_str_buffer(), ast_str_create, ast_strlen_zero, ast_verb, astman_append(), astman_get_header(), astman_send_ack(), astman_send_error(), astman_send_error_va(), astman_send_list_complete(), astman_send_listack(), c, LOG_NOTICE, mansession_session::managerid, NULL, mansession::session, and mansession_session::username.
Referenced by __init_manager().
|
static |
Definition at line 3682 of file manager.c.
References ast_category_browse_filtered(), ast_category_get_name(), ast_config_destroy(), ast_config_load2(), ast_strlen_zero, astman_append(), astman_get_header(), astman_send_error(), astman_start_ack(), eventqent::category, CONFIG_FLAG_NOCACHE, CONFIG_FLAG_WITHCOMMENTS, CONFIG_STATUS_FILEINVALID, match(), and NULL.
Referenced by __init_manager().
|
static |
Definition at line 4324 of file manager.c.
References manager_action::action, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_str_alloca, astman_append(), astman_start_ack(), manager_action::authority, authority_to_str(), MAX_AUTH_PERM_STRING, mansession::session, manager_action::synopsis, and mansession_session::writeperm.
Referenced by __init_manager().
|
static |
Manager command "LoggerRotate" - reloads and rotates the logger in the same manner as the CLI command 'logger rotate'.
Definition at line 6458 of file manager.c.
References ast_logger_rotate(), astman_send_ack(), and astman_send_error().
Referenced by __init_manager().
|
static |
Definition at line 4393 of file manager.c.
References mansession_session::addr, ast_atomic_fetchadd_int(), ast_lastreloadtime, AST_OPT_FLAG_FULLY_BOOTED, ast_options, ast_sockaddr_stringify_addr(), ast_startuptime, ast_str_alloca, ast_test_flag, ast_tvnow(), ast_tvsub(), ast_verb, astman_append(), astman_send_ack(), astman_send_error(), authenticate(), mansession_session::authenticated, authority_to_str(), EVENT_FLAG_SYSTEM, manager_displayconnects(), mansession_session::managerid, MAX_AUTH_PERM_STRING, mansession_session::readperm, mansession_session::send_events, mansession::session, tmp(), unauth_sessions, and mansession_session::username.
Referenced by __init_manager().
|
static |
Definition at line 4387 of file manager.c.
References astman_send_response().
Referenced by __init_manager().
|
static |
Definition at line 5953 of file manager.c.
References ast_app_inboxcount2(), ast_strlen_zero, astman_append(), astman_get_header(), astman_send_error(), astman_start_ack(), and mailbox.
Referenced by __init_manager().
|
static |
Definition at line 5936 of file manager.c.
References ast_app_has_voicemail(), ast_strlen_zero, astman_append(), astman_get_header(), astman_send_error(), astman_start_ack(), mailbox, and NULL.
Referenced by __init_manager().
|
static |
Definition at line 5723 of file manager.c.
References ao2_cleanup, app, ast_callerid_parse(), ast_calloc, ast_copy_string(), ast_exists_extension(), ast_findlabel_extension(), ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_remove_by_type(), ast_format_cap_update_by_allow_disallow(), ast_format_slin, ast_free, AST_MAX_PUBLIC_UNIQUEID, AST_MEDIA_TYPE_UNKNOWN, AST_OUTGOING_WAIT, ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_pthread_create_detached, ast_shrink_phone_number(), ast_string_field_build, ast_string_field_init, ast_string_field_set, ast_strlen_zero, ast_true(), ast_variables_destroy(), ast_variables_dup(), astman_get_header(), astman_get_variables(), astman_send_ack(), astman_send_error(), astman_send_error_va(), fast_originate_helper::cap, mansession_session::chanvars, cid_name, cid_num, codecs, context, destroy_fast_originate_helper(), fast_originate_helper::early_media, EVENT_FLAG_SYSTEM, exten, fast_originate(), name, ast_variable::next, NULL, priority, fast_originate_helper::priority, mansession::session, strcasestr(), fast_originate_helper::timeout, tmp(), ast_assigned_ids::uniqueid, ast_assigned_ids::uniqueid2, fast_originate_helper::vars, and mansession_session::writeperm.
Referenced by __init_manager().
|
static |
Definition at line 3602 of file manager.c.
References ast_strlen_zero, ast_tvnow(), astman_append(), and astman_get_header().
Referenced by __init_manager().
|
static |
Definition at line 6004 of file manager.c.
References AST_PRESENCE_INVALID, ast_presence_state2str(), ast_strlen_zero, astman_append(), astman_get_header(), astman_send_error(), astman_send_error_va(), astman_start_ack(), provider, and state.
Referenced by __init_manager().
|
static |
action_redirect: The redirect manager command
Definition at line 4973 of file manager.c.
References ast_async_goto(), ast_channel_clear_flag(), ast_channel_flags(), ast_channel_get_by_name(), ast_channel_is_bridged(), ast_channel_lock, ast_channel_unlock, ast_channel_unref, ast_check_hangup_locked(), ast_findlabel_extension(), AST_FLAG_BRIDGE_DUAL_REDIRECT_WAIT, ast_set_flag, ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), buf, context, exten, name, NULL, and priority.
Referenced by __init_manager().
|
static |
Send a reload event.
Definition at line 6358 of file manager.c.
References ast_module_reload(), AST_MODULE_RELOAD_ERROR, AST_MODULE_RELOAD_IN_PROGRESS, AST_MODULE_RELOAD_NOT_FOUND, AST_MODULE_RELOAD_NOT_IMPLEMENTED, AST_MODULE_RELOAD_QUEUED, AST_MODULE_RELOAD_SUCCESS, AST_MODULE_RELOAD_UNINITIALIZED, astman_get_header(), astman_send_ack(), astman_send_error(), NULL, and S_OR.
Referenced by __init_manager().
|
static |
Definition at line 4930 of file manager.c.
References ast_channel_get_by_name(), ast_channel_unref, ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), c, name, queue_sendtext(), and queue_sendtext_data().
Referenced by __init_manager().
|
static |
Definition at line 4577 of file manager.c.
References ast_channel_get_by_name(), ast_channel_unref, ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), c, name, NULL, pbx_builtin_setvar_helper(), and S_OR.
Referenced by __init_manager().
|
static |
Manager "status" command to show channels.
Definition at line 4777 of file manager.c.
References AST_APP_ARG, ast_channel_get_by_name(), ast_channel_iterator_all_new(), ast_channel_iterator_destroy(), ast_channel_iterator_next(), ast_channel_lock, ast_channel_unlock, ast_channel_unref, AST_DECLARE_APP_ARGS, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, ast_true(), astman_append(), astman_get_header(), astman_send_error(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), channels, function_capable_string_allowed_with_auths(), generate_status(), name, NULL, S_OR, mansession::session, and mansession_session::writeperm.
Referenced by __init_manager().
|
static |
Definition at line 6044 of file manager.c.
References ast_channel_get_by_name(), ast_channel_lock, ast_channel_setwhentohangup_tv(), ast_channel_unlock, ast_channel_unref, ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), c, name, and timeout.
Referenced by __init_manager().
|
static |
Definition at line 4102 of file manager.c.
References ast_config_destroy(), ast_config_load2(), ast_config_text_file_save2(), ast_include_rename(), ast_module_reload(), ast_strlen_zero, ast_true(), astman_get_header(), astman_send_ack(), astman_send_error(), CONFIG_FLAG_NOCACHE, CONFIG_FLAG_WITHCOMMENTS, CONFIG_SAVE_FLAG_NONE, CONFIG_SAVE_FLAG_PRESERVE_EFFECTIVE_CONTEXT, CONFIG_STATUS_FILEINVALID, FAILURE_ALLOCATION, FAILURE_APPEND, FAILURE_DELCAT, FAILURE_DELETE, FAILURE_EMPTYCAT, FAILURE_NEWCAT, FAILURE_TEMPLATE, FAILURE_UPDATE, handle_updates(), NULL, result, UNKNOWN_ACTION, UNKNOWN_CATEGORY, UNSPECIFIED_ARGUMENT, and UNSPECIFIED_CATEGORY.
Referenced by __init_manager().
|
static |
Definition at line 6255 of file manager.c.
References ast_str_append(), ast_str_buffer(), ast_str_reset(), ast_str_thread_get(), astman_get_header(), astman_send_ack(), EVENT_FLAG_USER, message::hdrcount, message::headers, manager_event, and userevent_buf.
Referenced by __init_manager().
|
static |
Definition at line 4206 of file manager.c.
References advance_event(), ao2_lock, ao2_unlock, ast_debug, ast_iostream_get_fd(), ast_mutex_lock, ast_mutex_unlock, AST_PTHREADT_NULL, AST_RWLIST_NEXT, ast_strlen_zero, ast_wait_for_input(), astman_append(), astman_get_header(), astman_send_response(), eventqent::category, mansession_session::last_ev, mansession_session::managerid, match_filter(), max, mansession_session::needdestroy, mansession_session::notify_lock, NULL, mansession_session::readperm, mansession_session::send_events, mansession::session, mansession_session::sessiontimeout, mansession_session::stream, timeout, and mansession_session::waiting_thread.
Referenced by __init_manager().