From 82093e7f52030ace70b5fb200d65e65214607712 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Thu, 6 Feb 2025 12:55:31 +0100 Subject: [PATCH] MT#61630 moh: add logs Add more logs to let MoH functionality be more explanative and give a clue it's triggered or not. Change-Id: Ic512883c3ff9b86554e61362c1d1a456dd733c0d --- daemon/call.c | 7 ++++++- daemon/media_player.c | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/daemon/call.c b/daemon/call.c index ffccd79c4..68929770f 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -3473,8 +3473,13 @@ bool call_ml_sendonly_inactive(struct call_monologue *ml) { * sendonly: !MEDIA_ISSET(media, SEND) && MEDIA_ISSET(media, RECV) * inactive: !MEDIA_ISSET(media, SEND) && !MEDIA_ISSET(media, RECV) */ - if (!MEDIA_ISSET(media, SEND)) + if (!MEDIA_ISSET(media, SEND)) { + if (!MEDIA_ISSET(media, RECV)) + ilog(LOG_DEBUG, "Coming SDP offer puts on hold using inactive type."); + else + ilog(LOG_DEBUG, "Coming SDP offer puts on hold using sendonly type."); return true; + } } return false; } diff --git a/daemon/media_player.c b/daemon/media_player.c index 71be739fa..f4f73e2dc 100644 --- a/daemon/media_player.c +++ b/daemon/media_player.c @@ -1576,12 +1576,17 @@ const char * call_check_moh(struct call_monologue *from_ml, struct call_monologu to_ml->player->moh = true; /* handle MoH related flags */ call_ml_moh_handle_flags(from_ml, to_ml); + + ilog(LOG_DEBUG, "Music on hold triggered with coming SDP offer."); + } else if (call_ml_stops_moh(from_ml, to_ml, flags->opmode)) { /* whom to stop the moh audio */ call_stop_media_for_ml(to_ml); /* mark MoH as already not used (it can be unset now) */ to_ml->player->moh = false; + + ilog(LOG_DEBUG, "Music on hold stopped with coming SDP offer."); } return NULL; #else