[Asterisk-cvs] asterisk/apps app_voicemail.c,1.125,1.126

markster at lists.digium.com markster at lists.digium.com
Thu Jul 1 18:13:00 CDT 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv13250/apps

Modified Files:
	app_voicemail.c 
Log Message:
Fix missing context when calling app_hasvoicemail (bug #1962)


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- app_voicemail.c	1 Jul 2004 17:34:42 -0000	1.125
+++ app_voicemail.c	1 Jul 2004 21:58:50 -0000	1.126
@@ -2544,10 +2544,11 @@
 
 static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu, int msgnum, long duration, char *fmt, char *callerid)
 {
-	char todir[256], fn[256], *stringp;
+	char todir[256], fn[256], ext_context[256], *stringp;
 
 	make_dir(todir, sizeof(todir), vmu->context, vmu->mailbox, "INBOX");
 	make_file(fn, sizeof(fn), todir, msgnum);
+	snprintf(ext_context, sizeof(ext_context), "%s@%s", vmu->mailbox, vmu->context);
 
 	/* Attach only the first format */
 	fmt = ast_strdupa(fmt);
@@ -2580,8 +2581,8 @@
 	}
 
 	/* Leave voicemail for someone */
-	manager_event(EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s\r\nWaiting: %d\r\n", vmu->mailbox, ast_app_has_voicemail(vmu->mailbox));
-	run_externnotify(chan->context, vmu->mailbox, ast_app_has_voicemail(vmu->mailbox));
+	manager_event(EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s@%s\r\nWaiting: %d\r\n", vmu->mailbox, vmu->context, ast_app_has_voicemail(ext_context));
+	run_externnotify(chan->context, ext_context, ast_app_has_voicemail(ext_context));
 	return 0;
 }
 




More information about the svn-commits mailing list