|
Asterisk - The Open Source Telephony Project
18.5.0
|
#include "asterisk.h"#include <newt.h>#include <stdio.h>#include <sys/time.h>#include <netdb.h>#include <netinet/in.h>#include <arpa/inet.h>#include <sys/socket.h>#include <sys/select.h>#include <fcntl.h>#include <string.h>#include <errno.h>#include <unistd.h>#include <stdlib.h>#include "asterisk/md5.h"#include "asterisk/linkedlists.h"
Go to the source code of this file.
Data Structures | |
| struct | ast_chan |
| struct | ast_mansession |
| struct | chans |
| struct | event |
| struct | message |
Macros | |
| #define | _NEWT_CAST (void *) |
| #define | ARRAY_LEN(a) (sizeof(a) / sizeof(a[0])) |
| #define | ASTMM_LIBC ASTMM_IGNORE |
| #define | DEFAULT_MANAGER_PORT 5038 |
| #define | MAX_HEADERS 80 |
| #define | MAX_LEN 256 |
Functions | |
| int | ast_add_profile (const char *, uint64_t scale) |
| support for event profiling More... | |
| int64_t | ast_mark (int, int start1_stop0) |
| int64_t | ast_profile (int, int64_t) |
| static void | del_chan (char *name) |
| static int | event_hangup (struct ast_mansession *s, struct message *m) |
| static int | event_ignore (struct ast_mansession *s, struct message *m) |
| static int | event_newchannel (struct ast_mansession *s, struct message *m) |
| static int | event_newexten (struct ast_mansession *s, struct message *m) |
| static int | event_newstate (struct ast_mansession *s, struct message *m) |
| static int | event_rename (struct ast_mansession *s, struct message *m) |
| static int | event_status (struct ast_mansession *s, struct message *m) |
| static void | fdprintf (int fd, char *fmt,...) |
| static struct ast_chan * | find_chan (char *name) |
| static char * | get_header (struct message *m, char *var) |
| static int | get_input (struct ast_mansession *s, char *output) |
| static int | get_user_input (char *msg, char *buf, int buflen) |
| static int | has_input (struct ast_mansession *s) |
| static int | hide_doing (void) |
| static int | input_check (struct ast_mansession *s, struct message **mout) |
| int | main (int argc, char *argv[]) |
| static int | manage_calls (char *host) |
| static int | manager_action (char *action, char *fmt,...) |
| static int | manager_login (char *hostname) |
| static int | process_message (struct ast_mansession *s, struct message *m) |
| static void | rebuild_channels (newtComponent c) |
| static int | show_doing (char *title, char *tmp) |
| static int | show_message (char *title, char *msg) |
| static void | try_hangup (newtComponent c) |
| static void | try_redirect (newtComponent c) |
| static void | try_status (void) |
| static struct message * | wait_for_response (int timeout) |
Variables | |
| static struct chans | chans = { .first = NULL, .last = NULL, } |
| static struct event | events [] |
| static struct ast_mansession | session |
| static newtComponent | showform |
| #define _NEWT_CAST (void *) |
Definition at line 62 of file astman.c.
Referenced by get_user_input(), and manager_login().
Definition at line 49 of file astman.c.
Referenced by process_message().
| #define ASTMM_LIBC ASTMM_IGNORE |
| #define DEFAULT_MANAGER_PORT 5038 |
Definition at line 64 of file astman.c.
Referenced by manager_login().
| #define MAX_HEADERS 80 |
Definition at line 53 of file astman.c.
Referenced by input_check().
| int ast_add_profile | ( | const char * | s, |
| uint64_t | scale | ||
| ) |
support for event profiling
(note, this must be documented a lot more) ast_add_profile allocates a generic 'counter' with a given name, which can be shown with the command 'core show profile <name>'
The counter accumulates positive or negative values supplied by
support for event profiling
Definition at line 92 of file astman.c.
References ast_profile().
| int64_t ast_mark | ( | int | key, |
| int | start1_stop0 | ||
| ) |
Definition at line 103 of file astman.c.
Referenced by __ast_pthread_mutex_lock(), ao2_weakproxy_unsubscribe(), ast_profile(), and extension_match_core().
| int64_t ast_profile | ( | int | key, |
| int64_t | val | ||
| ) |
|
static |
Definition at line 126 of file astman.c.
References AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, free(), ast_chan::list, and ast_chan::name.
Referenced by event_hangup().
|
static |
|
static |
|
static |
Definition at line 183 of file astman.c.
References ast_chan::callerid, find_chan(), get_header(), and ast_chan::state.
|
static |
Definition at line 173 of file astman.c.
References ast_chan::context, ast_chan::exten, find_chan(), get_header(), and ast_chan::priority.
|
static |
Definition at line 165 of file astman.c.
References find_chan(), get_header(), and ast_chan::state.
|
static |
Definition at line 215 of file astman.c.
References find_chan(), get_header(), and ast_chan::name.
|
static |
Definition at line 192 of file astman.c.
References ast_chan::callerid, ast_chan::context, ast_chan::exten, find_chan(), get_header(), ast_chan::priority, and ast_chan::state.
|
static |
|
static |
Definition at line 110 of file astman.c.
References AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_chan::list, malloc(), and ast_chan::name.
Referenced by event_newchannel(), event_newexten(), event_newstate(), event_rename(), and event_status().
|
static |
Definition at line 154 of file astman.c.
References message::hdrcount, and message::headers.
Referenced by event_hangup(), event_newchannel(), event_newexten(), event_newstate(), event_rename(), event_status(), input_check(), manager_login(), process_message(), try_hangup(), try_redirect(), and try_status().
|
static |
Definition at line 310 of file astman.c.
References errno, ast_mansession::fd, FD_SET, FD_ZERO, ast_mansession::inbuf, inet_ntoa, ast_mansession::inlen, NULL, and ast_mansession::sin.
Referenced by input_check().
|
static |
Definition at line 500 of file astman.c.
References _NEWT_CAST, input(), and NULL.
Referenced by try_redirect().
|
static |
Definition at line 301 of file astman.c.
References ast_mansession::inbuf, and ast_mansession::inlen.
Referenced by manage_calls().
|
static |
|
static |
Definition at line 350 of file astman.c.
References get_header(), get_input(), message::hdrcount, message::headers, MAX_HEADERS, NULL, and process_message().
Referenced by manage_calls(), and wait_for_response().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
|
static |
Definition at line 561 of file astman.c.
References channels, ast_mansession::fd, hangup(), has_input(), hide_doing(), input_check(), NULL, rebuild_channels(), session, show_doing(), show_message(), tmp(), try_hangup(), try_redirect(), and try_status().
Referenced by main().
|
static |
Definition at line 410 of file astman.c.
References errno, ast_mansession::fd, fdprintf(), session, and tmp().
Referenced by manager_login(), try_hangup(), try_redirect(), and try_status().
|
static |
Definition at line 629 of file astman.c.
References _NEWT_CAST, challenge(), DEFAULT_MANAGER_PORT, errno, ast_mansession::fd, get_header(), gethostbyname, hide_doing(), hp, len(), manager_action(), MD5Final(), MD5Init(), MD5Update(), NULL, pass, password, session, show_doing(), show_message(), ast_mansession::sin, tmp(), user, and wait_for_response().
Referenced by main().
|
static |
Definition at line 249 of file astman.c.
References ARRAY_LEN, events, get_header(), message::hdrcount, and message::headers.
Referenced by input_check().
|
static |
Definition at line 275 of file astman.c.
References AST_LIST_TRAVERSE, ast_chan::callerid, ast_chan::context, ast_chan::exten, ast_chan::list, ast_chan::name, NULL, ast_chan::priority, ast_chan::state, and tmp().
Referenced by manage_calls().
|
static |
Definition at line 449 of file astman.c.
References NULL.
Referenced by manage_calls(), and manager_login().
|
static |
Definition at line 429 of file astman.c.
References NULL.
Referenced by manage_calls(), manager_login(), try_hangup(), try_redirect(), and try_status().
|
static |
Definition at line 482 of file astman.c.
References get_header(), manager_action(), ast_chan::name, show_message(), and wait_for_response().
Referenced by manage_calls().
|
static |
Definition at line 528 of file astman.c.
References context, get_header(), get_user_input(), manager_action(), ast_chan::name, show_message(), tmp(), and wait_for_response().
Referenced by manage_calls().
|
static |
Definition at line 469 of file astman.c.
References get_header(), manager_action(), show_message(), and wait_for_response().
Referenced by manage_calls().
|
static |
Definition at line 387 of file astman.c.
References ast_mansession::fd, FD_SET, input_check(), NULL, and session.
Referenced by manager_login(), try_hangup(), try_redirect(), and try_status().
Referenced by check_header(), check_header_fmt(), and setup_dahdi_int().
|
static |
Referenced by process_message().
|
static |
Referenced by __manager_event_sessions_va(), add_header(), assign_uuid(), ast_ari_events_event_websocket_ws_established_cb(), ast_ari_websocket_events_event_websocket_established(), ast_ari_websocket_session_create(), ast_sip_channel_pvt_alloc(), ast_sip_dialog_get_session(), ast_sip_session_alloc(), ast_sip_session_create_outgoing(), ast_websocket_uri_cb(), astman_is_authed(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), auth_http_callback(), channel_read_rtcp(), channel_read_rtp(), check_manager_session_inuse(), cli_channelstats_print_body(), defer_termination_cancel_task(), destroy_session(), event_session_alloc(), event_session_dtor(), event_session_hash(), find_session(), find_session_by_nonce(), generic_http_callback(), get_manager_sessions_cb(), handle_new_invite_request(), handle_showmanconn(), invite_collision_timeout(), invite_proceeding(), invite_terminated(), jingle_action_hook(), jingle_alloc(), jingle_answer(), jingle_call(), jingle_digit_begin(), jingle_digit_end(), jingle_fixup(), jingle_get_rtp_peer(), jingle_hangup(), jingle_indicate(), jingle_outgoing_hook(), jingle_read(), jingle_request(), jingle_sendtext(), jingle_session_destructor(), jingle_session_hash(), jingle_write(), manage_calls(), manager_action(), manager_fax_session(), manager_fax_sessions(), manager_login(), notify_ami_channel_data_create(), outbound_invite_auth(), pjsip_logger_session_alloc(), pjsip_logger_session_destroy(), purge_sessions(), push_notify_channel(), rcvfax_exec(), sdp_register(), sdp_search(), session_destroy_fn(), session_destructor(), session_do(), session_end_if_deferred_task(), session_end_if_disconnected(), session_inv_on_redirected(), sip_websocket_callback(), sndfax_exec(), stasis_app_message_handler(), t38_automatic_reject(), t38_automatic_reject_timer_cb(), t38_parameters_task_data_alloc(), transport_read(), unistim_call(), update_completed(), wait_for_response(), websocket_cb(), and websocket_session_dtor().
1.8.13