Merge "res_pjsip_sdp_rtp: No rtpmap for static RTP payload IDs in SDP."

This commit is contained in:
Jenkins2
2017-04-26 10:44:00 -05:00
committed by Gerrit Code Review
4 changed files with 26 additions and 15 deletions

View File

@@ -1426,28 +1426,31 @@ static int find_unused_payload(const struct ast_rtp_codecs *codecs)
* https://tools.ietf.org/html/draft-roach-mmusic-unified-plan#section-3.2.1.2
* https://tools.ietf.org/html/draft-wu-avtcore-dynamic-pt-usage#section-3
*/
res = find_unused_payload_in_range(codecs, MAX(ast_option_rtpptdynamic, 35),
res = find_unused_payload_in_range(
codecs, MAX(ast_option_rtpptdynamic, AST_RTP_PT_LAST_STATIC + 1),
AST_RTP_PT_LAST_REASSIGN, static_RTP_PT);
if (res != -1) {
return res;
}
/* Yet, reusing mappings below 35 is not supported in Asterisk because
* when Compact Headers are activated, no rtpmap is send for those below
* 35. If you want to use 35 and below
/* Yet, reusing mappings below AST_RTP_PT_LAST_STATIC (35) is not supported
* in Asterisk because when Compact Headers are activated, no rtpmap is
* send for those below 35. If you want to use 35 and below
* A) do not use Compact Headers,
* B) remove that code in chan_sip/res_pjsip, or
* C) add a flag that this RTP Payload Type got reassigned dynamically
* and requires a rtpmap even with Compact Headers enabled.
*/
res = find_unused_payload_in_range(
codecs, MAX(ast_option_rtpptdynamic, 20), 35, static_RTP_PT);
codecs, MAX(ast_option_rtpptdynamic, 20),
AST_RTP_PT_LAST_STATIC + 1, static_RTP_PT);
if (res != -1) {
return res;
}
return find_unused_payload_in_range(
codecs, MAX(ast_option_rtpptdynamic, 0), 20, static_RTP_PT);
codecs, MAX(ast_option_rtpptdynamic, 0),
20, static_RTP_PT);
}
/*!