diff options
Diffstat (limited to 'pjsip/include/pjsip/sip_config.h')
-rw-r--r-- | pjsip/include/pjsip/sip_config.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_config.h b/pjsip/include/pjsip/sip_config.h index 95f75383..fc7604cb 100644 --- a/pjsip/include/pjsip/sip_config.h +++ b/pjsip/include/pjsip/sip_config.h @@ -112,6 +112,15 @@ typedef struct pjsip_cfg_t pj_bool_t disable_tcp_switch; /** + * Disable automatic switching to TLS if target-URI does not use + * "sips" scheme nor TLS transport, even when request-URI uses + * "sips" scheme. + * + * Default is PJSIP_DONT_SWITCH_TO_TLS. + */ + pj_bool_t disable_tls_switch; + + /** * Enable call media session to always be updated to the latest * received early media SDP when receiving forked early media * (multiple 183 responses with different To tag). @@ -309,6 +318,24 @@ PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void) /** + * As specified RFC 3261 section 8.1.2, when request-URI uses "sips" scheme, + * TLS must always be used regardless of the target-URI scheme or transport + * type. + * + * This option will specify whether the behavior of automatic switching to TLS + * should be disabled, i.e: regard the target-URI scheme or transport type. + * + * This option can also be controlled at run-time by the \a disable_tls_switch + * setting in pjsip_cfg_t. + * + * Default is 0 (no). + */ +#ifndef PJSIP_DONT_SWITCH_TO_TLS +# define PJSIP_DONT_SWITCH_TO_TLS 0 +#endif + + +/** * Specify whether the call media session should be updated to the latest * received early media SDP when receiving forked early media (multiple 183 * responses with different To tag). |