diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index a96103fe1d5f1aa523de2e3aeb85149148e1c91a..cf7c87910a9939bfb420425654d844a5c6339097 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;
 	}