[asterisk-commits] trunk r14822 - in /trunk: ./ apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Mar 24 21:10:36 MST 2006


Author: tilghman
Date: Fri Mar 24 22:10:35 2006
New Revision: 14822

URL: http://svn.digium.com/view/asterisk?rev=14822&view=rev
Log:
Merged revisions 14821 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14821 | tilghman | 2006-03-24 22:09:04 -0600 (Fri, 24 Mar 2006) | 2 lines

Bug 6783 - When context is specified, voicemail should look for mailboxes in that context

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_voicemail.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=14822&r1=14821&r2=14822&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Fri Mar 24 22:10:35 2006
@@ -3473,11 +3473,13 @@
 		return res;
 	if (flag==1) {
 		struct leave_vm_options leave_options;
+		char mailbox[AST_MAX_EXTENSION * 2 + 2];
+		snprintf(mailbox, sizeof(mailbox), "%s@%s", username, context);
 
 		/* Send VoiceMail */
 		memset(&leave_options, 0, sizeof(leave_options));
 		leave_options.record_gain = record_gain;
-		cmd = leave_voicemail(chan, username, &leave_options);
+		cmd = leave_voicemail(chan, mailbox, &leave_options);
 	} else {
 
 		/* Forward VoiceMail */
@@ -6635,13 +6637,15 @@
 			} else {
 				if (find_user(NULL, vmu->context, num)) {
 					struct leave_vm_options leave_options;
+					char mailbox[AST_MAX_EXTENSION * 2 + 2];
+					snprintf(mailbox, sizeof(mailbox), "%s@%s", num, vmu->context);
 
 					if (option_verbose > 2)
 						ast_verbose(VERBOSE_PREFIX_3 "Leaving voicemail for '%s' in context '%s'\n", num, vmu->context);
 					
 					memset(&leave_options, 0, sizeof(leave_options));
 					leave_options.record_gain = record_gain;
-					res = leave_voicemail(chan, num, &leave_options);
+					res = leave_voicemail(chan, mailbox, &leave_options);
 					if (!res)
 						res = 't';
 					return res;



More information about the asterisk-commits mailing list