diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 22a3457675a1fb5979efa1704eb13c78f56a7859..e1dfd5ddd89c732b26bde47607b5b02aae278b10 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10437,6 +10437,15 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action type, value, (processed == TRUE)? "OK." : "UNSUPPORTED OR FAILED."); } + + /* Ensure crypto lines are provided where necessary */ + if (audio && secure_audio && !processed_crypto) { + ast_log(LOG_WARNING, "Rejecting secure audio stream without encryption details: %s\n", m); + return -1; + } else if (video && secure_video && !processed_crypto) { + ast_log(LOG_WARNING, "Rejecting secure video stream without encryption details: %s\n", m); + return -1; + } } /* Sanity checks */