Asterisk - The Open Source Telephony Project
21.4.1
|
Populate and remember extensions from static config file. More...
#include "asterisk.h"
#include <ctype.h>
#include "asterisk/paths.h"
#include "asterisk/pbx.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/logger.h"
#include "asterisk/cli.h"
#include "asterisk/channel.h"
#include "asterisk/callerid.h"
Go to the source code of this file.
Macros | |
#define | AMI_EXTENSION_ADD "DialplanExtensionAdd" |
#define | AMI_EXTENSION_REMOVE "DialplanExtensionRemove" |
#define | PUT_CTX_HDR |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static void | append_interface (char *iface, int maxlen, char *add) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static char * | complete_dialplan_add_extension (struct ast_cli_args *) |
static char * | complete_dialplan_add_ignorepat (struct ast_cli_args *) |
static char * | complete_dialplan_add_include (struct ast_cli_args *) |
static char * | complete_dialplan_remove_context (struct ast_cli_args *) |
static char * | complete_dialplan_remove_extension (struct ast_cli_args *) |
static char * | complete_dialplan_remove_ignorepat (struct ast_cli_args *) |
static char * | complete_dialplan_remove_include (struct ast_cli_args *) |
static char * | handle_cli_dialplan_add_extension (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
ADD EXTENSION command stuff. | |
static char * | handle_cli_dialplan_add_ignorepat (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_dialplan_add_include (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_dialplan_reload (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_dialplan_remove_context (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_dialplan_remove_extension (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_dialplan_remove_ignorepat (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_dialplan_remove_include (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_dialplan_save (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
'save dialplan' CLI command implementation functions ... | |
static int | load_module (void) |
static int | lookup_c_ip (struct ast_context *c, const char *name) |
return true if 'name' is in the ignorepats for context c | |
static int | lookup_ci (struct ast_context *c, const char *name) |
return true if 'name' is included by context c | |
static int | manager_dialplan_extension_add (struct mansession *s, const struct message *m) |
static int | manager_dialplan_extension_remove (struct mansession *s, const struct message *m) |
static int | partial_match (const char *s, const char *word, int len) |
match the first 'len' chars of word. len==0 always succeeds | |
static int | pbx_load_config (const char *config_file) |
static int | pbx_load_module (void) |
static void | pbx_load_users (void) |
static char * | pbx_strsep (char **destructible, const char *delim) |
static int | reload (void) |
static const char * | skip_words (const char *p, int n) |
moves to the n-th word in the string, or empty string if none | |
static int | split_ec (const char *src, char **ext, char **const ctx, char **const cid) |
split extension@context in two parts, return -1 on error. The return string is malloc'ed and pointed by *ext | |
static void | startup_event_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "Text Extension Configuration" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "da6642af068ee5e6490c5b1d2cc1d238" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static int | autofallthrough_config = 1 |
static int | clearglobalvars_config = 0 |
static struct ast_cli_entry | cli_dialplan_save |
static struct ast_cli_entry | cli_pbx_config [] |
static const char | config [] = "extensions.conf" |
static int | extenpatternmatchnew_config = 0 |
static struct stasis_subscription * | fully_booted_subscription |
static struct ast_context * | local_contexts = NULL |
static struct ast_hashtab * | local_table = NULL |
static char * | overrideswitch_config = NULL |
static const char | registrar [] = "pbx_config" |
static ast_mutex_t | reload_lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static ast_mutex_t | save_dialplan_lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static int | static_config = 0 |
static char | userscontext [AST_MAX_EXTENSION] = "default" |
static int | write_protect_config = 1 |
Populate and remember extensions from static config file.
Definition in file pbx_config.c.
|
static |
dialplan add extension 6123,1,Dial,IAX/212.71.138.13/6123 into local
Definition at line 1308 of file pbx_config.c.
References ast_rdlock_contexts(), ast_strdup, ast_unlock_contexts(), and partial_match().
Referenced by handle_cli_dialplan_add_extension().
|
static |
IGNOREPAT CLI stuff
Definition at line 1340 of file pbx_config.c.
References ast_context_add_ignorepat(), ast_cli_entry::command, ast_context::registrar, and ast_cli_entry::usage.
|
static |
Include context ...
Definition at line 676 of file pbx_config.c.
References ast_context_add_include(), ast_context_find(), ast_context_find_or_create(), ast_cli_entry::command, ast_exten::registrar, and ast_cli_entry::usage.
|
static |
Definition at line 134 of file pbx_config.c.
References ast_context_destroy_by_name(), ast_cli_entry::command, and ast_cli_entry::usage.
|
static |
REMOVE EXTENSION command stuff
Definition at line 417 of file pbx_config.c.
References ast_cli_entry::command, PRIORITY_HINT, ast_context::registrar, split_ec(), and ast_cli_entry::usage.
|
static |
REMOVE INCLUDE command stuff
Definition at line 162 of file pbx_config.c.
References ast_context_remove_include(), ast_cli_entry::command, and ast_cli_entry::usage.
|
static |
Definition at line 2002 of file pbx_config.c.
References ast_add_extension2(), ast_category_browse(), ast_config_destroy(), ast_config_load, ast_config_option(), ast_context_find_or_create(), ast_copy_string(), ast_free_ptr(), ast_manager_get_topic(), ast_strdup, and ast_true().
|
static |
Definition at line 1648 of file pbx_config.c.
|
static |
Standard module functions ...
Definition at line 1627 of file pbx_config.c.
References ast_cli_unregister(), ast_cli_unregister_multiple(), ast_context_destroy(), ast_manager_unregister(), and stasis_unsubscribe_and_join().
|
static |
Definition at line 1618 of file pbx_config.c.
|
static |
CLI entries for commands provided by this module
Definition at line 1607 of file pbx_config.c.