summaryrefslogtreecommitdiff
path: root/channels/sip/include
diff options
context:
space:
mode:
Diffstat (limited to 'channels/sip/include')
-rw-r--r--channels/sip/include/sdp_crypto.h6
-rw-r--r--channels/sip/include/sip.h3
-rw-r--r--channels/sip/include/srtp.h2
3 files changed, 8 insertions, 3 deletions
diff --git a/channels/sip/include/sdp_crypto.h b/channels/sip/include/sdp_crypto.h
index b1c153438..aa553cb00 100644
--- a/channels/sip/include/sdp_crypto.h
+++ b/channels/sip/include/sdp_crypto.h
@@ -31,6 +31,7 @@
#include <asterisk/rtp_engine.h>
struct sdp_crypto;
+struct sip_srtp;
/*! \brief Initialize an return an sdp_crypto struct
*
@@ -51,11 +52,12 @@ void sdp_crypto_destroy(struct sdp_crypto *crypto);
* \param p A valid sdp_crypto struct
* \param attr the a:crypto line from SDP
* \param rtp The rtp instance associated with the SDP being parsed
+ * \param srtp SRTP structure
*
* \retval 0 success
* \retval nonzero failure
*/
-int sdp_crypto_process(struct sdp_crypto *p, const char *attr, struct ast_rtp_instance *rtp);
+int sdp_crypto_process(struct sdp_crypto *p, const char *attr, struct ast_rtp_instance *rtp, struct sip_srtp *srtp);
/*! \brief Generate an SRTP a=crypto offer
@@ -68,7 +70,7 @@ int sdp_crypto_process(struct sdp_crypto *p, const char *attr, struct ast_rtp_in
* \retval 0 success
* \retval nonzero failure
*/
-int sdp_crypto_offer(struct sdp_crypto *p);
+int sdp_crypto_offer(struct sdp_crypto *p, int taglen);
/*! \brief Return the a_crypto value of the sdp_crypto struct
diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h
index 5018f0f83..7e0f2d261 100644
--- a/channels/sip/include/sip.h
+++ b/channels/sip/include/sip.h
@@ -354,9 +354,10 @@
#define SIP_PAGE3_SNOM_AOC (1 << 0) /*!< DPG: Allow snom aoc messages */
+#define SIP_PAGE3_SRTP_TAG_32 (1 << 1) /*!< DP: Use a 32bit auth tag in INVITE not 80bit */
#define SIP_PAGE3_FLAGS_TO_COPY \
- (SIP_PAGE3_SNOM_AOC)
+ (SIP_PAGE3_SNOM_AOC | SIP_PAGE3_SRTP_TAG_32)
/*@}*/
diff --git a/channels/sip/include/srtp.h b/channels/sip/include/srtp.h
index b7a3fc30b..95281922f 100644
--- a/channels/sip/include/srtp.h
+++ b/channels/sip/include/srtp.h
@@ -34,6 +34,8 @@
#define SRTP_ENCR_OPTIONAL (1 << 1) /* SRTP encryption optional */
#define SRTP_CRYPTO_ENABLE (1 << 2)
#define SRTP_CRYPTO_OFFER_OK (1 << 3)
+#define SRTP_CRYPTO_TAG_32 (1 << 4)
+#define SRTP_CRYPTO_TAG_80 (1 << 5)
/*! \brief structure for secure RTP audio */
struct sip_srtp {