--- apps/app_voicemail.c.orig 2005-05-20 02:29:03.000000000 +0200 +++ apps/app_voicemail.c 2005-05-20 02:42:31.000000000 +0200 @@ -287,6 +287,9 @@ "valid. If the mailbox is not specified, the channel variable AUTH_MAILBOX will\n" "be set with the authenticated mailbox.\n" "If the options contain 's' then no initial prompts will be played.\n"; +"If the options contain 't' then the mailbox[@context] supplied will be used\n" +"transparently as the mailbox and only the password will be prompted for\n" +"this more closely mimics the functionality of Authenticate\n"; /* Leave a message */ static char *app = "VoiceMail"; @@ -5107,6 +5110,7 @@ struct ast_vm_user vmus; char *options = NULL; int silent = 0; + int skipuser = 0; int res = -1; if (s) { @@ -5121,6 +5125,9 @@ s = user; user = strsep(&s, "@"); context = strsep(&s, ""); + if (options) { + skipuser = (strchr(options, 't')) != NULL; + } } } @@ -5130,7 +5137,7 @@ LOCAL_USER_ADD(u); - 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); res = 0;