aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_authenticate.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-11-11 15:13:41 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-11-11 15:13:41 +0000
commit2240be6b66a85fe716956d6f6938eabd3c0fef9b (patch)
treea41abdb8120e2f71e88d0e42db38e306ecfe84f5 /apps/app_authenticate.c
parent0c6c18fbf8c28d2158d52ff35e07302e745565a2 (diff)
Allow app_authenticate to go to n+101
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4204 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_authenticate.c')
-rwxr-xr-xapps/app_authenticate.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/app_authenticate.c b/apps/app_authenticate.c
index 9b64c6cda..7f681006c 100755
--- a/apps/app_authenticate.c
+++ b/apps/app_authenticate.c
@@ -47,7 +47,7 @@ static char *descrip =
"When using a database key, the value associated with the key can be\n"
"anything.\n"
"Returns 0 if the user enters a valid password within three\n"
-"tries, or -1 otherwise (or on hangup).\n";
+"tries, or -1 (or on hangup) or n+101 if exists.\n";
STANDARD_LOCAL_USER;
@@ -133,11 +133,14 @@ static int auth_exec(struct ast_channel *chan, void *data)
if (!res)
res = ast_waitstream(chan, "");
} else {
- if (!res)
- res = ast_streamfile(chan, "vm-goodbye", chan->language);
- if (!res)
- res = ast_waitstream(chan, "");
- res = -1;
+ if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->cid.cid_num)) {
+ chan->priority+=100;
+ res = 0;
+ } else {
+ if (!ast_streamfile(chan, "vm-goodbye", chan->language))
+ res = ast_waitstream(chan, "");
+ res = -1;
+ }
}
LOCAL_USER_REMOVE(u);
return res;