[asterisk-commits] mmichelson: trunk r128731 - /trunk/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 7 15:28:33 CDT 2008


Author: mmichelson
Date: Mon Jul  7 15:28:33 2008
New Revision: 128731

URL: http://svn.digium.com/view/asterisk?view=rev&rev=128731
Log:
If imapfolder=foo were set in voicemail.conf, then when calling VoiceMailMain,
app_voicemail would attempt to play a file called vm-foo instead of playing
vm-INBOX to play the "new" sound file. This commit fixes that issue.

This may fix one of the problems reported in issue #12987


Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=128731&r1=128730&r2=128731
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Mon Jul  7 15:28:33 2008
@@ -5918,10 +5918,14 @@
 
 	if (box == OLD_FOLDER) {
 		ast_copy_string(vms->curbox, mbox(NEW_FOLDER), sizeof(vms->curbox));
-		snprintf(vms->vmbox, sizeof(vms->vmbox), "vm-%s", mbox(1));
 	} else {
 		ast_copy_string(vms->curbox, mbox(box), sizeof(vms->curbox));
-		snprintf(vms->vmbox, sizeof(vms->vmbox), "vm-%s", vms->curbox);
+	}
+
+	if (box == NEW_FOLDER) {
+		ast_copy_string(vms->vmbox, "vm-INBOX", sizeof(vm->vmbox));
+	} else {
+		snprintf(vms->vmbox, sizeof(vm->vmbox), "vm-%s", mbox(box));
 	}
 
 	/* Build up server information */




More information about the asterisk-commits mailing list