Add autofallthrough mode

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-10-16 19:46:02 +00:00
parent eadd6c5509
commit 996c8e7126
4 changed files with 127 additions and 64 deletions

View File

@@ -42,6 +42,7 @@ static char *registrar = "pbx_config";
static int static_config = 0;
static int write_protect_config = 1;
static int autofallthrough_config = 0;
AST_MUTEX_DEFINE_STATIC(save_dialplan_lock);
@@ -1629,6 +1630,10 @@ static int pbx_load_module(void)
"static"));
write_protect_config = ast_true(ast_variable_retrieve(cfg, "general",
"writeprotect"));
autofallthrough_config = ast_true(ast_variable_retrieve(cfg, "general",
"autofallthrough"));
v = ast_variable_browse(cfg, "globals");
while(v) {
memset(realvalue, 0, sizeof(realvalue));
@@ -1774,6 +1779,8 @@ static int pbx_load_module(void)
for (con = ast_walk_contexts(NULL); con; con = ast_walk_contexts(con))
ast_context_verify_includes(con);
pbx_set_autofallthrough(autofallthrough_config);
return 0;
}