Asterisk - The Open Source Telephony Project
21.4.1
|
PBX switch routines. More...
#include "asterisk.h"
#include "asterisk/_private.h"
#include "asterisk/cli.h"
#include "asterisk/linkedlists.h"
#include "asterisk/pbx.h"
#include "pbx_private.h"
Go to the source code of this file.
Data Structures | |
struct | switches |
Functions | |
int | ast_register_switch (struct ast_switch *sw) |
Register an alternative dialplan switch. More... | |
void | ast_unregister_switch (struct ast_switch *sw) |
Unregister an alternative switch. More... | |
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 | |
int | load_pbx_switch (void) |
struct ast_switch * | pbx_findswitch (const char *sw) |
static void | unload_pbx_switch (void) |
Variables | |
static struct ast_cli_entry | sw_cli [] |
static struct switches | switches = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
PBX switch routines.
Definition in file pbx_switch.c.
int ast_register_switch | ( | struct ast_switch * | sw | ) |
Register an alternative dialplan switch.
sw | switch to register |
This function registers a populated ast_switch structure with the asterisk switching architecture.
0 | success |
non-zero | failure |
Definition at line 58 of file pbx_switch.c.
References AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, and ast_switch::name.
Referenced by load_module(), and lua_find_extension().
void ast_unregister_switch | ( | struct ast_switch * | sw | ) |
Unregister an alternative switch.
sw | switch to unregister |
Unregisters a switch from asterisk.
Definition at line 76 of file pbx_switch.c.
References AST_RWLIST_UNLOCK, and AST_RWLIST_WRLOCK.
Referenced by lua_find_extension().
int load_pbx_switch | ( | void | ) |
Provided by pbx_switch.c
Definition at line 125 of file pbx_switch.c.
References ast_cli_register_multiple, and ast_register_cleanup().
struct ast_switch* pbx_findswitch | ( | const char * | sw | ) |
pbx_switch.c functions needed by pbx.c
Definition at line 40 of file pbx_switch.c.
References AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, and ast_switch::name.
|
static |
Definition at line 116 of file pbx_switch.c.