Add "Loopback" switch

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-10-24 02:53:24 +00:00
parent 4959fb958c
commit 82cbf28993
11 changed files with 68 additions and 38 deletions

View File

@@ -1754,10 +1754,13 @@ static int pbx_load_module(void)
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
if (ast_context_add_ignorepat2(con, realvalue, registrar))
ast_log(LOG_WARNING, "Unable to include ignorepat '%s' in context '%s'\n", v->value, cxt);
} else if (!strcasecmp(v->name, "switch")) {
} else if (!strcasecmp(v->name, "switch") || !strcasecmp(v->name, "lswitch")) {
char *stringp=NULL;
memset(realvalue, 0, sizeof(realvalue));
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
if (!strcasecmp(v->name, "switch"))
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
else
strncpy(realvalue, v->value, sizeof(realvalue) - 1);
tc = realvalue;
stringp=tc;
appl = strsep(&stringp, "/");