[Asterisk-code-review] res musiconhold: Start playlist after initial announcement (asterisk[15])

Jenkins2 asteriskteam at digium.com
Fri Dec 15 10:25:33 CST 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7583 )

Change subject: res_musiconhold: Start playlist after initial announcement
......................................................................

res_musiconhold: Start playlist after initial announcement

Reset the samples counter to zero when we are done playing an
announcement so that we don't skip into the middle of the first file in
the playlist.

Also add the selected annoucement to the output of 'moh show classes.'

ASTERISK-24329 #close
Reported by: Thomas Frederiksen

Change-Id: I2a5f986a31279c981592f49391409ebf38d6f6d0
---
M res/res_musiconhold.c
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index ef1b81c..17e91b7 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -333,6 +333,7 @@
 		}
 	} else {
 		state->announcement = 0;
+		state->samples = 0;
 	}
 
 	if (!state->class->total_files) {
@@ -1934,6 +1935,9 @@
 		ast_cli(a->fd, "Class: %s\n", class->name);
 		ast_cli(a->fd, "\tMode: %s\n", S_OR(class->mode, "<none>"));
 		ast_cli(a->fd, "\tDirectory: %s\n", S_OR(class->dir, "<none>"));
+		if (ast_test_flag(class, MOH_ANNOUNCEMENT)) {
+			ast_cli(a->fd, "\tAnnouncement: %s\n", S_OR(class->announcement, "<none>"));
+		}
 		if (ast_test_flag(class, MOH_CUSTOM)) {
 			ast_cli(a->fd, "\tApplication: %s\n", S_OR(class->args, "<none>"));
 			ast_cli(a->fd, "\tKill Escalation Delay: %zu ms\n", class->kill_delay / 1000);

-- 
To view, visit https://gerrit.asterisk.org/7583
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I2a5f986a31279c981592f49391409ebf38d6f6d0
Gerrit-Change-Number: 7583
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171215/6b6ca63f/attachment.html>


More information about the asterisk-code-review mailing list