mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 03:04:19 +00:00
res_pjsip: Implement additional SIP RFCs for Google Voice trunk compatability
This change implements a few different generic things which were brought on by Google Voice SIP. 1. The concept of flow transports have been introduced. These are configurable transports in pjsip.conf which can be used to reference a flow of signaling to a target. These have runtime configuration that can be changed by the signaling itself (such as Service-Routes and P-Preferred-Identity). When used these guarantee an individual connection (in the case of TCP or TLS) even if multiple flow transports exist to the same target. 2. Service-Routes (RFC 3608) support has been added to the outbound registration module which when received will be stored on the flow transport and used for requests referencing it. 3. P-Associated-URI / P-Preferred-Identity (RFC 3325) support has been added to the outbound registration module. If a P-Associated-URI header is received it will be used on requests as the P-Preferred-Identity. 4. Configurable outbound extension support has been added to the outbound registration module. When set the extension will be placed in the Supported header. 5. Header parameters can now be configured on an outbound registration which will be placed in the Contact header. 6. Google specific OAuth / Bearer token authentication (draft-ietf-sipcore-sip-authn-02) has been added to the outbound registration module. All functionality changes are controlled by pjsip.conf configuration options and do not affect non-configured pjsip endpoints otherwise. ASTERISK-27971 #close Change-Id: Id214c2d1c550a41fcf564b7df8f3da7be565bd58
This commit is contained in:
committed by
George Joseph
parent
51b5f0f193
commit
37b2e68628
118
configure
vendored
118
configure
vendored
@@ -930,6 +930,14 @@ PBX_POPT
|
||||
POPT_DIR
|
||||
POPT_INCLUDE
|
||||
POPT_LIB
|
||||
PBX_PJSIP_OAUTH_AUTHENTICATION
|
||||
PJSIP_OAUTH_AUTHENTICATION_DIR
|
||||
PJSIP_OAUTH_AUTHENTICATION_INCLUDE
|
||||
PJSIP_OAUTH_AUTHENTICATION_LIB
|
||||
PBX_PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE
|
||||
PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE_DIR
|
||||
PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE_INCLUDE
|
||||
PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE_LIB
|
||||
PBX_PJSIP_ENDPOINT_COMPACT_FORM
|
||||
PJSIP_ENDPOINT_COMPACT_FORM_DIR
|
||||
PJSIP_ENDPOINT_COMPACT_FORM_INCLUDE
|
||||
@@ -9470,6 +9478,12 @@ $as_echo "#define HAVE_PJSIP_INV_ACCEPT_MULTIPLE_SDP_ANSWERS 1" >>confdefs.h
|
||||
$as_echo "#define HAVE_PJSIP_ENDPOINT_COMPACT_FORM 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_PJSIP_OAUTH_AUTHENTICATION 1" >>confdefs.h
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11624,6 +11638,30 @@ PBX_PJSIP_ENDPOINT_COMPACT_FORM=0
|
||||
|
||||
|
||||
|
||||
|
||||
PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE_DESCRIP="PJSIP Transport Connection Reuse Disabling"
|
||||
PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE_OPTION=pjsip
|
||||
PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE_DIR=${PJPROJECT_DIR}
|
||||
|
||||
PBX_PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE=0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PJSIP_OAUTH_AUTHENTICATION_DESCRIP="PJSIP OAuth Authentication Support"
|
||||
PJSIP_OAUTH_AUTHENTICATION_OPTION=pjsip
|
||||
PJSIP_OAUTH_AUTHENTICATION_DIR=${PJPROJECT_DIR}
|
||||
|
||||
PBX_PJSIP_OAUTH_AUTHENTICATION=0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@@ -25568,6 +25606,86 @@ $as_echo "#define HAVE_PJSIP_ENDPOINT_COMPACT_FORM 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
|
||||
|
||||
|
||||
if test "x${PBX_PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE}" != "x1" -a "${USE_PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE}" != "no"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct pjsip_tpselector sel; sel.disable_connection_reuse = PJ_TRUE;\" compiles using pjsip.h" >&5
|
||||
$as_echo_n "checking if \"struct pjsip_tpselector sel; sel.disable_connection_reuse = PJ_TRUE;\" compiles using pjsip.h... " >&6; }
|
||||
saved_cppflags="${CPPFLAGS}"
|
||||
if test "x${PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE_DIR}" != "x"; then
|
||||
PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE_INCLUDE="-I${PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE_DIR}/include"
|
||||
fi
|
||||
CPPFLAGS="${CPPFLAGS} ${PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE_INCLUDE}"
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <pjsip.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct pjsip_tpselector sel; sel.disable_connection_reuse = PJ_TRUE;;
|
||||
|
||||
;
|
||||
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_TRANSPORT_DISABLE_CONNECTION_REUSE=1
|
||||
|
||||
$as_echo "#define HAVE_PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE 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
|
||||
|
||||
|
||||
if test "x${PBX_PJSIP_OAUTH_AUTHENTICATION}" != "x1" -a "${USE_PJSIP_OAUTH_AUTHENTICATION}" != "no"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct pjsip_oauth_credential credential;\" compiles using pjsip.h" >&5
|
||||
$as_echo_n "checking if \"struct pjsip_oauth_credential credential;\" compiles using pjsip.h... " >&6; }
|
||||
saved_cppflags="${CPPFLAGS}"
|
||||
if test "x${PJSIP_OAUTH_AUTHENTICATION_DIR}" != "x"; then
|
||||
PJSIP_OAUTH_AUTHENTICATION_INCLUDE="-I${PJSIP_OAUTH_AUTHENTICATION_DIR}/include"
|
||||
fi
|
||||
CPPFLAGS="${CPPFLAGS} ${PJSIP_OAUTH_AUTHENTICATION_INCLUDE}"
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <pjsip.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct pjsip_oauth_credential credential;;
|
||||
|
||||
;
|
||||
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_OAUTH_AUTHENTICATION=1
|
||||
|
||||
$as_echo "#define HAVE_PJSIP_OAUTH_AUTHENTICATION 1" >>confdefs.h
|
||||
|
||||
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
Reference in New Issue
Block a user