diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c9ca7d85de..abf535782a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -30275,6 +30275,12 @@ static int setup_srtp(struct sip_srtp **srtp) static int process_crypto(struct sip_pvt *p, struct ast_rtp_instance *rtp, struct sip_srtp **srtp, const char *a) { + /* If no RTP instance exists for this media stream don't bother processing the crypto line */ + if (!rtp) { + ast_debug(3, "Received offer with crypto line for media stream that is not enabled\n"); + return FALSE; + } + if (strncasecmp(a, "crypto:", 7)) { return FALSE; }