[sr-dev] git:master:3ee0670e: textops: RFC2543 is broken

lazedo luis.azedo at factorlusitano.com
Tue Sep 7 13:12:17 CEST 2021


Module: kamailio
Branch: master
Commit: 3ee0670ee9ca5e2812fd90cccef3a7ae4e55a3b4
URL: https://github.com/kamailio/kamailio/commit/3ee0670ee9ca5e2812fd90cccef3a7ae4e55a3b4

Author: lazedo <luis.azedo at factorlusitano.com>
Committer: lazedo <luis.azedo at factorlusitano.com>
Date: 2021-09-07T12:12:12+01:00

textops: RFC2543 is broken

commit cbcc27ef8b1674448bd8b1c45f03388e36f65f51 broke RFC2543 hold

there's no need to check for sendrecv_mode, is_on_hold is either set or not in sdp_stream and/or sdp_session

---

Modified: src/modules/textops/textops.c

---

Diff:  https://github.com/kamailio/kamailio/commit/3ee0670ee9ca5e2812fd90cccef3a7ae4e55a3b4.diff
Patch: https://github.com/kamailio/kamailio/commit/3ee0670ee9ca5e2812fd90cccef3a7ae4e55a3b4.patch

---

diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c
index 84e93f30ed..bfb5a54941 100644
--- a/src/modules/textops/textops.c
+++ b/src/modules/textops/textops.c
@@ -4517,13 +4517,10 @@ 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++;




More information about the sr-dev mailing list