Module: kamailio
Branch: 5.5
Commit: dadac04b0153a29ed7c1ebb48e887c06989fa49c
URL:
https://github.com/kamailio/kamailio/commit/dadac04b0153a29ed7c1ebb48e887c0…
Author: Luis Azedo <luis.azedo(a)factorlusitano.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-08-19T21:33:08+02:00
textops: check session sendrecv_mode in is_audio_on_hold
- if sendrecv_mode is not set in media, check if its set in session
(cherry picked from commit cbcc27ef8b1674448bd8b1c45f03388e36f65f51)
---
Modified: src/modules/textops/textops.c
---
Diff:
https://github.com/kamailio/kamailio/commit/dadac04b0153a29ed7c1ebb48e887c0…
Patch:
https://github.com/kamailio/kamailio/commit/dadac04b0153a29ed7c1ebb48e887c0…
---
diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c
index 2998906051..4b3216d4d2 100644
--- a/src/modules/textops/textops.c
+++ b/src/modules/textops/textops.c
@@ -4367,8 +4367,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++;