diff options
author | Jacek Konieczny <jkonieczny@eggsoft.pl> | 2016-03-25 16:59:05 +0100 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2016-03-29 09:29:45 -0500 |
commit | 0cfab30b284286b74a4c58b040364b246a9680d7 (patch) | |
tree | 90ca535e3c0dd2b05d31810ae8ebf8181a88b526 /include/asterisk/rtp_engine.h | |
parent | 36d016b1abb6707bfde821ac2407933a447f3d13 (diff) |
res_rtp_asterisk: Use separate SRTP session for RTCP with DTLS
Asterisk uses separate UDP ports for RTP and RTCP traffic and RFC 5764
explicitly states:
There MUST be a separate DTLS-SRTP session for each distinct pair of
source and destination ports used by a media session
This means RTP keying material cannot be used for DTLS RTCP, which was
the reason why RTCP encryption would fail.
ASTERISK-25642
Change-Id: I7e8779d8b63e371088081bb113131361b2847e3a
Diffstat (limited to 'include/asterisk/rtp_engine.h')
-rw-r--r-- | include/asterisk/rtp_engine.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index c79554bf0..206909010 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -2191,20 +2191,22 @@ int ast_rtp_instance_sendcng(struct ast_rtp_instance *instance, int level); * \param instance the RTP instance * \param remote_policy the remote endpoint's policy * \param local_policy our policy for this RTP instance's remote endpoint + * \param rtcp 1 for dedicated RTCP policies * * \retval 0 Success * \retval non-zero Failure */ -int ast_rtp_instance_add_srtp_policy(struct ast_rtp_instance *instance, struct ast_srtp_policy* remote_policy, struct ast_srtp_policy *local_policy); +int ast_rtp_instance_add_srtp_policy(struct ast_rtp_instance *instance, struct ast_srtp_policy* remote_policy, struct ast_srtp_policy *local_policy, int rtcp); /*! * \brief Obtain the SRTP instance associated with an RTP instance * * \param instance the RTP instance + * \param rtcp 1 to request instance for RTCP * \retval the SRTP instance on success * \retval NULL if no SRTP instance exists */ -struct ast_srtp *ast_rtp_instance_get_srtp(struct ast_rtp_instance *instance); +struct ast_srtp *ast_rtp_instance_get_srtp(struct ast_rtp_instance *instance, int rtcp); /*! \brief Custom formats declared in codecs.conf at startup must be communicated to the rtp_engine * so their mime type can payload number can be initialized. */ |