[Asterisk-cvs] asterisk/apps app_voicemail.c,1.191,1.192

markster at lists.digium.com markster at lists.digium.com
Sun Jan 2 19:56:42 CST 2005


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

Modified Files:
	app_voicemail.c 
Log Message:
Fix "0" auto deleting messages from voicemail (bug #3057)


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -d -r1.191 -r1.192
--- app_voicemail.c	3 Jan 2005 01:16:00 -0000	1.191
+++ app_voicemail.c	3 Jan 2005 02:01:58 -0000	1.192
@@ -5899,8 +5899,17 @@
 #endif
  		case '0':
 			if (message_exists || recorded) {
-				ast_play_and_wait(chan, "vm-deleted");
-				DELETE(recordfile, -1, recordfile);
+				cmd = ast_play_and_wait(chan, "vm-saveoper");
+				if (!cmd)
+					cmd = ast_waitfordigit(chan, 3000);
+				if (cmd == '1') {
+					ast_play_and_wait(chan, "vm-msgsaved");
+					cmd = '0';
+				} else {
+					ast_play_and_wait(chan, "vm-deleted");
+					DELETE(recordfile, -1, recordfile);
+					cmd = '0';
+				}
 			}
 			return cmd;
  		default:




More information about the svn-commits mailing list