Asterisk - The Open Source Telephony Project GIT-master-8b8a8c1
|
Command line for ARI. More...
#include "asterisk.h"
#include "asterisk/astobj2.h"
#include "asterisk/cli.h"
#include "asterisk/stasis_app.h"
#include "asterisk/uuid.h"
#include "internal.h"
#include "ari_websockets.h"
Go to the source code of this file.
Macros | |
#define | DASHES "----------------------------------------------------------------------" |
#define | DASHES "----------------------------------------------------------------------" |
Functions | |
int | ari_cli_register (void) |
Register CLI commands for ARI. More... | |
void | ari_cli_unregister (void) |
Unregister CLI commands for ARI. More... | |
static char * | ari_mkpasswd (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_set_debug (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_show (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_show_app (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_show_apps (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_show_owc (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_show_owcs (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_show_sessions (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_show_user (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_show_users (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_shut_session (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_shut_sessions (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | ari_start_owc (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static void | complete_app (struct ao2_container *container, const char *word) |
static void | complete_session (struct ao2_container *container, const char *word) |
static void | complete_sorcery_object (struct ao2_container *container, const char *word) |
static int | show_owc_cb (void *obj, void *arg, int flags) |
static int | show_sessions_cb (void *obj, void *arg, int flags) |
static int | show_users_cb (void *obj, void *arg, int flags) |
Variables | |
static struct ast_cli_entry | cli_ari [] |
Command line for ARI.
Definition in file res/ari/cli.c.
#define DASHES "----------------------------------------------------------------------" |
Definition at line 555 of file res/ari/cli.c.
#define DASHES "----------------------------------------------------------------------" |
Definition at line 555 of file res/ari/cli.c.
int ari_cli_register | ( | void | ) |
Register CLI commands for ARI.
Definition at line 699 of file res/ari/cli.c.
References ARRAY_LEN, ast_cli_register_multiple, and cli_ari.
Referenced by load_module().
void ari_cli_unregister | ( | void | ) |
Unregister CLI commands for ARI.
Definition at line 703 of file res/ari/cli.c.
References ARRAY_LEN, ast_cli_unregister_multiple(), and cli_ari.
Referenced by unload_module().
|
static |
Definition at line 180 of file res/ari/cli.c.
References a, ast_cli(), ast_crypt_encrypt(), ast_free, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, RAII_VAR, and ast_cli_entry::usage.
|
static |
Definition at line 320 of file res/ari/cli.c.
References a, ao2_cleanup, ao2_ref, app, ast_cli(), ast_cli_completion_add(), ast_strdup, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_app(), debug, NULL, RAII_VAR, stasis_app_get_all(), stasis_app_get_by_name(), stasis_app_name(), stasis_app_set_debug(), stasis_app_set_global_debug(), and ast_cli_entry::usage.
|
static |
Definition at line 34 of file res/ari/cli.c.
References a, ao2_cleanup, ari_conf_get_general(), ast_cli(), AST_CLI_YESNO, AST_JSON_PRETTY, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, RAII_VAR, and ast_cli_entry::usage.
|
static |
Definition at line 279 of file res/ari/cli.c.
References a, ao2_cleanup, ao2_ref, app, ast_cli(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_app(), NULL, RAII_VAR, stasis_app_get_all(), stasis_app_get_by_name(), stasis_app_to_cli(), and ast_cli_entry::usage.
|
static |
Definition at line 219 of file res/ari/cli.c.
References a, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, app, apps, ast_cli(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, stasis_app_get_all(), and ast_cli_entry::usage.
|
static |
Definition at line 433 of file res/ari/cli.c.
References a, ao2_cleanup, ari_conf_get_owc(), ari_conf_get_owcs(), ari_conf_owc_get_invalid_fields(), ARI_OWC_FIELD_APPS, ARI_OWC_FIELD_LOCAL_ARI_USER, ARI_OWC_FIELD_NONE, ari_websocket_type_to_str(), ast_cli(), AST_CLI_YESNO, ast_sorcery_object_get_id(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_sorcery_object(), NULL, RAII_VAR, S_COR, and ast_cli_entry::usage.
|
static |
Definition at line 397 of file res/ari/cli.c.
References a, ao2_callback, ao2_cleanup, ari_conf_get_owcs(), ast_cli(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, DASHES, NULL, OBJ_NODATA, RAII_VAR, show_owc_cb(), and ast_cli_entry::usage.
|
static |
Definition at line 556 of file res/ari/cli.c.
References a, ao2_callback, ao2_cleanup, ari_websocket_get_sessions(), ast_cli(), AST_UUID_STR_LEN, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, DASHES, NULL, OBJ_NODATA, RAII_VAR, sessions, show_sessions_cb(), and ast_cli_entry::usage.
|
static |
Definition at line 140 of file res/ari/cli.c.
References a, ao2_cleanup, ari_conf_get_user(), ari_conf_get_users(), ast_cli(), AST_CLI_YESNO, ast_sorcery_object_get_id(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_sorcery_object(), NULL, RAII_VAR, and ast_cli_entry::usage.
|
static |
Definition at line 87 of file res/ari/cli.c.
References a, ao2_callback, ao2_cleanup, ari_conf_get_users(), ast_cli(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, OBJ_NODATA, RAII_VAR, show_users_cb(), and ast_cli_entry::usage.
|
static |
Definition at line 643 of file res/ari/cli.c.
References a, ao2_cleanup, ari_websocket_get_session(), ari_websocket_get_sessions(), ari_websocket_shutdown(), ast_cli(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_session(), NULL, RAII_VAR, session, sessions, and ast_cli_entry::usage.
|
static |
Definition at line 600 of file res/ari/cli.c.
References a, ari_websocket_shutdown_all(), ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, and ast_cli_entry::usage.
|
static |
Definition at line 493 of file res/ari/cli.c.
References a, ao2_cleanup, ari_conf_get_owc(), ari_conf_get_owcs(), ari_outbound_websocket_start(), ast_cli(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_sorcery_object(), NULL, RAII_VAR, and ast_cli_entry::usage.
|
static |
Definition at line 263 of file res/ari/cli.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_cli_completion_add(), ast_strdup, and container.
Referenced by ari_set_debug(), and ari_show_app().
|
static |
Definition at line 627 of file res/ari/cli.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_cli_completion_add(), ast_strdup, container, and session.
Referenced by ari_shut_session().
|
static |
Definition at line 123 of file res/ari/cli.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_cli_completion_add(), ast_sorcery_object_get_id(), ast_strdup, and container.
Referenced by ari_show_owc(), ari_show_user(), and ari_start_owc().
|
static |
Definition at line 380 of file res/ari/cli.c.
References a, ari_conf_outbound_websocket::apps, ari_conf_owc_get_invalid_fields(), ARI_OWC_FIELD_NONE, ari_websocket_type_to_str(), ast_cli(), ast_sorcery_object_get_id(), ast_websocket_client::connection_type, ast_websocket_client::uri, and ari_conf_outbound_websocket::websocket_client.
Referenced by ari_show_owcs().
|
static |
Definition at line 536 of file res/ari/cli.c.
References a, ari_websocket_type_to_str(), ast_cli(), ast_free, AST_UUID_STR_LEN, ast_vector_string_join(), AST_WS_TYPE_CLIENT_PER_CALL_CONFIG, S_OR, and session.
Referenced by ari_show_sessions().
|
static |
Definition at line 76 of file res/ari/cli.c.
References a, ast_cli(), AST_CLI_YESNO, and ast_sorcery_object_get_id().
Referenced by ari_show_users().
|
static |
Definition at line 683 of file res/ari/cli.c.
Referenced by ari_cli_register(), and ari_cli_unregister().