[Asterisk-cvs] asterisk/apps app_voicemail.c,1.47,1.48

martinp at lists.digium.com martinp at lists.digium.com
Mon Dec 22 12:38:49 CST 2003


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

Modified Files:
	app_voicemail.c 
Log Message:
Play a beep after the user chooses prepending


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- app_voicemail.c	22 Dec 2003 18:22:21 -0000	1.47
+++ app_voicemail.c	22 Dec 2003 18:30:24 -0000	1.48
@@ -891,9 +891,9 @@
 	return d;
 }
 
-static int play_and_prepend(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt)
+static int play_and_prepend(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt, int beep)
 {
-	char d, *fmts;
+	char d = 0, *fmts;
 	char comment[256];
 	int x, fmtcnt=1, res=-1,outmsg=0;
 	struct ast_frame *f;
@@ -912,8 +912,9 @@
 	ast_log(LOG_DEBUG,"play_and_preped: %s, %s, '%s'\n", playfile ? playfile : "<None>", recordfile, fmt);
 	snprintf(comment,sizeof(comment),"Playing %s, Recording to: %s on %s\n", playfile ? playfile : "<None>", recordfile, chan->name);
 
-	if (playfile) {	
-		d = play_and_wait(chan, playfile);
+	if (playfile || beep) {	
+		if (!beep)
+			d = play_and_wait(chan, playfile);
 		if (d > -1)
 			d = ast_streamfile(chan, "beep",chan->language);
 		if (!d)
@@ -2136,7 +2137,7 @@
 		{
 			char file[200];
 			snprintf(file, sizeof(file), "%s/msg%04d", curdir, curmsg);
-			cmd = play_and_prepend(chan, NULL, file, 0, vmfmts);
+			cmd = play_and_prepend(chan, NULL, file, 0, vmfmts, 1);
 			break;
 		}
 		case '2': 




More information about the svn-commits mailing list