diff --git a/main/app.c b/main/app.c
index cf48b2f1fd492d89b02d82cae9009a4e06d54ba5..8204344358f8426bed258aea85016438f474748e 100644
--- a/main/app.c
+++ b/main/app.c
@@ -840,8 +840,16 @@ static int __ast_play_and_record(struct ast_channel *chan, const char *playfile,
 			 * off the recording.  However, if we ended with '#', we don't want
 			 * to trim ANY part of the recording.
 			 */
-			if (res > 0 && totalsilence)
+			if (res > 0 && totalsilence) {
 				ast_stream_rewind(others[x], totalsilence - 200);
+				/* Reduce duration by a corresponding amount */
+				if (x == 0 && *duration) {
+					*duration -= (totalsilence - 200) / 1000;
+					if (*duration < 0) {
+						*duration = 0;
+					}
+				}
+			}
 			ast_truncstream(others[x]);
 			ast_closestream(others[x]);
 		}