aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_directory.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-15 00:56:09 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-15 00:56:09 +0000
commitb8dde1bb2df76dd8c6eb2d1de1cce654049ec836 (patch)
tree6dcb04b7ab36b022ad656179e741ce5fc891e07e /apps/app_directory.c
parent8ca18eac9e08f16459a37d001c27528f5ecbe3f5 (diff)
revert a portion of issue #5138 which broke this app (issue #5232)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6609 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_directory.c')
-rwxr-xr-xapps/app_directory.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 4344c85c2..39b7488c6 100755
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -300,8 +300,11 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
return -1;
}
if (digit == '0') {
- if (ast_goto_if_exists(chan, chan->context, "o", 1) ||
- (!ast_strlen_zero(chan->macrocontext) && ast_goto_if_exists(chan, chan->macrocontext, "o", 1))) {
+ if (ast_exists_extension(chan,chan->context,"o",1,chan->cid.cid_num) ||
+ (!ast_strlen_zero(chan->macrocontext) &&
+ ast_exists_extension(chan, chan->macrocontext, "o", 1, chan->cid.cid_num))) {
+ strcpy(chan->exten, "o");
+ chan->priority = 0;
return 0;
} else {
@@ -311,8 +314,11 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
}
}
if (digit == '*') {
- if (ast_goto_if_exists(chan, chan->context, "a", 1) ||
- (!ast_strlen_zero(chan->macrocontext) && ast_goto_if_exists(chan, chan->macrocontext, "a", 1))) {
+ if (ast_exists_extension(chan,chan->context,"a",1,chan->cid.cid_num) ||
+ (!ast_strlen_zero(chan->macrocontext) &&
+ ast_exists_extension(chan, chan->macrocontext, "a", 1, chan->cid.cid_num))) {
+ strcpy(chan->exten, "a");
+ chan->priority = 0;
return 0;
} else {
ast_log(LOG_WARNING, "Can't find extension 'a' in current context. "