Index: main/rtp.c =================================================================== --- main/rtp.c (revision 213898) +++ main/rtp.c (working copy) @@ -1034,8 +1034,11 @@ ast_verbose("Received a BYE from %s:%d\n", ast_inet_ntoa(rtp->rtcp->them.sin_addr), ntohs(rtp->rtcp->them.sin_port)); break; default: - if (option_debug) + if (option_debug > 10) { + /* RFC 3550, section 6.1 states "An implementation SHOULD + * ignore incoming RTCP packets with types unknown to it." */ ast_log(LOG_DEBUG, "Unknown RTCP packet (pt=%d) received from %s:%d\n", pt, ast_inet_ntoa(rtp->rtcp->them.sin_addr), ntohs(rtp->rtcp->them.sin_port)); + } break; } position += (length + 1); @@ -1331,7 +1334,12 @@ /* Comfort Noise */ f = process_rfc3389(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen); } else { - ast_log(LOG_NOTICE, "Unknown RTP codec %d received from '%s'\n", payloadtype, ast_inet_ntoa(rtp->them.sin_addr)); + /* RFC 3550, section 5.1 states: "A receiver MUST ignore packets + * with payload types that it does not understand." Flooding the + * log with NOTICEs really doesn't qualify as ignoring. */ + if (option_debug > 10) { + ast_log(LOG_DEBUG, "Unknown RTP codec %d received from '%s'\n", payloadtype, ast_inet_ntoa(rtp->them.sin_addr)); + } } return f ? f : &ast_null_frame; }