diff options
author | Mark Michelson <mmichelson@digium.com> | 2017-04-26 16:14:00 -0500 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2017-04-27 15:03:51 -0500 |
commit | d6535c0080632bce5ed555904d5198c04e040ffb (patch) | |
tree | c473dd2aa7b2061b41f9b6559490dca215f811e8 /include/asterisk/sdp_options.h | |
parent | 413de95ab247ed9b48fc48f440e5c397146e07cb (diff) |
SDP API: Add SSRC-level attributes
RFC 5576 defines how SSRC-level attributes may be added to SDP media
descriptions. In general, this is useful for grouping related SSRCes,
indicating SSRC-level format attributes, and resolving collisions in RTP
SSRC values. These attributes are used widely by browsers during WebRTC
communications, including attributes defined by documents outside of RFC
5576.
This commit introduces the addition of SSRC-level attributes into SDPs
generated by Asterisk. Since Asterisk does not tend to use multiple
SSRCs on a media stream, the initial support is minimal. Asterisk
includes an SSRC-level CNAME attribute if configured to do so. This at
least gives browsers (and possibly others) the ability to resolve SSRC
collisions at offer-answer time.
In order to facilitate this, the RTP engine API has been enhanced to be
able to retrieve the SSRC and CNAME on a given RTP instance.
res_rtp_asterisk currently does not provide meaningful CNAME values in
its RTCP SDES items, and therefore it currently will always return an
empty string as the CNAME value. A task in the near future will result
in res_rtp_asterisk generating more meaningful CNAMEs.
Change-Id: I29e7f23e7db77524f82a3b6e8531b1195ff57789
Diffstat (limited to 'include/asterisk/sdp_options.h')
-rw-r--r-- | include/asterisk/sdp_options.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/asterisk/sdp_options.h b/include/asterisk/sdp_options.h index af694cd14..3a1add37f 100644 --- a/include/asterisk/sdp_options.h +++ b/include/asterisk/sdp_options.h @@ -509,4 +509,23 @@ void ast_sdp_options_set_bind_udptl_to_media_address(struct ast_sdp_options *opt */ unsigned int ast_sdp_options_get_bind_udptl_to_media_address(const struct ast_sdp_options *options); +/*! + * \since 15.0.0 + * \brief Enable setting SSRC level attributes on SDPs + * + * \param options SDP Options + * \param ssrc Boolean indicating if SSRC attributes should be included in generated SDPs + */ +void ast_sdp_options_set_ssrc(struct ast_sdp_options *options, unsigned int ssrc); + +/*! + * \since 15.0.0 + * \brief Get SDP Options ssrc + * + * \param options SDP Options + * + * \returns Whether SSRC-level attributes will be added to our SDP. + */ +unsigned int ast_sdp_options_get_ssrc(const struct ast_sdp_options *options); + #endif /* _ASTERISK_SDP_OPTIONS_H */ |