From c9ac1b8ca5477028b80215712ededeac66a6c462 Mon Sep 17 00:00:00 2001
From: Tilghman Lesher <tilghman@meg.abyt.es>
Date: Thu, 26 Jun 2008 17:40:25 +0000
Subject: [PATCH] Don't play "your message has been saved" twice. (closes issue
 #12893)  Reported by: jaroth  Patches:        duplicate_saved.patch uploaded
 by jaroth (license 50)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/app_voicemail.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index d4f647264d..f06ff02d2d 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5394,7 +5394,11 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
 					res = ast_play_and_wait(chan, "vm-messages");
 				if (!res)
 					res = ast_play_and_wait(chan, "vm-saved"); */
-				res = ast_play_and_wait(chan, "vm-msgsaved");
+
+				/* If forwarded with intro, DON'T PLAY THIS MESSAGE AGAIN! */
+				if (ast_strlen_zero(tmptxtfile)) { /* not a forwarded message with intro */
+					res = ast_play_and_wait(chan, "vm-msgsaved");
+				}
 			}	
 		}
 	}
-- 
GitLab