summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsua-lib/pjsua.h
diff options
context:
space:
mode:
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;