| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
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. | |
| void | ast_unregister_switch (struct ast_switch *sw) | 
| Unregister an alternative switch. | |
| 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 = AST_RWLIST_HEAD_INIT_VALUE | 
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_log, AST_RWLIST_INSERT_TAIL, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_switch::list, LOG_WARNING, and ast_switch::name.
Referenced by load_module(), load_module(), load_module(), load_module(), and load_module().
| 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_REMOVE, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, and ast_switch::list.
Referenced by __unload_module(), unload_module(), unload_module(), unload_module(), and unload_module().
| 
 | static | 
handle_show_switches: CLI support for listing registered dial plan switches
Definition at line 84 of file pbx_switch.c.
References a, ast_cli(), AST_RWLIST_EMPTY, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, ast_switch::description, ast_switch::list, ast_switch::name, NULL, and ast_cli_entry::usage.
| int load_pbx_switch | ( | void | ) | 
Provided by pbx_switch.c
Definition at line 125 of file pbx_switch.c.
References ARRAY_LEN, ast_cli_register_multiple, ast_register_cleanup(), sw_cli, and unload_pbx_switch().
Referenced by asterisk_daemon().
| 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_TRAVERSE, AST_RWLIST_UNLOCK, ast_switch::list, and ast_switch::name.
Referenced by pbx_find_extension(), and pbx_find_extension().
| 
 | static | 
Definition at line 120 of file pbx_switch.c.
References ARRAY_LEN, ast_cli_unregister_multiple(), and sw_cli.
Referenced by load_pbx_switch().
| 
 | static | 
Definition at line 116 of file pbx_switch.c.
Referenced by load_pbx_switch(), and unload_pbx_switch().
| 
 | static |