[asterisk-commits] branch 1.2 - r7955
/branches/1.2/apps/app_voicemail.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jan 10 19:30:11 CST 2006
Author: tilghman
Date: Tue Jan 10 19:30:10 2006
New Revision: 7955
URL: http://svn.digium.com/view/asterisk?rev=7955&view=rev
Log:
Bug 6192 - behave correctly when mailbox is specified as argument
Modified:
branches/1.2/apps/app_voicemail.c
Modified: branches/1.2/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_voicemail.c?rev=7955&r1=7954&r2=7955&view=diff
==============================================================================
--- branches/1.2/apps/app_voicemail.c (original)
+++ branches/1.2/apps/app_voicemail.c Tue Jan 10 19:30:10 2006
@@ -5645,10 +5645,10 @@
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);
@@ -5665,6 +5665,9 @@
s = user;
user = strsep(&s, "@");
context = strsep(&s, "");
+ if (!ast_strlen_zero(user))
+ skipuser++;
+ ast_copy_string(mailbox, user, sizeof(mailbox));
}
}
@@ -5672,9 +5675,10 @@
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;
}
More information about the asterisk-commits
mailing list