[Asterisk-code-review] chan_sip: Hold/Resume an sRTP call which had other/less media streams. (asterisk[16])

Alexander Traud asteriskteam at digium.com
Wed Dec 23 08:46:33 CST 2020


Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15272 )


Change subject: chan_sip: Hold/Resume an sRTP call which had other/less media streams.
......................................................................

chan_sip: Hold/Resume an sRTP call which had other/less media streams.

For example, when resuming a call with audio+video, but the session
was audio-only before the hold, Asterisk ended the call.

ASTERISK-29222

Change-Id: Ie49e4e2a11f0265f914b684738348ba8c0f89755
---
M channels/chan_sip.c
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/72/15272/1

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 7b65e84..6ae4859 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -10878,11 +10878,11 @@
 		}
 
 		/* Ensure crypto lines are provided where necessary */
-		if (audio && secure_audio && !processed_crypto) {
+		if (p->rtp && audio && secure_audio && !processed_crypto) {
 			ast_log(LOG_WARNING, "Rejecting secure audio stream without encryption details: %s\n", m);
 			res = -1;
 			goto process_sdp_cleanup;
-		} else if (video && secure_video && !processed_crypto) {
+		} else if (p->vrtp && video && secure_video && !processed_crypto) {
 			ast_log(LOG_WARNING, "Rejecting secure video stream without encryption details: %s\n", m);
 			res = -1;
 			goto process_sdp_cleanup;
@@ -10911,7 +10911,7 @@
 		p->srtp = NULL;
 	}
 
-	if (secure_audio && !(p->srtp && (ast_test_flag(p->srtp, AST_SRTP_CRYPTO_OFFER_OK)))) {
+	if (p->rtp && secure_audio && !(p->srtp && ast_test_flag(p->srtp, AST_SRTP_CRYPTO_OFFER_OK))) {
 		ast_log(LOG_WARNING, "Can't provide secure audio requested in SDP offer\n");
 		res = -1;
 		goto process_sdp_cleanup;
@@ -10923,7 +10923,7 @@
 		goto process_sdp_cleanup;
 	}
 
-	if (secure_video && !(p->vsrtp && (ast_test_flag(p->vsrtp, AST_SRTP_CRYPTO_OFFER_OK)))) {
+	if (p->vrtp && secure_video && !(p->vsrtp && ast_test_flag(p->vsrtp, AST_SRTP_CRYPTO_OFFER_OK))) {
 		ast_log(LOG_WARNING, "Can't provide secure video requested in SDP offer\n");
 		res = -1;
 		goto process_sdp_cleanup;

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15272
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ie49e4e2a11f0265f914b684738348ba8c0f89755
Gerrit-Change-Number: 15272
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201223/5294a990/attachment.html>


More information about the asterisk-code-review mailing list