--- a/res/res_pjsip_sdp_rtp.c +++ b/res/res_pjsip_sdp_rtp.c @@ -392,7 +392,10 @@ static int set_caps(struct ast_sip_sessi if (!ast_format_cap_count(joint)) { struct ast_str *usbuf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); struct ast_str *thembuf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN); - + if(codecs.framing) { + /* Copy the codecs framing ms even though there is no match */ + ast_rtp_codecs_set_framing(ast_rtp_instance_get_codecs(session_media->rtp),codecs.framing); + } ast_rtp_codecs_payloads_destroy(&codecs); ast_log(LOG_NOTICE, "No joint capabilities for '%s' media stream between our configuration(%s) and incoming SDP(%s)\n", session_media->stream_type, --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -5157,6 +5157,13 @@ static int bridge_p2p_rtp_write(struct a return -1; } + /* In p2p mode the framing ms values for both must be equal. If bridged is zero we don't care */ + unsigned framing1 = ast_rtp_codecs_get_framing(ast_rtp_instance_get_codecs(instance1)); + unsigned framing = ast_rtp_codecs_get_framing(ast_rtp_instance_get_codecs(instance)); + if (framing1 != 0 && framing != framing1) { + return -1; + } + /* Otherwise adjust bridged payload to match */ bridged_payload = ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(instance1), payload_type->asterisk_format, payload_type->format, payload_type->rtp_code);