46 if (!strcasecmp(asw->
name, sw))
64 if (!strcasecmp(tmp->
name, sw->
name)) {
90 e->
command =
"core show switches";
92 "Usage: core show switches\n" 93 " List registered switches\n";
103 ast_cli(a->
fd,
"There are no registered alternative switches\n");
107 ast_cli(a->
fd,
"\n -= Registered Asterisk Alternative Switches =-\n");
static char * handle_show_switches(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
handle_show_switches: CLI support for listing registered dial plan switches
#define AST_CLI_DEFINE(fn, txt,...)
Asterisk main include file. File version handling, generic pbx functions.
Private include file for pbx.
#define AST_RWLIST_HEAD_STATIC(name, type)
Defines a structure to be used to hold a read/write list of specified type, statically initialized...
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
#define AST_RWLIST_WRLOCK(head)
Write locks a list.
descriptor for a cli entry.
#define AST_RWLIST_UNLOCK(head)
Attempts to unlock a read/write based list.
#define ast_cli_register_multiple(e, len)
Register multiple commands.
void ast_cli(int fd, const char *fmt,...)
int ast_register_switch(struct ast_switch *sw)
Register an alternative dialplan switch.
#define AST_RWLIST_RDLOCK(head)
Read locks a list.
void ast_unregister_switch(struct ast_switch *sw)
Unregister an alternative switch.
int ast_register_cleanup(void(*func)(void))
Register a function to be executed before Asterisk gracefully exits.
#define AST_RWLIST_TRAVERSE
static struct ast_cli_entry sw_cli[]
A set of macros to manage forward-linked lists.
Core PBX routines and definitions.
Prototypes for public functions only of internal interest,.
#define AST_RWLIST_INSERT_TAIL
Standard Command Line Interface.
struct ast_switch * pbx_findswitch(const char *sw)
int load_pbx_switch(void)
#define AST_RWLIST_REMOVE
struct ast_switch::@278 list
static void unload_pbx_switch(void)