diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index a96103fe1d..cf7c87910a 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -1491,7 +1491,7 @@ static int __rtp_recvfrom(struct ast_rtp_instance *instance, void *buf, size_t s } #endif - if ((*in > 1) && res_srtp && srtp && res_srtp->unprotect(srtp, buf, &len, rtcp) < 0) { + if ((*in & 0xC0) && res_srtp && srtp && res_srtp->unprotect(srtp, buf, &len, rtcp) < 0) { return -1; }