MT#62750 stop media: if MoH is ongoing, ignore the command

If someone wants to stop the media for this particular monologue,
and it already has the MP allocated, which is marked for MoH,
then just ignore the stop media command.

This is to not let the play media/stop media procedures
overlap with potentially (previously) triggered MP via MoH.

Change-Id: If0bf4264b9c640b99f844efe5c2c8bc201a6ad16
pull/1126/merge
Donat Zenichev 1 month ago
parent 7a83ce891a
commit c5fef5e0d4

@ -1967,6 +1967,9 @@ const char *call_stop_media_ng(ng_command_ctx_t *ctx) {
if (!monologue->player)
return "Not currently playing media";
if (monologue->player->opts.moh)
return "Currently MoH ongoing, ignore stop media.";
last_frame_pos = call_stop_media_for_ml(monologue);
}
parser->dict_add_int(ctx->resp, "last-frame-pos", last_frame_pos);

Loading…
Cancel
Save