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

Alexander Traud asteriskteam at digium.com
Wed Dec 23 08:44:39 CST 2020


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


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/33/15233/1

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ad4f968..d9b83f9 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -10879,11 +10879,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;
@@ -10912,7 +10912,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;
@@ -10924,7 +10924,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/+/15233
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ie49e4e2a11f0265f914b684738348ba8c0f89755
Gerrit-Change-Number: 15233
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/a191faec/attachment-0001.html>


More information about the asterisk-code-review mailing list