Index: main/rtp.c =================================================================== --- main/rtp.c (revision 56004) +++ main/rtp.c (working copy) @@ -3144,6 +3144,7 @@ enum ast_rtp_get_result audio_p1_res = AST_RTP_GET_FAILED, video_p1_res = AST_RTP_GET_FAILED; enum ast_bridge_result res = AST_BRIDGE_FAILED; int codec0 = 0, codec1 = 0; + struct ast_format_list fmt0, fmt1; void *pvt0 = NULL, *pvt1 = NULL; /* Lock channels */ @@ -3247,8 +3248,17 @@ return AST_BRIDGE_FAILED_NOWARN; } + fmt0 = ast_codec_pref_getsize(&p0->pref, codec0); + fmt1 = ast_codec_pref_getsize(&p1->pref, codec1); + if ( fmt0.cur_ms != fmt1.cur_ms){ + if (option_debug) + ast_log(LOG_DEBUG, "Codec0 framing = %d is not Codec1 framing = %d, cannot P2P bridge in RTP.\n", fmt0.cur_ms, fmt1.cur_ms); + audio_p0_res = AST_RTP_TRY_NATIVE; + audio_p1_res = AST_RTP_TRY_NATIVE; + } + /* If either side can only do a partial bridge, then don't try for a true native bridge */ - if (audio_p0_res == AST_RTP_TRY_PARTIAL || audio_p1_res == AST_RTP_TRY_PARTIAL) { + if ((audio_p0_res == AST_RTP_TRY_PARTIAL || audio_p1_res == AST_RTP_TRY_PARTIAL)) { /* In order to do Packet2Packet bridging both sides must be in the same rawread/rawwrite */ if (c0->rawreadformat != c1->rawwriteformat || c1->rawreadformat != c0->rawwriteformat) { if (option_debug)