diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2006-01-11 01:31:28 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2006-01-11 01:31:28 +0000 |
commit | bdc14f3c846a1ed888f9b873a2824b95f801b0f8 (patch) | |
tree | e4c98ca6c1e165fc25d89e5d5a98615987774c58 /apps/app_voicemail.c | |
parent | 466a062b0922b89b1cca1f290e99c0506b95c519 (diff) |
Merged revisions 7955 via svnmerge from
/branches/1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index e12df3af7..2eaba1762 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -5621,10 +5621,10 @@ static int vm_box_exists(struct ast_channel *chan, void *data) static int vmauthenticate(struct ast_channel *chan, void *data) { struct localuser *u; - char *s = data, *user=NULL, *context=NULL, mailbox[AST_MAX_EXTENSION]; + char *s = data, *user=NULL, *context=NULL, mailbox[AST_MAX_EXTENSION] = ""; struct ast_vm_user vmus; char *options = NULL; - int silent = 0; + int silent = 0, skipuser = 0; int res = -1; LOCAL_USER_ADD(u); @@ -5641,6 +5641,9 @@ static int vmauthenticate(struct ast_channel *chan, void *data) s = user; user = strsep(&s, "@"); context = strsep(&s, ""); + if (!ast_strlen_zero(user)) + skipuser++; + ast_copy_string(mailbox, user, sizeof(mailbox)); } } @@ -5648,9 +5651,10 @@ static int vmauthenticate(struct ast_channel *chan, void *data) silent = (strchr(options, 's')) != NULL; } - if (!vm_authenticate(chan, mailbox, sizeof(mailbox), &vmus, context, NULL, 0, 3, silent)) { + if (!vm_authenticate(chan, mailbox, sizeof(mailbox), &vmus, context, NULL, skipuser, 3, silent)) { pbx_builtin_setvar_helper(chan, "AUTH_MAILBOX", mailbox); pbx_builtin_setvar_helper(chan, "AUTH_CONTEXT", vmus.context); + ast_play_and_wait(chan, "auth-thankyou"); res = 0; } |