summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2013-07-23 13:52:06 +0000
committerKinsey Moore <kmoore@digium.com>2013-07-23 13:52:06 +0000
commit98504fec8ee8fde7eb2a6378046f3d35bfba961a (patch)
treeef7c9014248d864c5c1e2787b632c420d81efdee /include
parentf6a227a45111d5d0e021de64799f62da6d8ae7ac (diff)
Add DTLS-SRTP support to chan_pjsip
This patch introduces DTLS-SRTP support to chan_pjsip and the options necessary to configure it including an option to allow choosing between 32 and 80 byte SRTP tag lengths. During the implementation and testing of this patch, three other bugs were found and their fixes are included with this patch. The two in chan_sip were a segfault relating to DTLS setup and mistaken call rejection. The third bug fix prevents chan_pjsip from attempting to perform bridge optimization between two endpoints if either of them is running any form of SRTP. Review: https://reviewboard.asterisk.org/r/2683/ (closes issue ASTERISK-21419) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/res_sip.h6
-rw-r--r--include/asterisk/res_sip_session.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/include/asterisk/res_sip.h b/include/asterisk/res_sip.h
index 7342d9d9d..01d50bfb9 100644
--- a/include/asterisk/res_sip.h
+++ b/include/asterisk/res_sip.h
@@ -34,6 +34,8 @@
#include "asterisk/endpoints.h"
/* Needed for pj_sockaddr */
#include <pjlib.h>
+/* Needed for ast_rtp_dtls_cfg struct */
+#include "asterisk/rtp_engine.h"
/* Forward declarations of PJSIP stuff */
struct pjsip_rx_data;
@@ -446,6 +448,10 @@ struct ast_sip_endpoint {
unsigned int allowsubscribe;
/*! The minimum allowed expiration for subscriptions from endpoint */
unsigned int subminexpiry;
+ /*! \brief DTLS-SRTP configuration information */
+ struct ast_rtp_dtls_cfg dtls_cfg;
+ /*! Should SRTP use a 32 byte tag instead of an 80 byte tag? */
+ unsigned int srtp_tag_32;
};
/*!
diff --git a/include/asterisk/res_sip_session.h b/include/asterisk/res_sip_session.h
index 26299eb3e..fb482db9b 100644
--- a/include/asterisk/res_sip_session.h
+++ b/include/asterisk/res_sip_session.h
@@ -26,7 +26,7 @@
#include "asterisk/channel.h"
/* Needed for ast_sockaddr struct */
#include "asterisk/netsock.h"
-/* Neeed for ast_sdp_srtp struct */
+/* Needed for ast_sdp_srtp struct */
#include "asterisk/sdp_srtp.h"
/* Forward declarations */
@@ -42,7 +42,6 @@ struct pjsip_rx_data;
struct ast_party_id;
struct pjmedia_sdp_media;
struct pjmedia_sdp_session;
-struct ast_rtp_instance;
struct ast_dsp;
struct ast_sip_session_sdp_handler;