Module: kamailio
Branch: master
Commit: cbcc27ef8b1674448bd8b1c45f03388e36f65f51
URL:
https://github.com/kamailio/kamailio/commit/cbcc27ef8b1674448bd8b1c45f03388…
Author: Luis Azedo <luis.azedo(a)factorlusitano.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-08-11T19:38:16+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
---
Modified: src/modules/textops/textops.c
---
Diff:
https://github.com/kamailio/kamailio/commit/cbcc27ef8b1674448bd8b1c45f03388…
Patch:
https://github.com/kamailio/kamailio/commit/cbcc27ef8b1674448bd8b1c45f03388…
---
diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c
index 05491ab184..84e93f30ed 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++;