summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure81
-rw-r--r--configure.ac9
-rw-r--r--include/asterisk/autoconfig.h.in3
-rw-r--r--res/res_pjsip/config_transport.c2
-rw-r--r--third-party/pjproject/configure.m41
5 files changed, 91 insertions, 5 deletions
diff --git a/configure b/configure
index 3967cec63..f2d0d6970 100755
--- a/configure
+++ b/configure
@@ -919,6 +919,10 @@ PBX_POPT
POPT_DIR
POPT_INCLUDE
POPT_LIB
+PBX_PJSIP_TLS_TRANSPORT_PROTO
+PJSIP_TLS_TRANSPORT_PROTO_DIR
+PJSIP_TLS_TRANSPORT_PROTO_INCLUDE
+PJSIP_TLS_TRANSPORT_PROTO_LIB
PBX_PJSIP_EXTERNAL_RESOLVER
PJSIP_EXTERNAL_RESOLVER_DIR
PJSIP_EXTERNAL_RESOLVER_INCLUDE
@@ -10547,6 +10551,18 @@ PBX_PJSIP_EXTERNAL_RESOLVER=0
+PJSIP_TLS_TRANSPORT_PROTO_DESCRIP="PJSIP TLS Transport proto field support"
+PJSIP_TLS_TRANSPORT_PROTO_OPTION=pjsip
+PJSIP_TLS_TRANSPORT_PROTO_DIR=${PJPROJECT_DIR}
+
+PBX_PJSIP_TLS_TRANSPORT_PROTO=0
+
+
+
+
+
+
+
POPT_DESCRIP="popt"
POPT_OPTION="popt"
@@ -13746,7 +13762,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -13792,7 +13808,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -13816,7 +13832,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -13861,7 +13877,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -13885,7 +13901,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -24707,6 +24723,9 @@ rm -f conftest*
PJSIP_EXTERNAL_RESOLVER_INCLUDE="$PJPROJECT_INCLUDE"
+$as_echo "#define HAVE_PJSIP_TLS_TRANSPORT_PROTO 1" >>confdefs.h
+
+
else
if test "x${PBX_PJPROJECT}" != "x1" -a "${USE_PJPROJECT}" != "no"; then
@@ -25370,6 +25389,58 @@ _ACEOF
fi
+
+ saved_cppflags="${CPPFLAGS}"
+ saved_libs="${LIBS}"
+ CPPFLAGS="${CPPFLAGS} ${PJPROJECT_CFLAGS}"
+ LIBS="${LIBS} ${PJPROJECT_LIB}"
+
+ if test "x${PBX_PJSIP_TLS_TRANSPORT_PROTO}" != "x1" -a "${USE_PJSIP_TLS_TRANSPORT_PROTO}" != "no"; then
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5
+$as_echo_n "checking for ... " >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct pjsip_tls_setting setting; int proto; proto = setting.proto;\" compiles using pjsip.h" >&5
+$as_echo_n "checking if \"struct pjsip_tls_setting setting; int proto; proto = setting.proto;\" compiles using pjsip.h... " >&6; }
+ fi
+ saved_cppflags="${CPPFLAGS}"
+ if test "x${PJSIP_TLS_TRANSPORT_PROTO_DIR}" != "x"; then
+ PJSIP_TLS_TRANSPORT_PROTO_INCLUDE="-I${PJSIP_TLS_TRANSPORT_PROTO_DIR}/include"
+ fi
+ CPPFLAGS="${CPPFLAGS} ${PJSIP_TLS_TRANSPORT_PROTO_INCLUDE}"
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+ #include <pjsip.h>
+int
+main ()
+{
+ struct pjsip_tls_setting setting; int proto; proto = setting.proto;;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ PBX_PJSIP_TLS_TRANSPORT_PROTO=1
+
+$as_echo "#define HAVE_PJSIP_TLS_TRANSPORT_PROTO 1" >>confdefs.h
+
+
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="${saved_cppflags}"
+ fi
+
+ LIBS="${saved_libs}"
+ CPPFLAGS="${saved_cppflags}"
fi
fi
diff --git a/configure.ac b/configure.ac
index 12cc8d276..c0d5cb0c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -482,6 +482,7 @@ AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_REPLACE_MEDIA_STREAM], [PJSIP Media Stream Rep
AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_GET_DEST_INFO], [pjsip_get_dest_info support], [PJPROJECT], [pjsip])
AST_EXT_LIB_SETUP_OPTIONAL([PJ_SSL_CERT_LOAD_FROM_FILES2], [pj_ssl_cert_load_from_files2 support], [PJPROJECT], [pjsip])
AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_EXTERNAL_RESOLVER], [PJSIP External Resolver Support], [PJPROJECT], [pjsip])
+AST_EXT_LIB_SETUP_OPTIONAL([PJSIP_TLS_TRANSPORT_PROTO], [PJSIP TLS Transport proto field support], [PJPROJECT], [pjsip])
AST_EXT_LIB_SETUP([POPT], [popt], [popt])
AST_EXT_LIB_SETUP([PORTAUDIO], [PortAudio], [portaudio])
@@ -2196,6 +2197,14 @@ if test "$USE_PJPROJECT" != "no" ; then
AST_EXT_LIB_CHECK([PJSIP_GET_DEST_INFO], [pjsip], [pjsip_get_dest_info], [pjsip.h], [$PJPROJECT_LIB], [$PJPROJECT_CFLAGS])
AST_EXT_LIB_CHECK([PJ_SSL_CERT_LOAD_FROM_FILES2], [pj], [pjsip/include/pjsip/sip_util.h], [pjlib.h], [$PJPROJECT_LIB], [$PJPROJECT_CFLAGS])
AST_EXT_LIB_CHECK([PJSIP_EXTERNAL_RESOLVER], [pjsip], [pjsip_endpt_set_ext_resolver], [pjsip.h], [$PJPROJECT_LIBS], [$PJPROJECT_CFLAGS])
+
+ saved_cppflags="${CPPFLAGS}"
+ saved_libs="${LIBS}"
+ CPPFLAGS="${CPPFLAGS} ${PJPROJECT_CFLAGS}"
+ LIBS="${LIBS} ${PJPROJECT_LIB}"
+ AST_C_COMPILE_CHECK([PJSIP_TLS_TRANSPORT_PROTO], [struct pjsip_tls_setting setting; int proto; proto = setting.proto;], [pjsip.h])
+ LIBS="${saved_libs}"
+ CPPFLAGS="${saved_cppflags}"
fi
fi
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index 43f86b088..b5fe655d7 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -595,6 +595,9 @@
/* Define if your system has the PJSIP_REPLACE_MEDIA_STREAM headers. */
#undef HAVE_PJSIP_REPLACE_MEDIA_STREAM
+/* Define if your system has the PJSIP_TLS_TRANSPORT_PROTO headers. */
+#undef HAVE_PJSIP_TLS_TRANSPORT_PROTO
+
/* Define if your system has pj_ssl_cert_load_from_files2 declared. */
#undef HAVE_PJ_SSL_CERT_LOAD_FROM_FILES2
diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index db579bf2f..d2c087487 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -422,7 +422,9 @@ static int has_state_changed(struct ast_sip_transport_state *a, struct ast_sip_t
if (a->tls.method != b->tls.method
|| a->tls.ciphers_num != b->tls.ciphers_num
+#ifdef HAVE_PJSIP_TLS_TRANSPORT_PROTO
|| a->tls.proto != b->tls.proto
+#endif
|| a->tls.verify_client != b->tls.verify_client
|| a->tls.verify_server != b->tls.verify_server
|| a->tls.require_client_cert != b->tls.require_client_cert) {
diff --git a/third-party/pjproject/configure.m4 b/third-party/pjproject/configure.m4
index 3351527eb..743222774 100644
--- a/third-party/pjproject/configure.m4
+++ b/third-party/pjproject/configure.m4
@@ -43,4 +43,5 @@ AC_DEFUN([PJPROJECT_CONFIGURE],
PJPROJECT_SYMBOL_CHECK([PJSIP_GET_DEST_INFO], [pjsip_get_dest_info], [pjsip.h])
PJPROJECT_SYMBOL_CHECK([PJ_SSL_CERT_LOAD_FROM_FILES2], [pj_ssl_cert_load_from_files2], [pjlib.h])
PJPROJECT_SYMBOL_CHECK([PJSIP_EXTERNAL_RESOLVER], [pjsip_endpt_set_ext_resolver], [pjsip.h])
+ AC_DEFINE([HAVE_PJSIP_TLS_TRANSPORT_PROTO], 1, [Define if your system has PJSIP_TLS_TRANSPORT_PROTO])
])