--- channels/chan_sip.c (Asterisk 13.38.1) +++ channels/chan_sip.c (working copy) @@ -10840,3 +10840,3 @@ static int process_sdp(struct sip_pvt *p /* 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); @@ -10844,3 +10844,3 @@ static int process_sdp(struct sip_pvt *p 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); @@ -10873,3 +10873,3 @@ static int process_sdp(struct sip_pvt *p - 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"); @@ -10885,3 +10885,3 @@ static int process_sdp(struct sip_pvt *p - 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");