From cbcc27ef8b1674448bd8b1c45f03388e36f65f51 Mon Sep 17 00:00:00 2001 From: Luis Azedo Date: Thu, 5 Aug 2021 12:32:32 +0100 Subject: [PATCH] textops: check session sendrecv_mode in is_audio_on_hold - if sendrecv_mode is not set in media, check if its set in session --- src/modules/textops/textops.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c index 05491ab184d..84e93f30ed2 100644 --- a/src/modules/textops/textops.c +++ b/src/modules/textops/textops.c @@ -4517,8 +4517,15 @@ static int ki_is_audio_on_hold(sip_msg_t *msg) if(!sdp_stream) break; if(sdp_stream->media.len==AUDIO_STR_LEN && strncmp(sdp_stream->media.s,AUDIO_STR,AUDIO_STR_LEN)==0 && + sdp_stream->sendrecv_mode.len && sdp_stream->is_on_hold) return sdp_stream->is_on_hold; + if(sdp_stream->media.len==AUDIO_STR_LEN && + strncmp(sdp_stream->media.s,AUDIO_STR,AUDIO_STR_LEN)==0 && + !sdp_stream->sendrecv_mode.len && + sdp_session->sendrecv_mode.len && + sdp_session->is_on_hold) + return sdp_session->is_on_hold; sdp_stream_num++; } sdp_session_num++;