aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_directory.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-23 00:06:46 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-23 00:06:46 +0000
commit28199081e9b0aec5a884e3232f270a3a48301ce4 (patch)
tree383f3b434c58baeed8b8b19624518e5d95e2af25 /apps/app_directory.c
parent899ce8fd6d00884844847794317e88d70eaec896 (diff)
Tilghman's directory fix (bug #1892)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3280 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_directory.c')
-rwxr-xr-xapps/app_directory.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c
index cd164e55c..d3d899c86 100755
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -267,6 +267,9 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
case '1':
/* user pressed '1' and extensions exists */
lastuserchoice = res;
+ strncpy(chan->context, dialcontext, sizeof(chan->context) - 1);
+ strncpy(chan->exten, v->name, sizeof(chan->exten) - 1);
+ chan->priority = 0;
break;
case '*':
/* user pressed '*' to skip something found */
@@ -289,7 +292,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
res = 1;
return res;
}
-
+ return 0;
}
return res;
}
@@ -301,7 +304,7 @@ static int directory_exec(struct ast_channel *chan, void *data)
struct ast_config *cfg;
char *context, *dialcontext, *dirintro;
if (!data) {
- ast_log(LOG_WARNING, "directory requires an argument (context)\n");
+ ast_log(LOG_WARNING, "directory requires an argument (context[,dialcontext])\n");
return -1;
}
cfg = ast_load(DIRECTORY_CONFIG);