From: Ben Ford Date: Fri, 13 Apr 2018 19:32:48 +0000 (-0500) Subject: res_musiconhold: Don't restart MOH from beginning after announcement. X-Git-Tag: 13.21.0-rc1~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2e140e8a7b9311d671c6f52139bdae8be59d531;p=thirdparty%2Fasterisk.git res_musiconhold: Don't restart MOH from beginning after announcement. This reverts a problem introduced by the fix for ASTERISK_24329. Now, when an announcement is played while waiting in a queue, music on hold will not restart from the beginning of the sound file and will instead pick up where it left off. However, the incorrect behavior in ASTERISK_24329 is now present again; if an announcement X seconds long is played when music on hold starts, music on hold will start X seconds into the file. ASTERISK-27774 #close Reported by: lvl Change-Id: I86b2885ee7063268f9b9747eddb788336ade989b --- diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 0afacf53c2..17bcd904b2 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -331,7 +331,6 @@ static int ast_moh_files_next(struct ast_channel *chan) } } else { state->announcement = 0; - state->samples = 0; } if (!state->class->total_files) {