40 "Usage: ari show status\n"
41 " Shows all ARI settings\n";
56 ast_cli(
a->fd,
"Error getting ARI configuration\n");
95 "Usage: ari show users\n"
96 " Shows all ARI users\n";
110 ast_cli(
a->fd,
"Error getting ARI configuration\n");
150 ast_cli(
a->fd,
"Error getting ARI configuration\n");
179 "Usage: ari show user <username>\n"
180 " Shows a specific ARI user\n";
195 ast_cli(
a->fd,
"Error getting ARI configuration\n");
201 ast_cli(
a->fd,
"User '%s' not found\n",
a->argv[3]);
219 "Usage: ari mkpasswd <password>\n"
220 " Encrypts a password for use in ari.conf\n"
221 " Be aware that the password will be shown in the\n"
222 " command line history. The mkpasswd shell command\n"
223 " may be preferable.\n"
238 ast_cli(
a->fd,
"Failed to encrypt password\n");
243 "; Copy the following two lines into ari.conf\n");
244 ast_cli(
a->fd,
"password_format = crypt\n");
245 ast_cli(
a->fd,
"password = %s\n", crypted);
260 "Usage: ari show apps\n"
261 " Lists all registered applications.\n"
276 ast_cli(
a->fd,
"Unable to retrieve registered applications!\n");
280 ast_cli(
a->fd,
"Application Name \n");
281 ast_cli(
a->fd,
"=========================\n");
325 ast_cli(
a->fd,
"Error getting ARI applications\n");
348 "Usage: ari show app <application>\n"
349 " Provide detailed information about a registered application.\n"
383 "Usage: ari set debug <application|all> <on|off>\n"
384 " Enable or disable debugging on a specific application.\n"
397 debug = !strcmp(
a->argv[4],
"on");
399 if (!strcmp(
a->argv[3],
"all")) {
401 ast_cli(
a->fd,
"Debugging on all applications %s\n",
402 debug ?
"enabled" :
"disabled");
412 ast_cli(
a->fd,
"Debugging on '%s' %s\n",
414 debug ?
"enabled" :
"disabled");
Asterisk main include file. File version handling, generic pbx functions.
#define ast_strdup(str)
A wrapper for strdup()
#define ao2_iterator_next(iter)
#define ao2_callback(c, flags, cb_fn, arg)
ao2_callback() is a generic function that applies cb_fn() to all objects in a container,...
int ao2_container_count(struct ao2_container *c)
Returns the number of elements in a container.
#define ao2_callback_data(container, flags, cb_fn, arg, data)
#define ao2_find(container, arg, flags)
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
@ OBJ_SEARCH_PARTIAL_KEY
The arg parameter is a partial search key similar to OBJ_SEARCH_KEY.
Standard Command Line Interface.
#define AST_CLI_YESNO(x)
Return Yes or No depending on the argument.
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
#define AST_CLI_DEFINE(fn, txt,...)
void ast_cli(int fd, const char *fmt,...)
#define ast_cli_register_multiple(e, len)
Register multiple commands.
Internal API's for res_ari.
static char * ari_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static char * ari_mkpasswd(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static char * complete_ari_user(struct ast_cli_args *a)
static int complete_ari_app_search(void *obj, void *arg, void *data, int flags)
static char * ari_show_apps(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 int complete_ari_user_search(void *obj, void *arg, void *data, int flags)
static char * complete_ari_app(struct ast_cli_args *a, int include_all)
static char * complete_ari_show_user(struct ast_cli_args *a)
static int show_users_cb(void *obj, void *arg, int flags)
static char * ari_show_app(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static struct ast_cli_entry cli_ari[]
int ast_ari_cli_register(void)
Register CLI commands for ARI.
void ast_ari_cli_unregister(void)
Unregister CLI commands for ARI.
static char * ari_show_users(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)
struct ast_ari_conf * ast_ari_config_get(void)
Get the current ARI configuration.
static int debug
Global debug status.
Stasis Application API. See Stasis Application API for detailed documentation.
void stasis_app_set_debug(struct stasis_app *app, int debug)
Enable/disable request/response and event logging on an application.
void stasis_app_set_global_debug(int debug)
Enable/disable request/response and event logging on all applications.
void stasis_app_to_cli(const struct stasis_app *app, struct ast_cli_args *a)
Dump properties of a stasis_app to the CLI.
struct stasis_app * stasis_app_get_by_name(const char *name)
Retrieve a handle to a Stasis application by its name.
struct ao2_container * stasis_app_get_all(void)
Gets the names of all registered Stasis applications.
const char * stasis_app_name(const struct stasis_app *app)
Retrieve an application's name.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
int ast_str_container_add(struct ao2_container *str_container, const char *add)
Adds a string to a string container allocated by ast_str_container_alloc.
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
Registered applications container.
Per-user configuration options.
All configuration options for ARI.
descriptor for a cli entry.
All configuration options for http media cache.
struct conf_general_options * general
structure to hold users read from users.conf
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
char * ast_crypt_encrypt(const char *key)
Asterisk wrapper around crypt(3) for encrypting passwords.