MT#61630 moh: warn if `repeat-duration` flag used

If with the sendonly SDP offer capable of MoH,
there is a flag `repeat-duration` coming at the
same time, then warn a user of rtpengine
that the configuration option is used with MoH
and it's not possible to take the flag's value.

Change-Id: Iacf3ddd85749da3ad98758e386952ab7cec5ca8d
pull/1897/head
Donat Zenichev 11 months ago
parent bfe747e9bc
commit ff089ea6ee

@ -1292,6 +1292,10 @@ const char * call_check_moh(struct call_monologue *from_ml, struct call_monologu
if (call_ml_wants_moh(from_ml, flags->opmode)) if (call_ml_wants_moh(from_ml, flags->opmode))
{ {
const char *errstr = NULL; const char *errstr = NULL;
if (flags->repeat_duration != -1)
ilog(LOG_DEBUG, "Repeat-duration given via flags, but the configuration source will be used!");
media_player_opts_t opts = MPO( media_player_opts_t opts = MPO(
.repeat = rtpe_config.moh_max_repeats, .repeat = rtpe_config.moh_max_repeats,
/* MoH always has duration set (even if not defined) */ /* MoH always has duration set (even if not defined) */

Loading…
Cancel
Save