diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 177fbffcc5..45ab478f96 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -4066,7 +4066,10 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t #endif #ifdef ENABLE_SRTP - if (rtp_session->flags[SWITCH_RTP_FLAG_SECURE_RECV] && rtp_session->recv_msg.header.version == 2 && rtp_session->recv_msg.header.pt == rtp_session->rpayload) { + if (rtp_session->flags[SWITCH_RTP_FLAG_SECURE_RECV] && rtp_session->recv_msg.header.version == 2 && + ((rtp_session->recv_msg.header.pt == rtp_session->rpayload) || + (rtp_session->recv_te && rtp_session->recv_msg.header.pt == rtp_session->recv_te) || + (rtp_session->cng_pt && rtp_session->recv_msg.header.pt == rtp_session->cng_pt))) { //if (rtp_session->flags[SWITCH_RTP_FLAG_SECURE_RECV] && (!rtp_session->ice.ice_user || rtp_session->recv_msg.header.version == 2)) { int sbytes = (int) *bytes; err_status_t stat = 0;