summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsua-lib/pjsua.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-01-23 20:39:07 +0000
committerBenny Prijono <bennylp@teluu.com>2008-01-23 20:39:07 +0000
commit8686b3135348bcd69bdb3c3cb6660a82d989bb30 (patch)
tree31d9c111724f083782ba5782c58ab2d30a867933 /pjsip/include/pjsua-lib/pjsua.h
parent5035ea445fbf6de061efacd90c66390ca15806ed (diff)
Ticket #61: Implement SRTP support in PJMEDIA and PJSUA-LIB, and updated applications because of the changes. This is a major modification back ported from SRTP branch. See ticket #61 for changelog detail of this commit
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1735 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsua-lib/pjsua.h')
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index a1c5c86d..d78eeb78 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -403,7 +403,28 @@ typedef int pjsua_conf_port_id;
# define PJSUA_ACC_MAX_PROXIES 8
#endif
+#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
+/**
+ * Default value of SRTP mode usage. Valid values are PJMEDIA_SRTP_DISABLED,
+ * PJMEDIA_SRTP_OPTIONAL, and PJMEDIA_SRTP_MANDATORY.
+ */
+#ifndef PJSUA_DEFAULT_USE_SRTP
+ #define PJSUA_DEFAULT_USE_SRTP PJMEDIA_SRTP_DISABLED
+#endif
+
+/**
+ * Default value of secure signaling requirement for SRTP.
+ * Valid values are:
+ * 0: SRTP does not require secure signaling
+ * 1: SRTP requires secure transport such as TLS
+ * 2: SRTP requires secure end-to-end transport (SIPS)
+ */
+#ifndef PJSUA_DEFAULT_SRTP_SECURE_SIGNALING
+ #define PJSUA_DEFAULT_SRTP_SECURE_SIGNALING 1
+#endif
+
+#endif
/**
* Logging configuration, which can be (optionally) specified when calling
@@ -1034,6 +1055,36 @@ typedef struct pjsua_config
*/
pj_str_t user_agent;
+#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
+ /**
+ * Specify default value of secure media transport usage.
+ * Valid values are PJMEDIA_SRTP_DISABLED, PJMEDIA_SRTP_OPTIONAL, and
+ * PJMEDIA_SRTP_MANDATORY.
+ *
+ * Note that this setting can be further customized in account
+ * configuration (#pjsua_acc_config).
+ *
+ * Default: #PJSUA_DEFAULT_USE_SRTP
+ */
+ pjmedia_srtp_use use_srtp;
+
+ /**
+ * Specify whether SRTP requires secure signaling to be used. This option
+ * is only used when \a use_srtp option above is non-zero.
+ *
+ * Valid values are:
+ * 0: SRTP does not require secure signaling
+ * 1: SRTP requires secure transport such as TLS
+ * 2: SRTP requires secure end-to-end transport (SIPS)
+ *
+ * Note that this setting can be further customized in account
+ * configuration (#pjsua_acc_config).
+ *
+ * Default: #PJSUA_DEFAULT_SRTP_SECURE_SIGNALING
+ */
+ int srtp_secure_signaling;
+#endif
+
} pjsua_config;
@@ -1971,6 +2022,30 @@ typedef struct pjsua_acc_config
*/
pj_str_t ka_data;
+#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
+ /**
+ * Specify whether secure media transport should be used for this account.
+ * Valid values are PJMEDIA_SRTP_DISABLED, PJMEDIA_SRTP_OPTIONAL, and
+ * PJMEDIA_SRTP_MANDATORY.
+ *
+ * Default: #PJSUA_DEFAULT_USE_SRTP
+ */
+ pjmedia_srtp_use use_srtp;
+
+ /**
+ * Specify whether SRTP requires secure signaling to be used. This option
+ * is only used when \a use_srtp option above is non-zero.
+ *
+ * Valid values are:
+ * 0: SRTP does not require secure signaling
+ * 1: SRTP requires secure transport such as TLS
+ * 2: SRTP requires secure end-to-end transport (SIPS)
+ *
+ * Default: #PJSUA_DEFAULT_SRTP_SECURE_SIGNALING
+ */
+ int srtp_secure_signaling;
+#endif
+
} pjsua_acc_config;