res_pjsip: Implement additional SIP RFCs for Google Voice trunk compatability
authorNick French <naf@ou.edu>
Wed, 18 Jul 2018 12:45:26 +0000 (07:45 -0500)
committerGeorge Joseph <gjoseph@digium.com>
Wed, 24 Oct 2018 12:51:25 +0000 (07:51 -0500)
commit37b2e686286a52db5434dbd3dba3c7da8d3f7fc1
treeb334255933bec3162fc658d10fb508fcb5434f66
parent51b5f0f193a80d23cb80fd94f72f6a30787c80e6
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
16 files changed:
configs/samples/pjsip.conf.sample
configure
configure.ac
contrib/ast-db-manage/config/versions/465f47f880be_add_pjsip_google_voice_sip_options.py [new file with mode: 0644]
include/asterisk/autoconfig.h.in
include/asterisk/res_pjsip.h
res/res_pjsip.c
res/res_pjsip/config_auth.c
res/res_pjsip/config_transport.c
res/res_pjsip_outbound_authenticator_digest.c
res/res_pjsip_outbound_publish.c
res/res_pjsip_outbound_registration.c
res/res_pjsip_session.c
third-party/pjproject/configure.m4
third-party/pjproject/patches/0020-oauth.patch [new file with mode: 0644]
third-party/pjproject/patches/0030-allow-disabling-of-connection-reuse.patch [new file with mode: 0644]