[Pkg-voip-commits] [asterisk] 01/08: New upstream version 13.11.2~dfsg

Bernhard Schmidt berni at moszumanska.debian.org
Mon Oct 31 22:03:19 UTC 2016


This is an automated email from the git hooks/post-receive script.

berni pushed a commit to branch master
in repository asterisk.

commit d0228c9868ac4230f23e9f5d18b7dd0b9aeca0e3
Author: Bernhard Schmidt <berni at debian.org>
Date:   Mon Oct 31 22:01:17 2016 +0100

    New upstream version 13.11.2~dfsg
---
 .version                                           |    2 +-
 CHANGES                                            |   49 +
 ChangeLog                                          | 1202 ++++++++++++++++++-
 Makefile                                           |    6 +-
 apps/app_queue.c                                   |   26 +-
 apps/app_voicemail.c                               |    2 +
 asterisk-13.10.0-summary.html                      |  488 --------
 asterisk-13.10.0-summary.txt                       | 1217 --------------------
 asterisk-13.11.2-summary.html                      |   21 +
 asterisk-13.11.2-summary.txt                       |  108 ++
 autoconf/acx_pthread.m4                            |  243 ----
 autoconf/ax_pthread.m4                             |  485 ++++++++
 autoconf/libcurl.m4                                |   49 +-
 channels/chan_dahdi.c                              |   43 +-
 channels/chan_dahdi.h                              |    5 +
 channels/chan_pjsip.c                              |   59 +-
 channels/chan_sip.c                                |  197 ++--
 channels/chan_unistim.c                            |    2 +
 channels/sip/config_parser.c                       |    7 +
 channels/sip/reqresp_parser.c                      |   23 +-
 configs/basic-pbx/modules.conf                     |    4 -
 configs/samples/chan_dahdi.conf.sample             |    9 +
 configs/samples/hep.conf.sample                    |    2 +-
 configs/samples/pjsip.conf.sample                  |   22 +-
 configure                                          |  783 +++++++++----
 configure.ac                                       |   21 +-
 .../4a6c67fa9b7a_add_fax_detect_timeout_option.py  |   23 +
 .../9deac0ae4717_pjsip_add_subscribe_context.py    |   21 +
 ...c2d3964_ps_contacts_add_endpoint_and_modify_.py |   33 +
 contrib/realtime/mssql/mssql_config.sql            |   42 +
 contrib/realtime/mysql/mysql_config.sql            |   24 +
 contrib/realtime/oracle/oracle_config.sql          |   42 +
 contrib/realtime/postgresql/postgresql_config.sql  |   24 +
 contrib/scripts/install_prereq                     |    4 +-
 funcs/func_curl.c                                  |    2 +
 funcs/func_env.c                                   |    4 +-
 include/asterisk/autoconfig.h.in                   |   24 +-
 include/asterisk/compiler.h                        |    6 +
 include/asterisk/event_defs.h                      |   13 +-
 include/asterisk/format_cache.h                    |    8 +
 include/asterisk/res_fax.h                         |    4 +-
 include/asterisk/res_pjsip.h                       |   20 +-
 include/asterisk/res_pjsip_session.h               |    2 +-
 include/asterisk/stasis_system.h                   |    6 +
 include/asterisk/utils.h                           |    9 +-
 main/ast_expr2.c                                   |    2 +
 main/ast_expr2.y                                   |    2 +
 main/astobj2_hash.c                                |    4 +-
 main/astobj2_rbtree.c                              |    2 +-
 main/bridge_channel.c                              |    9 +-
 main/channel.c                                     |   33 +-
 main/codec_builtin.c                               |   63 +
 main/dsp.c                                         |    8 +-
 main/features.c                                    |    7 +-
 main/format_cache.c                                |   20 +
 main/pbx.c                                         |   19 +-
 main/say.c                                         |   16 +-
 main/stasis_endpoints.c                            |   34 +-
 main/stasis_system.c                               |    6 +
 main/stdtime/localtime.c                           |   11 +-
 main/threadpool.c                                  |    6 +-
 main/translate.c                                   |    2 +-
 main/utils.c                                       |    4 +-
 res/res_config_odbc.c                              |    1 +
 res/res_corosync.c                                 |  273 ++++-
 res/res_fax.c                                      |   58 +-
 res/res_format_attr_silk.c                         |   64 +-
 res/res_format_attr_siren14.c                      |   94 ++
 res/res_format_attr_siren7.c                       |   94 ++
 res/res_pjsip.c                                    |   99 +-
 res/res_pjsip/config_transport.c                   |    3 +-
 res/res_pjsip/location.c                           |    6 +
 res/res_pjsip/pjsip_configuration.c                |  168 ++-
 res/res_pjsip/pjsip_distributor.c                  |   12 +-
 res/res_pjsip/pjsip_options.c                      |  130 ++-
 res/res_pjsip_exten_state.c                        |   10 +-
 res/res_pjsip_mwi.c                                |   28 +-
 res/res_pjsip_pubsub.c                             |    6 +-
 res/res_pjsip_refer.c                              |    3 +-
 res/res_pjsip_session.c                            |  129 ++-
 res/res_pjsip_t38.c                                |    4 +-
 res/res_rtp_asterisk.c                             |   43 +-
 res/res_rtp_multicast.c                            |    7 +-
 res/res_sorcery_realtime.c                         |    2 +-
 tests/test_sorcery_realtime.c                      |   37 -
 third-party/pjproject/Makefile.rules               |   31 +-
 ...PIs-to-add-decrement-an-event-subscriptio.patch |   73 --
 ...rt_tcp-tls-Set-factory-on-transports-crea.patch |   48 -
 ...oid-deinitialization-of-uninitialized-cli.patch |   56 +
 third-party/pjproject/patches/config_site.h        |    6 +-
 third-party/versions.mak                           |    2 +-
 91 files changed, 4266 insertions(+), 2855 deletions(-)

diff --git a/.version b/.version
index 04f98b4..07ae670 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-13.10.0
\ No newline at end of file
+13.11.2
\ No newline at end of file
diff --git a/CHANGES b/CHANGES
index fd51b05..0221cc5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,55 @@
 ==============================================================================
 
 ------------------------------------------------------------------------------
+--- Functionality changes from Asterisk 13.10.0 to Asterisk 13.11.0 ----------
+------------------------------------------------------------------------------
+
+chan_dahdi
+------------------
+ * Added "faxdetect_timeout" option.
+   The option determines how many seconds into a call before faxdetect
+   is disabled for the call.  Setting the value to zero disables the timeout.
+
+chan_sip
+------------------
+ * Session-Timers (RFC 4028) work for TCP (and TLS) transports as well now.
+   Previously Asterisk dropped calls only with UDP transports. However with
+   longer international calls via TCP, the SIP channel might break, because
+   all hops on the Internet route must stay online (have not a single power
+   outage, for example). Therefore with Session-Timers enabled (which are
+   enabled at default), you might see additional dropped calls. Consequently
+   please, consider to go for session-timers=refuse in your sip.conf.
+
+res_pjsip
+------------------
+ * Added "fax_detect_timeout" to endpoint.
+   The option determines how many seconds into a call before fax_detect
+   is disabled for the call.  Setting the value to zero disables the timeout.
+
+ * Added "subscribe_context" to endpoint.
+   If specified, incoming SUBSCRIBE requests will be searched for the matching
+   extension in the indicated context. If no "subscribe_context" is specified,
+   then the "context" setting is used.
+
+res_rtp_asterisk
+------------------
+ * The DTLS part in Asterisk now supports Perfect Forward Secrecy (PFS).
+   Enabling PFS is attempted by default, and is dependent on the configuration
+   of the module using TLS.
+   - Ephemeral ECDH (ECDHE) is enabled by default. To disable it, do not
+     specify a ECDHE cipher suite in sip.conf, for example:
+       dtlscipher=AES128-SHA
+   - Ephemeral DH (DHE) is disabled by default. To enable it, add DH parameters
+     into the private key file, e.g., sip.conf dtlsprivatekey. For example:
+       openssl dhparam -out ./dh.pem 2048
+   - Because clients expect the server to prefer PFS, and because OpenSSL sorts
+     its cipher suites by bit strength, see "openssl ciphers -v DEFAULT".
+     Consider re-ordering your cipher suites in the respective configuration
+     file. For example:
+       dtlscipher=ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256
+     which forces PFS and requires at least DTLS 1.2.
+
+------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 13.9.0 to Asterisk 13.10.0 -----------
 ------------------------------------------------------------------------------
 
diff --git a/ChangeLog b/ChangeLog
index 6916701..9f3cc84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,52 +1,806 @@
-2016-07-21 14:54 +0000  Asterisk Development Team <asteriskteam at digium.com>
+2016-09-09 16:14 +0000  Asterisk Development Team <asteriskteam at digium.com>
 
-	* asterisk 13.10.0 Released.
+	* asterisk 13.11.2 Released.
 
-2016-07-21 09:53 +0000 [a39ab98eee]  Joshua Colp <jcolp at digium.com>
+2016-09-09 11:14 +0000 [5d9c842bd2]  gtjoseph <gjoseph at digium.com>
 
-	* Release summaries: Add summaries for 13.10.0
+	* Release summaries: Remove previous versions
+
+2016-09-09 11:14 +0000 [a05e4fbcbf]  gtjoseph <gjoseph at digium.com>
+
+	* .version: Update for 13.11.2
+
+2016-09-09 11:14 +0000 [a017f5d662]  gtjoseph <gjoseph at digium.com>
+
+	* .lastclean: Update for 13.11.2
+
+2016-09-09 11:14 +0000 [ec8e92bdbd]  gtjoseph <gjoseph at digium.com>
+
+	* realtime: Add database scripts for 13.11.2
+
+2016-09-09 05:39 +0000 [54a182b3ec]  Joshua Colp <jcolp at digium.com>
+
+	* res_pjsip: Only invoke unidentified endpoint logic when unidentified.
+
+	  The code was incorrectly invoking the unidentified logic when
+	  an endpoint had actually been identified, causing log messages
+	  to be output.
+
+	  ASTERISK-26349 #close
+
+	  Change-Id: Id8104fc9e3d138d5e8b6f6977ecc08765fd17d4f
+
+2016-09-08 16:16 +0000  Asterisk Development Team <asteriskteam at digium.com>
+
+	* asterisk 13.11.1 Released.
+
+2016-09-08 11:16 +0000 [d8a81fec53]  gtjoseph <gjoseph at digium.com>
+
+	* Release summaries: Remove previous versions
+
+2016-09-08 11:16 +0000 [badd123db6]  gtjoseph <gjoseph at digium.com>
+
+	* .version: Update for 13.11.1
+
+2016-09-08 11:16 +0000 [6cd23f388f]  gtjoseph <gjoseph at digium.com>
+
+	* .lastclean: Update for 13.11.1
+
+2016-09-08 11:16 +0000 [c8f3fffc5b]  gtjoseph <gjoseph at digium.com>
+
+	* realtime: Add database scripts for 13.11.1
+
+2016-09-08 10:55 +0000 [3e0e51e779]  gtjoseph <gjoseph at digium.com>
+
+	* ChangeLog: Updated for 13.11.1
+
+2016-09-08 10:55 +0000 [6b205cc6b2]  gtjoseph <gjoseph at digium.com>
+
+	* Release summaries: Add summaries for 13.11.1
+
+2016-09-08 10:55 +0000 [bb0fca4542]  gtjoseph <gjoseph at digium.com>
+
+	* Release summaries: Remove previous versions
+
+2016-09-08 10:55 +0000 [3b9c0a4320]  gtjoseph <gjoseph at digium.com>
+
+	* .version: Update for 13.11.1
+
+2016-09-08 10:55 +0000 [cd8a1dacf7]  gtjoseph <gjoseph at digium.com>
+
+	* .lastclean: Update for 13.11.1
+
+2016-09-08 10:55 +0000 [3fd208aafc]  gtjoseph <gjoseph at digium.com>
+
+	* realtime: Add database scripts for 13.11.1
+
+2016-08-23 06:35 +0000 [58c4b9671f]  Corey Farrell <git at cfware.com> (license 5909)
+
+	* chan_sip: Don't allocate new RTP instances on top of old ones.
+
+	  In some scenarios dialog_initialize_rtp can be called multiple times on
+	  the same dialog.  This can cause RTP instances to be leaked along with
+	  multiple file descriptors for each instance.
+
+	  This change makes it so the existing RTP instances are destroyed and
+	  not overwritten, stopping the memory leak.
+
+	  ASTERISK-26272 #close
+	  patches:
+	    ASTERISK-26272-13.patch submitted by Corey Farrell (license 5909)
+
+	  Change-Id: Id529de1184c68f2f4d254ab41a1f458dafdb5f73
+
+2016-08-16 15:34 +0000 [aeb14872e2]  Mark Michelson <mmichelson at digium.com>
+
+	* res_pjsip: Do not crash on ACKs from unknown endpoints.
+
+	  The endpoint identification PJSIP module is intended to identify which
+	  endpoint an incoming request is from. If an endpoint is not identified,
+	  then an artificial endpoint is used in its place when proceeding.
+
+	  The problem is that the ACK request type is an exception to the rule.
+	  The artificial endpoint is not used when processing an ACK. This results
+	  in the possibility of having a NULL endpoint being used further on.
+
+	  The reason ACK is an exception is an attempt not to spam security logs
+	  with unidentified requests. Presumably, you've already logged the
+	  unidentified request on the preceeding INVITE.
+
+	  Up until Asterisk 13.10, retrieving a NULL endpoint in this fashion
+	  didn't cause an issue. A new change in 13.10 added endpoint ACL checking
+	  shortly after endpoint identification. Because we are accessing a NULL
+	  endpoint, this ACL check resulted in a crash.
+
+	  The fix here is to be sure to retrieve the artificial endpoint for all
+	  request types. ACKs still do not generate unidentified request security
+	  events.
+
+	  ASTERISK-26264 #close
+	  Reported by nappsoft
+
+	  AST-2016-006
+
+	  Change-Id: Ie0c795ae2d72273decb972dd74b6a1489fb6b703
+
+2016-09-01 16:23 +0000  Asterisk Development Team <asteriskteam at digium.com>
+
+	* asterisk 13.11.0 Released.
 
-2016-07-21 09:49 +0000 [b0a2ca9133]  Joshua Colp <jcolp at digium.com>
+2016-09-01 11:23 +0000 [ca795030aa]  Kevin Harwell <kharwell at digium.com>
+
+	* Release summaries: Add summaries for 13.11.0
+
+2016-09-01 11:20 +0000 [7d843d0bb5]  Kevin Harwell <kharwell at digium.com>
+
+	* Release summaries: Remove previous versions
+
+2016-09-01 11:20 +0000 [e29b6f0326]  Kevin Harwell <kharwell at digium.com>
+
+	* .version: Update for 13.11.0
+
+2016-09-01 11:20 +0000 [7b5be70a53]  Kevin Harwell <kharwell at digium.com>
+
+	* .lastclean: Update for 13.11.0
+
+2016-09-01 11:20 +0000 [e22edb0481]  Kevin Harwell <kharwell at digium.com>
+
+	* realtime: Add database scripts for 13.11.0
+
+2016-09-01 11:14 +0000 [9cb51fb550]  Kevin Harwell <kharwell at digium.com>
+
+	* ChangeLog: Updated for 13.11.0
+
+2016-09-01 11:14 +0000 [5c3bffce09]  Kevin Harwell <kharwell at digium.com>
+
+	* Release summaries: Add summaries for 13.11.0
+
+2016-09-01 11:12 +0000 [7b9cb3c450]  Kevin Harwell <kharwell at digium.com>
 
 	* Release summaries: Remove previous versions
 
-2016-07-21 09:49 +0000 [734a7de6ff]  Joshua Colp <jcolp at digium.com>
+2016-09-01 11:12 +0000 [ebd944a54d]  Kevin Harwell <kharwell at digium.com>
 
-	* .version: Update for 13.10.0
+	* .version: Update for 13.11.0
 
-2016-07-21 09:49 +0000 [cf223d2cad]  Joshua Colp <jcolp at digium.com>
+2016-09-01 11:12 +0000 [fa7feca7dd]  Kevin Harwell <kharwell at digium.com>
 
-	* .lastclean: Update for 13.10.0
+	* .lastclean: Update for 13.11.0
 
-2016-07-21 09:49 +0000 [07af28131f]  Joshua Colp <jcolp at digium.com>
+2016-09-01 11:12 +0000 [dcb70dfaea]  Kevin Harwell <kharwell at digium.com>
 
-	* realtime: Add database scripts for 13.10.0
+	* realtime: Add database scripts for 13.11.0
 
-2016-07-14 17:52 +0000  Asterisk Development Team <asteriskteam at digium.com>
+2016-08-30 18:12 +0000  Asterisk Development Team <asteriskteam at digium.com>
 
-	* asterisk 13.10.0-rc3 Released.
+	* asterisk 13.11.0-rc2 Released.
 
-2016-07-14 12:51 +0000 [d456aa0519]  Mark Michelson <mmichelson at digium.com>
+2016-08-30 13:11 +0000 [3d2ed81c1b]  Kevin Harwell <kharwell at digium.com>
 
-	* Release summaries: Add summaries for 13.10.0-rc3
+	* Release summaries: Add summaries for 13.11.0-rc2
 
-2016-07-14 12:51 +0000 [b3df380e56]  Mark Michelson <mmichelson at digium.com>
+2016-08-30 13:11 +0000 [313683b96d]  Kevin Harwell <kharwell at digium.com>
 
 	* Release summaries: Remove previous versions
 
-2016-07-14 12:51 +0000 [ac5a6c8cad]  Mark Michelson <mmichelson at digium.com>
+2016-08-30 13:11 +0000 [2a99049ea4]  Kevin Harwell <kharwell at digium.com>
+
+	* .version: Update for 13.11.0-rc2
+
+2016-08-30 13:11 +0000 [620046255f]  Kevin Harwell <kharwell at digium.com>
+
+	* .lastclean: Update for 13.11.0-rc2
+
+2016-08-30 13:11 +0000 [09647449e4]  Kevin Harwell <kharwell at digium.com>
+
+	* realtime: Add database scripts for 13.11.0-rc2
+
+2016-08-24 14:42 +0000 [e64170e493]  gtjoseph <gjoseph at digium.com>
+
+	* res_rtp_multicast:  Fix SEGV in ast_multicast_rtp_create_options
+
+	  ast_multicast_rtp_create_options now checks for NULL or empty options
+
+	  Change-Id: Ib845eae46a67a9787e89a87ebd1027344e5e0362
+	  (cherry picked from commit c9e83f6d0be9d89a3beaa509b46c423d78fac6d1)
+
+2016-08-30 09:53 +0000 [91e415b970]  Kevin Harwell <kharwell at digium.com>
+
+	* ChangeLog: Updated for 13.11.0-rc2
+
+2016-08-30 09:53 +0000 [9c8a7bf1e9]  Kevin Harwell <kharwell at digium.com>
+
+	* Release summaries: Add summaries for 13.11.0-rc2
+
+2016-08-30 09:53 +0000 [c29eb6cad1]  Kevin Harwell <kharwell at digium.com>
+
+	* Release summaries: Remove previous versions
+
+2016-08-30 09:53 +0000 [53ab4718ac]  Kevin Harwell <kharwell at digium.com>
+
+	* .version: Update for 13.11.0-rc2
+
+2016-08-30 09:53 +0000 [98b7b9e101]  Kevin Harwell <kharwell at digium.com>
+
+	* .lastclean: Update for 13.11.0-rc2
+
+2016-08-30 09:53 +0000 [9de68f3d44]  Kevin Harwell <kharwell at digium.com>
+
+	* realtime: Add database scripts for 13.11.0-rc2
+
+2016-08-22 17:08 +0000 [6da8511a6a]  Mark Michelson <mmichelson at digium.com>
+
+	* res_pjsip: Default endpoints to the "offline" status.
+
+	  A recent change attempted to optimize startup by not updating contact
+	  status. Instead, code responsible for qualifying contacts updates the
+	  status as it becomes known. The code even accounts for contacts/AORs
+	  that are not set to be qualified.
+
+	  The problem, though, is when there are no contacts associated with an
+	  endpoint. A common case is when an endpoint is set to register its
+	  contacts but has not done so yet. In this case, prior to registration,
+	  the endpoint's device state will appear to be "not in use" and hints
+	  associated with that device will appear to be "idle". In actuality, the
+	  device state and hint should both appear as "unavailable". The reason
+	  for the failure is that the optimization change made all persistent
+	  endpoint states set to "unknown".
+
+	  The fix here is to change the hard-coded "unknown" to be "offline"
+	  instead. The default state will be offline until the qualifying code
+	  determines that the contact is actually online. This way, if there are
+	  no contacts at all, then the state stays as offline, and device state
+	  and hints appear correctly.
+
+	  ASTERISK-26269 #close
+	  Reported by nappsoft
+
+	  Change-Id: Ie99b84169393983453076f5e9c0d35ff313a456a
+	  (cherry picked from commit c16ef02318201f9db2e26512ec66cd62ec878d04)
+
+2016-08-25 07:06 +0000 [884db40142]  Joshua Colp <jcolp at digium.com>
+
+	* app_queue: Ensure member is removed from pending when hanging up.
+
+	  When dialing channels it is possible that they may not ever
+	  leave the not in use state (Local channels in particular) by
+	  the time we cancel them. If this occurs but we know they were
+	  dialed we explicitly remove them from the pending members
+	  container so that subsequent call attempts occur.
+
+	  ASTERISK-26299 #close
+
+	  Change-Id: I6ad0d17c36480c92cebf840626228ce3f7e4bd65
+
+2016-07-17 18:28 +0000 [ba7582ba75]  gtjoseph <gjoseph at digium.com>
+
+	* pjproject_bundled:  Update for pjproject 2.5.5
+
+	  Add more --disable-* switches to Makefile.rules including
+	  --disable-opus which was causing bundled pjproject to fail with
+	  "undefined reference" errors in libasteriskpj.
+
+	  Changed PJ_ENABLE_EXTRA_CHECK to 1.
+
+	  Removed 2 obsolete patches and added a new one.
+	  The new one was merged by Teluu on 6/27/2016.
+
+	  ASTERISK-26148 #close
 
-	* .version: Update for 13.10.0-rc3
+	  Change-Id: Ib8af6c6a9d31f7238ce65b336134c2efdc855063
+	  (cherry picked from commit 972cee2e4c402df3ddce237951e9d54281093be4)
+
+2016-07-29 13:13 +0000 [e6c2a29ad2]  Mark Michelson <mmichelson at digium.com>
+
+	* Remove SILK payload mappings from Asterisk core.
+
+	  SILK is a bit of a hog when it comes to using up our limited number of
+	  dynamic payload types in the RTP engine. By freeing up four slots, it
+	  allows for other codecs to potentially take the place.
+
+	  Now, codec_silk.so will dynamically use the payload slots in the RTP
+	  engine when it loads.
+
+	  A better fix would be make RTP dynamic payload types actually
+	  dynamic. However, at this stage of Asterisk 14 development, this is a
+	  risky move that would be imprudent.
+
+	  Change-Id: I5774e09408f9a203db189529eabdc0d3f4c1e612
+	  (cherry picked from commit d50895c7b04036aeaad58990089399e46db4c817)
+
+2016-07-28 14:32 +0000  Asterisk Development Team <asteriskteam at digium.com>
+
+	* asterisk 13.11.0-rc1 Released.
+
+2016-07-28 09:29 +0000 [3bfaf6b172]  Mark Michelson <mmichelson at digium.com>
+
+	* Release summaries: Add summaries for 13.11.0-rc1
+
+2016-07-28 09:27 +0000 [ca145e1807]  Mark Michelson <mmichelson at digium.com>
+
+	* .version: Update for 13.11.0-rc1
+
+2016-07-28 09:27 +0000 [918ebf79ff]  Mark Michelson <mmichelson at digium.com>
+
+	* .lastclean: Update for 13.11.0-rc1
+
+2016-07-28 09:27 +0000 [d7afc1cf9d]  Mark Michelson <mmichelson at digium.com>
+
+	* realtime: Add database scripts for 13.11.0-rc1
+
+2016-07-21 22:28 +0000 [159e437e5a]  Richard Mudgett <rmudgett at digium.com>
+
+	* dsp.c: Fix erroneous fax tone detection.
+
+	  The Goertzel calculations get less accurate the lower the signal level
+	  being worked with becomes because there is less resolution remaining.
+	  If it is too low we can erroneously detect a tone where none really
+	  exists.  The searched for fax frequencies not only need to be so much
+	  stronger than the background noise they must also be a minimum strength.
+
+	  * Add needed minimum threshold test to tone_detect().
+
+	  * Set TONE_THRESHOLD to allow low volume frequency spread detection.
+
+	  ASTERISK-26237 #close
+	  Reported by: Richard Mudgett
+
+	  Change-Id: I84dbba7f7628fa13720add6a88eae3b129e066fc
+
+2016-07-22 14:44 +0000 [eda95236d1]  Mark Michelson <mmichelson at digium.com>
+
+	* Fix sqlalchemy error regarding identifier length.
+
+	  sqlalchemy was complaining:
+
+	  sqlalchemy.exc.IdentifierError: Identifier
+	  'ps_contacts_qualifyfreq_exptime' exceeds maximum length of 30
+	  characters
+
+	  This fixes the problem by changing the index name to be
+	  "ps_contacts_qualifyfreq_exp" instead.
+
+	  ASTERISK-26227 #close
+	  Reported by Mark Michelson
+
+	  Change-Id: I0ed784f87504be2a59ee8d3242ef6f625d5ed1a9
+
+2016-07-22 05:46 +0000 [66c9dfb272]  Alexander Traud <pabstraud at compuserve.com>
+
+	* chan_sip: Enable Session-Timers for SIP over TCP (and TLS).
+
+	  Asterisk defaults to timers=accept/refresher=uas. In that scenario, only in that
+	  scenario, Sessions-Timers (RFC 4028) had no effect via TCP. This change enables
+	  Session-Timers for SIP over TCP (and for SIP over TLS).
+
+	  However with longer international calls via TCP, the SIP channel might break,
+	  because all hops on the Internet route must stay online (have not a single power
+	  outage, for example). Therefore with Session-Timers enabled (which are enabled
+	  at default), you might see dropped calls. Consequently even with this change,
+	  you might be better-off going for session-timers=refuse in your sip.conf.
+
+	  ASTERISK-19968 #close
+
+	  Change-Id: I1cd33453c77c56c8e1394cd60a6f17bb61c1d957
+
+2016-07-15 16:16 +0000 [33716106e0]  Richard Mudgett <rmudgett at digium.com>
+
+	* res_pjsip: Whitespace and comment cleanup.
+
+	  Change-Id: I11139a4a95df34e223ba622aa6227e33ab8f6c38
+
+2016-07-21 09:05 +0000 [52ab0bf258]  gtjoseph <gjoseph at digium.com>
+
+	* chan_sip: Prevent deadlock when issuing "sip show channels"
+
+	  sip_show_channels locks the dialogs container first then locks each
+	  sip_pvt so it can spit out the details.  The rest of sip dialog
+	  processing locks the sip_pvt first then locks the dialogs container
+	  if it needs to.  Both lock in the order they need but deadlocks can
+	  result.  To fix, sip_show_channels and sip_show_channelstats have
+	  been converted to use an iterator rather than ao2_callback.  This way
+	  the container is locked only while getting the next entry and is
+	  unlocked when the callback is called.
+
+	  ASTERISK-23013 #close
+
+	  Change-Id: Id9980419909e811f89484950ed46ef117b9eb990
+
+2016-07-19 15:22 +0000 [5997ec7c9e]  Alexei Gradinari <alex2grad at gmail.com>
+
+	* res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice.
+
+	  This patch removed call of pjsip_tx_data_dec_ref in send_notify
+	  if send_request failed.
+	  The pjsip_dlg_send_request deletes the message on error by itself.
+
+	  It seems this patch fixes next issues:
+	  ASTERISK-26199
+	  ASTERISK-26166
+	  ASTERISK-26174
+
+	  Change-Id: I8b05917c93d993f95d604c042ace5f1a5500f59a
+
+2016-07-18 22:46 +0000 [7fdf7c3d4c]  Corey Farrell <git at cfware.com>
+
+	* Add conditional support for noreturn functions.
+
+	  This adds support for tagging functions with the noreturn attribute.
+	  If DO_CRASH is enabled then ast_do_crash never returns.  If AST_DEVMODE
+	  and DO_CRASH are enabled then failed assertions never return.  This can
+	  resolve a large number of false positives with static analyzers.
+
+	  ASTERISK-26220 #close
+
+	  Change-Id: Icfb61e5fe54574eced4c3e88b317244f467ec753
+
+2016-07-19 13:18 +0000 [dcb8aa8c1c]  Richard Mudgett <rmudgett at digium.com>
+
+	* chan_dahdi.c: Fix deadlock potential in fax redirection.
+
+	  The dahdi_handle_dtmf() and my_handle_dtmf() have the potential to
+	  deadlock if an incoming fax happens during the Playback or similar
+	  application.
+
+	  * Fixed the potential deadlock by not calling ast_async_goto() with the
+	  channel lock held.
+
+	  ASTERISK-26216 #close
+	  Reported by: Richard Mudgett
+
+	  Change-Id: I9144b84ade5f96690996624ec8a2d40c56af40aa
+
+2016-07-13 18:49 +0000 [fa91cf3eec]  Richard Mudgett <rmudgett at digium.com>
+
+	* chan_sip.c: Fix deadlock potential in fax redirection.
+
+	  The sip_read() has the potential to deadlock if an incoming fax happens
+	  during the Playback or similar application.
+
+	  * Fixed the potential deadlock by not calling ast_async_goto() with the
+	  channel lock held.
+
+	  * Made always eat the fax detection frame whether there is a fax extension
+	  or not.
+
+	  ASTERISK-26216
+	  Reported by: Richard Mudgett
+
+	  Change-Id: I6d3f5cccd4b77c3aa6ffc1a54c0f6bde61c9278e
+
+2016-07-13 18:48 +0000 [2e1bdc3775]  Richard Mudgett <rmudgett at digium.com>
+
+	* chan_pjsip.c: Fix deadlock potential in fax redirection.
+
+	  The chan_pjsip_cng_tone_detected() has the potential to deadlock if an
+	  incoming fax happens during the Playback or similar application.
+
+	  * Fixed the potential deadlock by not calling ast_async_goto() with the
+	  channel lock held.
+
+	  * Made always eat the fax detection frame whether there is a fax extension
+	  or not.
+
+	  ASTERISK-26216
+	  Reported by: Richard Mudgett
+
+	  Change-Id: I32aecbb4818af646dc5a619f0dc040e9b1f222e5
+
+2016-07-12 17:33 +0000 [628e8c91d5]  Richard Mudgett <rmudgett at digium.com>
+
+	* res_fax.c: Fix deadlock potential in FAXOPT(faxdetect) framehook.
+
+	  The fax_detect_framehook() has the potential to deadlock if an incoming
+	  fax happens during the Playback or similar application.
+
+	  * Fixed the potential deadlock by not calling ast_async_goto() with the
+	  channel lock held.
+
+	  * Made always eat the fax detection frame whether there is a fax extension
+	  or not.
+
+	  * Made only detach the framehook if we detected a fax and not on other
+	  possible frames.
+
+	  ASTERISK-26216
+	  Reported by: Richard Mudgett
+
+	  Change-Id: I99da35c26d1cd802626ffb4c1b4eb5b015581b6d
+
+2016-07-12 17:24 +0000 [676aeede36]  Richard Mudgett <rmudgett at digium.com>
+
+	* res_fax: Fix FAXOPT(faxdetect) timeout option.
+
+	  The fax detection timeout option did not work because basically the wrong
+	  variable was checked in fax_detect_framehook().  As a result, the timer
+	  would timeout immediately and disable fax detection.
+
+	  * Fixed ignoring negative timeout values.  We'd complain and then go right
+	  on using the negative value.
+
+	  * Fixed destroy_faxdetect() in the off-nominal case of an incomplete
+	  object creation.
+
+	  * Added more range checking to FAXOPT(gateway) timeout parameter.
+
+	  ASTERISK-26214 #close
+	  Reported by: Richard Mudgett
+
+	  Change-Id: Idc5e698dfe33572de9840bc68cd9fc043cbad976
+
+2016-07-18 16:16 +0000 [652130feb2]  Richard Mudgett <rmudgett at digium.com>
+
+	* chan_dahdi: Add faxdetect_timeout option.
+
+	  The new option allows the channel driver's faxdetect option to timeout on
+	  a call after the specified number of seconds into a call.  The new feature
+	  is disabled if the timeout is set to zero.  The option is disabled by
+	  default.
+
+	  * Don't clear dsp_features after passing them to the dsp code in
+	  my_pri_ss7_open_media().  We should still remember them especially for the
+	  new faxdetect_timeout option.
+
+	  ASTERISK-26214
+	  Reported by: Richard Mudgett
+
+	  Change-Id: Ieffd3fe788788d56282844774365546dce8ac810
+
+2016-07-15 20:44 +0000 [851b1c3a17]  Richard Mudgett <rmudgett at digium.com>
+
+	* res_pjsip: Add fax_detect_timeout endpoint option.
+
+	  The new endpoint option allows the PJSIP channel driver's fax_detect
+	  endpoint option to timeout on a call after the specified number of
+	  seconds into a call.  The new feature is disabled if the timeout is set
+	  to zero.  The option is disabled by default.
+
+	  ASTERISK-26214
+	  Reported by: Richard Mudgett
 
-2016-07-14 12:51 +0000 [d3c10e5de3]  Mark Michelson <mmichelson at digium.com>
+	  Change-Id: Id5a87375fb2c4f9dc1d4b44c78ec8735ba65453d
 
-	* .lastclean: Update for 13.10.0-rc3
+2016-07-19 04:48 +0000 [021d4892cd]  Alexander Traud <pabstraud at compuserve.com>
 
-2016-07-14 12:51 +0000 [305a6dbc85]  Mark Michelson <mmichelson at digium.com>
+	* Makefile: Retain XML Declaration and DTD in docs.
 
-	* realtime: Add database scripts for 13.10.0-rc3
+	  Since Asterisk 12, the documentation got an XML Stylesheet. Because of a typo,
+	  the XML Declaration and DTD were overwritten by this.
 
-2016-07-11 10:25 +0000 [25a42c176f]  Richard Mudgett <rmudgett at digium.com>
+	  ASTERISK-26212 #close
+
+	  Change-Id: If5ee4625068042e98ab3fcb22a25e2f15d0c68bd
+
+2016-07-18 18:39 +0000 [c8e41d14a1]  Corey Farrell <git at cfware.com>
+
+	* Unit tests: Use AST_TEST_DEFINE in conditional code only.
+
+	  If AST_TEST_DEFINE is not conditional to TEST_FRAMEWORK it produces dead
+	  code.  This places all existing unit tests into a conditional block if
+	  they weren't already.
+
+	  ASTERISK-26211 #close
+
+	  Change-Id: I8ef83ee11cbc991b07b7a37ecb41433e8c734686
+
+2016-07-18 05:13 +0000 [e404f51b42]  Alexander Traud <pabstraud at compuserve.com>
+
+	* res_rtp_asterisk: Count a roll-over of the sequence number even on lost packets.
+
+	  With this change, the initial RTP sequence number is randomly chosen not between
+	  0 and 65535 (0xffff) but 0 and 32767 (0x7fff). This assures, the roll-over
+	  counter (ROC) synchronization is not lost for sRTP, when the very first RTP
+	  packets get lost; see http://srtp.sourceforge.net/faq.html#Q6
+
+	  ASTERISK-26207 #close
+
+	  Change-Id: I9a527e3aa3ce8f3becc5131d7ba32b57b5845464
+
+2016-07-18 04:14 +0000 [5f24874ebb]  Alexander Traud <pabstraud at compuserve.com>
+
+	* Makefile: Suppress echoing of target 'config' again.
+
+	  ASTERISK-26038 #close
+
+	  Change-Id: I5746cf639f3fdc6332e8a97cf01f979e30bf403f
+
+2016-07-14 03:25 +0000 [76d4983c15]  Corey Farrell <git at cfware.com>
+
+	* features.c: Remove unneeded adsi.h include.
+
+	  adsi.h is no longer used by features.c since parking was moved to a
+	  module.
+
+	  Change-Id: I2248b8a455225a17cb6ddaafd6c20c511a1eaf59
+
+2016-07-14 18:06 +0000 [cb58f853e1]  Alexei Gradinari <alex2grad at gmail.com>
+
+	* res_pjsip_mwi: remove unneeded check on endpoint's contacts.
+
+	  The function create_mwi_subscriptions_for_endpoint checks
+	  if there is active contacts by retrieving aors and contacts.
+
+	  This function is used to create all unsolicited mwi subscriptions
+	  on startup and is used when contact added.
+
+	  In both cases it's not necessary to check if there are contacts.
+	  The contacts are needed when asterisk sends mwi.
+
+	  ASTERISK-26200 #close
+
+	  Change-Id: I98e43bdc97f3c0829951cd9bf5f3c6348c6ac1fa
+
+2016-06-30 15:58 +0000 [28501051b4]  Mark Michelson <mmichelson at digium.com>
+
+	* Update support for SILK format.
+
+	  This commit adds scaffolding in order to support the SILK audio format
+	  on calls. Roughly, this is what is added:
+
+	  * Cached silk formats. One for each possible sample rate.
+	  * ast_codec structures for each possible sample rate.
+	  * RTP payload mappings for "SILK".
+
+	  In addition, this change overhauls the res_format_attr_silk file in the
+	  following ways:
+
+	  * The "samplerate" attribute is scrapped. That's native to the format.
+	  * There are far more checks to ensure that attributes have been
+	    allocated before attempting to reference them.
+	  * We do not SDP fmtp lines for attributes set to 0.
+
+	  These changes make way to be able to install a codec_silk module and
+	  have it actually work. It also should allow for passthrough silk calls
+	  in Asterisk.
+
+	  Change-Id: Ieeb39c95a9fecc9246bcfd3c45a6c9b51c59380e
+
+2016-07-14 07:45 +0000 [43b5f8d57b]  Richard Miller (license 5685)
+
+	* app_queue: Only remove queue member from pending when state changes.
+
+	  It is possible for a not in use state change to occur multiple
+	  times causing a queue member to be removed from the pending call
+	  container prematurely.
+
+	  The first not in use state change will remove the queue member
+	  from the container. At this moment the member may be called and
+	  placed in the pending container. After this another not in use
+	  state change can be received which will remove it from the
+	  container. Despite being called at this point the code will
+	  incorrectly see that there are no pending calls to it.
+
+	  This change only removes it from the pending container if the
+	  state has actually changed.
+
+	  ASTERISK-26133 #close
+	  patches:
+	    app_queue.diff submitted by Richard Miller (license 5685)
+
+	  Change-Id: Ie5a7f17a44f98e9159e9b85009ce3f8393aa78c0
+
+2016-07-14 02:40 +0000 [a17b071e36]  Corey Farrell <git at cfware.com>
+
+	* pbx: Fix leak of timezone for time based includes.
+
+	  Create include_free to run ast_destroy_timing and ast_free, use that in
+	  all places that freed an ast_include structure.  This fixes a couple of
+	  paths that previously did not run ast_destroy_timing.
+
+	  ASTERISK-26196 #close
+
+	  Change-Id: I1671bd111bef0dc113e8bf8f77f89fcfc395d838
+
+2016-07-13 17:45 +0000 [8cef8f35e7]  Kevin Harwell <kharwell at digium.com>
+
+	* translate: explicit format destination not properly set
+
+	  If the destination format's name differed from the codec name then the
+	  translator's explict_dst field would be improperly set. In some circumstances
+	  it would end up setting it to a newly created format that has the same name
+	  as the codec when it actually needed to be the given destination codec.
+
+	  This could cause the translation path to use the wrong format. For instance,
+	  if an endpoint had specified 'myulaw' as a format the translator could end up
+	  using a 'ulaw' format (with whatever/default settings) instead. If the format
+	  attribute settings differed between the two then there may unexpected results
+	  during processing.
+
+	  This patch removes the name check when building the translation path. This
+	  should make it always set the translator's explicit_dst to the given destination
+	  format as long as the sample rate and types match.
+
+	  Change-Id: Iaf8a03831d68e657d89569d54b505074efbefab5
+
+2016-07-08 11:46 +0000 [afbd10b0c5]  Richard Mudgett <rmudgett at digium.com>
+
+	* stasis_endpoint.c: Fix contactstatus_to_json().
+
+	  The roundtrip_usec json member is optional.  If it isn't present then
+	  don't put it into the converted json structure where ast_json_pack()
+	  will choke on it.
+
+	  Change-Id: I39bb2f86154ef54591270c58bfda8635070f9ea0
+
+2016-07-13 13:45 +0000 [2be13d62fd]  Corey Farrell <git at cfware.com>
+
+	* chan_sip: Fix reference leak in mwi_event_cb
+
+	  Cleanup the peer reference when stasis_subscription_final_message is
+	  true.  Also free peer_name even if peer exists, after reload a new
+	  peer_name will be allocated.
+
+	  ASTERISK-26193 #close
+
+	  Change-Id: If7ecd52facdc5c227f701c760841e3f6ca53cc69
+
+2016-06-22 07:13 +0000 [332beb27d8]  Eugene Voityuk <eugene at thirdlane.com>,Alexander Traud <pabstraud at compuserve.com>
+
+	* res_rtp_asterisk: Enable Forward Secrecy (PFS) for DTLS.
+
+	  Since July 2014, TLS based protocols (SIP over TLS, Secure WebSockets, HTTPS)
+	  support PFS thanks to ASTERISK-23905. In July 2015, the same feature was added
+	  for DTLS. The source code from main/tcptls.c should have been re-used to ease
+	  security audits. Therefore, this change rolls back the change from July 2015 and
+	  re-uses the code from July 2014. This has the additional benefits to work under
+	  CentOS 7 and enabling not just ECDHE but DHE based cipher suites as well.
+
+	  ASTERISK-25659 #close
+	  Reported by: StefanEng86, urbaniak, pay123
+	  Tested by: sarumjanuch, traud
+	  patches:
+	  res_rtp_asterisk.patch submitted by sarumjanuch
+	  dtls_centos_step_1.patch submitted by traud
+	  dtls_centos_step_2.patch submitted by traud
+
+	  Change-Id: I537cadf4421f092a613146b230f2c0ee1be28d5c
+
+2016-07-13 11:30 +0000 [672a64bda3]  Corey Farrell <git at cfware.com>
+
+	* threadpool: Fix leak in ast_threadpool_serializer_group error path.
+
+	  ast_threadpool_serializer_group leaks a reference to ser when listener
+	  is allocated but tps is not.  Although listener takes the reference to
+	  ser cleanup functions are not run without tps.
+
+	  ASTERISK-26191 #close
+
+	  Change-Id: Ie3ccf69a3f1e676c2ef62a77067c0cb57dc9a585
+
+2016-07-11 10:22 +0000 [fea201f7e6]  Richard Mudgett <rmudgett at digium.com>
+
+	* pjsip_options.c: Fix container operation.
+
+	  aor_observer_deleted() needs to operate on all contacts found for the
+	  deleted AOR instead of only the first one found.  This is really only a
+	  problem if there is more than one contact for the AOR.
+
+	  Change-Id: Id24ac0d5e8c931330231fb45dd2a331a84339dc1
+
+2016-07-11 10:21 +0000 [02877b4b4f]  Richard Mudgett <rmudgett at digium.com>
+
+	* pjsip_configuration.c: Misc cleanups.
+
+	  * Fix some whitespace in various routines.
+
+	  * Rename i to iter in persistent_endpoint_update_state().
+
+	  * Fix off-nominal copy/paste message wording in
+	  persistent_endpoint_contact_deleted_observer()
+
+	  Change-Id: Id8e34f5d09e7eebac3af22501c44c1110a3e29d8
+
+2016-07-13 08:57 +0000 [148cd1b319]  Alexander Traud <pabstraud at compuserve.com>
+
+	* BuildSystem: Avoid obsolete warning with pthread.m4 on autoconf.
+
+	  Updated the macro-set autoconf/ax_pthread.m4 to its latest upstream version.
+
+	  ASTERISK-26046 #close
+
+	  Change-Id: I11abc11d17acd2b6a8a5a5be8ae8e0949dab9cc7
+
+2016-07-11 10:25 +0000 [97b4c7a5b4]  Richard Mudgett <rmudgett at digium.com>
 
 	* res_pjsip: Fix statsd regression.
 
@@ -76,7 +830,50 @@
 
 	  Change-Id: Ie072be790fbb2a8f5c1c874266e4143fa31f66d1
 
-2016-07-10 19:08 +0000 [21b5d56f39]  Joshua Colp <jcolp at digium.com>
+2016-07-12 03:50 +0000 [3be6fa1e4b]  Alexander Traud <pabstraud at compuserve.com>
+
+	* BuildSystem: Allow own CFLAGS on ./configure.
+
+	  Before this change, make failed with the error
+	  Unknown value '' found in build_tools/menuselect-deps for NATIVE_ARCH
+	  when CFLAGS were supplied to the configure script. This was introduced with
+	  <https://reviewboard.asterisk.org/r/1852/> which disabled BUILD_NATIVE when
+	  CFLAGS were supplied. Those who need different -march= values, please, go for
+	  ./configure
+	  make menuselect.makeopts or make menuselect
+	  ./menuselect/menuselect --disable BUILD_NATIVE
+
+	  ASTERISK-25289 #close
+
+	  Change-Id: Ic6365d5a97bb9b3556858f06432a8d1cfa83eebc
+
+2016-07-11 13:42 +0000 [5ee205d8bb]  Richard Mudgett <rmudgett at digium.com>
+
+	* ast_expr2: Fix off-nominal memory leak.
+
+	  Thanks to ibercom for pointing out a memory leak that was missed
+	  in the earlier patch for the issue.
+
+	  ASTERISK-26119
+	  Reported by: Alexei Gradinari
+
+	  Change-Id: I9a151f5c4725d97fb82a9e938bc73dc659532b71
+
+2016-07-11 10:17 +0000 [f5e9872016]  Alexander Traud <pabstraud at compuserve.com>
+
+	* install_prereq: Checkout of libSRTP 1.5.x.
+
+	  Since 5th November 2014, the master branch of libSRTP changed the prefix of
+	  several member names and is not compatible with the source code in Asterisk
+	  anymore. Therefore instead, this change checks out the latest version of the
+	  libSRTP 1.5.x branch. Furthermore now, libSRTP is compiled with OpenSSL as
+	  backend. This makes AES-GCM and AES-IN possible.
+
+	  ASTERISK-22131 #close
+
+	  Change-Id: I2e396cdc01da0ff610686e398ed210ca7408f7d6
+
+2016-07-10 19:08 +0000 [17efed6cf7]  Joshua Colp <jcolp at digium.com>
 
 	* func_odbc: Fix connection deadlock.
 
@@ -98,31 +895,262 @@
 
 	  Change-Id: I9bdbd8a300fb3233877735ad3fd07bce38115b7f
 
-2016-07-05 16:07 +0000  Asterisk Development Team <asteriskteam at digium.com>
+2016-07-09 13:32 +0000 [06ba533bc7]  Corey Farrell <git at cfware.com>
 
-	* asterisk 13.10.0-rc2 Released.
+	* chan_sip: Fix reference leaks in error paths.
 
-2016-07-05 11:07 +0000 [d579dce147]  Mark Michelson <mmichelson at digium.com>
+	  * get_sip_pvt_from_replaces leaks sip_pvt_ptr on any error.
+	  * build_peer leaks peer on failure to allocate the endpoint.
 
-	* Release summaries: Add summaries for 13.10.0-rc2
+	  This patch fixes get_sip_pvt by using an RAII_VAR, build_peer is fixed
+	  with an unref in the appropriate place.
 
-2016-07-05 11:06 +0000 [486fbce3d5]  Mark Michelson <mmichelson at digium.com>
+	  ASTERISK-26184 #close
 
-	* Release summaries: Remove previous versions
+	  Change-Id: I728b424648ad041409f7d90880f4c28b3ce2ca12
+
+2016-07-07 12:41 +0000 [9d4e664f62]  Corey Farrell <git at cfware.com>
+
+	* REF_DEBUG: Prevent logging of container node objects.
 
-2016-07-05 11:06 +0000 [fb6bd30291]  Mark Michelson <mmichelson at digium.com>
+	  Using AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE can result in an unref being
+	  recorded to the refs log for the node being replaced.  This prevents
+	  logging of those unrefs since they would produce errors in
+	  refcounter.py.
 
-	* .version: Update for 13.10.0-rc2
+	  ASTERISK-26181 #close
 
-2016-07-05 11:06 +0000 [f6bd754584]  Mark Michelson <mmichelson at digium.com>
+	  Change-Id: Ie4fded84e8a1a58b3a59ce59dfd7eb0da3ddc5d4
 
-	* .lastclean: Update for 13.10.0-rc2
+2016-07-07 10:55 +0000 [e26bd15e7a]  Scott Griepentrog <scott at griepentrog.com>
 
-2016-07-05 11:06 +0000 [40cd52de7e]  Mark Michelson <mmichelson at digium.com>
+	* PJSIP: provide valid tcp nodelay option for reuse
 
-	* realtime: Add database scripts for 13.10.0-rc2
+	  When using TCP transport with chan_pjsip, the TCP_NODELAY
+	  option value was allocated on the stack, then passed as a
+	  pointer to the tcp transport configuration structure, and
+	  later re-used on subsequently created sockets when it was
+	  no longer valid.  This patch changes the allocation to be
+	  a static.
 
-2016-06-30 08:25 +0000 [78dcdd3010]  gtjoseph <gjoseph at digium.com>
+	  ASTERISK-26180 #close
+	  Reported by: Scott Griepentrog
+
+	  Change-Id: I3251164c7f710dbdab031282f00e30a9770626a0
+
+2016-07-07 10:38 +0000 [77b0145a25]  Joshua Colp <jcolp at digium.com>
+
+	* chan_sip/res_pjsip_t38: Handle a request to negotiate T.38 after it is enabled.
+
+	  Some T.38 implementations may send another re-invite after the initial
+	  one which adds additional negotiation details (such as the max bitrate).
+	  Currently this will fail when passthrough is being done in chan_sip as we
+	  do nothing if T.38 is already active.
+
+	  Other handlers of T.38 inside of Asterisk (such as res_fax) handle this
+	  scenario so this change adds support for it to chan_sip and res_pjsip_t38.
+	  If a request to negotiate is received while T.38 is already enabled a
+	  new re-INVITE is sent and negotiation is done again.
+
+	  ASTERISK-26179 #close
+
+	  Change-Id: I0298494d3da6df3219bbfa4be9aa04015043145c
+
+2016-07-04 16:38 +0000 [b4a9fa2c9e]  Alexei Gradinari <alex2grad at gmail.com>
+
+	* res_sorcery_realtime: fix bug when successful UPDATE is treated as failed
+
+	  If the SQL UPDATE statement changes nothing then SQLRowCount returns 0.
+	  This value should be treated as success.
+	  But the function sorcery_realtime_update treats it as failed.
+
+	  This bug was found using stress tests on PJSIP.
+	  If there are 2 consecutive SIP REGISTER requests with the same contact data
+	  during 1 second then res_pjsip_registrar adds contact location on 1st request
+	  and tries to update contact location on 2nd.
+	  The update fails and res_pjsip_registrar even removes correct contact location.
+
+	  The test "object_update_uncreated" was removed from test_sorcery_realtime.c
+	  because it's now a valid situation.
+
+	  This patch also adds missing debug of extra SQL parameter.
+
+	  ASTERISK-26172 #close
+
+	  Change-Id: I05a7f3051455336c9dda29efc229decf86071303
+
+2016-06-24 19:55 +0000 [1dfd3fc995]  Matt Jordan <mjordan at digium.com>
+
+	* res/res_pjsip_session: Check for presence of an active negotiator
+
+	  It is possible in a hypothetical situation for a session refresh to be
+	  invoked on a PJSIP when the negotiatior on the INVITE session has not
+	  yet been established. While this shouldn't occur with existing uses of
+	  ast_sip_session_refresh, the crashes that occur due to improperly
+	  calling PJSIP functions that expect a non-NULL negotiatior are
+	  avoidable. PJSIP will create the negotiator in pjsip_inv_reinvite; this
+	  means that simply checking for the presence of the negotiator before
+	  passing it to other PJSIP functions that use it is allowable. As such,
+	  this patch adds checks for the presence of the negotiator before calling
+	  PJSIP functions that assume it is non-NULL.
+
+	  Change-Id: I1028323e7e01b0a531865e5412a71b6f6ec4276d
+
+2015-10-19 18:55 +0000 [9dd0aeeb44]  Matt Jordan <mjordan at digium.com>
+
+	* res/res_pjsip_pubsub: Add additional debug statements
+
+	  When something very sad and wrong occurs, it's challenging sometimes to
+	  figure out why. This patch adds some additional debug statements on
+	  off-nominal paths to try and make debugging easier.
+
+	  Change-Id: I7bffb73cc733b6f80193a23340881db4a102b640
+
+2015-10-19 18:55 +0000 [1ec4f8dd00]  Matt Jordan <mjordan at digium.com>
+
+	* res/res_corosync: Raise a Stasis message on node join/leave events
+
+	  When res_corosync detects that a node leaves or joins, it currently is
+	  informed of this via Corosync callbacks. However, there are a few
+	  limitations with the information presented:
+	  (1) While we have information that Corosync is aware of - such as the
+	      Corosync nodeid - that information is really only useful inside of
+	      Corosync or res_corosync. There's no way to translate a Corosync
+	      nodeid to some other internally useful unique identifier for the
+	      Asterisk instance that just joined or left the cluster.
+	  (2) While res_corosync is notified of the instance joining or leaving
+	      the cluster, it has no mechanism to inform the Asterisk core or
+	      other modules of this event. This limits the usefulness of res_corosync
+	      as a heartbeat mechanism for other modules.
+
+	  This patch addresses both issues.
+
+	  First, it adds the notion of a cluster discovery message both within the
+	  Stasis message bus, as well as the binary event messages that
+	  res_corosync uses to transmit data back and forth within the cluster.
+	  When Asterisk joins the cluster, it sends a discovery message to the other
+	  nodes in the cluster, which correlates the Corosync nodeid along with
+	  the Asterisk EID. res_corosync now maintains a hash of Corosync nodeids
+	  to Asterisk EIDs, such that it can map changes in cluster state with the
+	  Asterisk instance that has that nodeid. Likewise, when an Asterisk
+	  instance receives a discovery message from a node in the cluster, it now
+	  sends its own discovery message back to the originating node with the
+	  local Asterisk EID. This lets Asterisk instances within the cluster
+	  build a complete picture of the other Asterisk instances within the
+	  cluster.
+
+	  Second, it publishes the discovery messages onto the Stasis message bus.
+	  Said messages are published whenever a node joins or leaves the cluster.
+	  Interested modules can subscribe for the ast_cluster_discovery_type()
+	  message under the ast_system_topic() and be notified when changes in
+	  cluster state occur.
+
+	  Change-Id: I9015f418d6ae7f47e4994e04e18948df4d49b465
+
+2016-07-04 13:54 +0000 [2c16a81dd5]  Alexei Gradinari <alex2grad at gmail.com>
+
+	* res_pjsip: Added "subscribe_context" to endpoint
+
+	  If specified, incoming SUBSCRIBE requests will be searched for the matching
+	  extension in the indicated context. If no "subscribe_context" is specified,
+	  then the "context" setting is used.
+
+	  ASTERISK-25471 #close
+
+	  Change-Id: I3fb7a15f5bc154079bd348c08b7ad1cdd2d5e514
+
+2016-07-04 05:58 +0000 [a1bd57884d]  Alexander Traud <pabstraud at compuserve.com>
+
+	* BuildSystem: Avoid obsolete warning with libcurl.m4 on autoconf.
+
+	  Updated the macro-set autoconf/libcurl.m4 to its latest upstream version. This
+	  avoids a warning about an obsolete macro on AC_HELP_STRING, because Asterisk is
+	  using AS_HELP_STRING everywhere else already.
+
+	  ASTERISK-26046
+
+	  Change-Id: I8299faf504ceaeee3e39930c59293809e116c631
+
+2016-06-30 15:17 +0000 [640fbbbe28]  Richard Mudgett <rmudgett at digium.com>
+
+	* features: Fix channel datastore access.
+
+	  Found as a result of the testsuite tests/callparking test crashing.
+
+	  Several calls to ast_get_chan_featuremap_config() and
+	  ast_get_chan_features_xfer_config() did not lock the channel before
+	  calling so the channel's datastore list was accessed without the lock's
+	  protection.  Apparently another thread deleted a datastore on the
+	  channel's list while the crashing thread was walking the list.  Crash at
+	  0xdeaddead due to MALLOC_DEBUG's memory filler value as a result.
+
+	  * Add missing channel locks to calls that were not already protected
+	  as the doxygen for those calls indicates.
+
+	  Change-Id: Id273b3d305cc616406c353cbc841b2b7655efaa1
+
+2016-06-22 17:26 +0000 [359134c8d3]  Richard Mudgett <rmudgett at digium.com>
+
+	* res_pjsip_session.c: Don't send extra BYE if SDP invalid.
+
+	  When an answer SDP is invalid we were disconnecting the outgoing call and
+	  sending two BYE requests.  The first BYE was sent by PJPROJECT because of
+	  the invalid SDP answer.  The second BYE was sent by Asterisk because it
+	  thought the canceled call was the result of the RFC5407 section 3.1.2 race
+	  condition.
+
+	  * Made not send the BYE on a canceled session if the SDP negotiation is
+	  incomplete because PJPROJECT has already sent a BYE for the failed
+	  negotiation.
+
+	  ASTERISK-25772 #close
+	  Reported by:  Dmitriy Serov
+
+	  Change-Id: I44ad0bd0605e8eeb7035c890d6f97a1331f1a836
+
+2016-06-27 17:19 +0000 [5fabcf2ca1]  Richard Mudgett <rmudgett at digium.com>
+
+	* res_pjsip_session.c: End call on initial invalid SDP negotiation.
+
+	  When an incoming call defers SDP negotiation and then sends us an invalid
+	  SDP in the ACK, we need to send a BYE to disconnect the call.  In this
+	  case SDP negotiation has failed and we don't have valid media streams
+	  negotiated.
+
+	  ASTERISK-25772
+
+	  Change-Id: Ia358516b0fc1e6c4c139b78246f10b9da7a2dfb8
+
+2016-06-23 15:13 +0000 [38a4e983dc]  Richard Mudgett <rmudgett at digium.com>
+
+	* res_pjsip.c: Register PJMEDIA error code decoder.
+
+	  Registering the PJMEDIA error codes allows errors found when parsing an
+	  incoming SDP to be easier to figure out.
+
+	  "Missing SDP rtpmap for dynamic payload type (PJMEDIA_SDP_EMISSINGRTPMAP)"
+	  is much easier to understand than "Unknown error 220030".
+
+	  ASTERISK-25772
+
+	  Change-Id: I44b2dcea656fedd7593171be9e845880a2c70ca0
+
+2016-06-27 16:56 +0000 [1952434df5]  Richard Mudgett <rmudgett at digium.com>
+
+	* res_pjsip_session.c: Remove unused parameter from handle_incoming().
+
+	  Change-Id: Iedd182d189ec947c42edc2c66c4bda3c22060daa
+
+2016-06-22 18:02 +0000 [28928ba5c4]  Richard Mudgett <rmudgett at digium.com>
+
+	* res_pjsip: Add missing NULL checks when using pjsip_inv_end_session().
+
+	  pjsip_inv_end_session() is documented as being able to return the
+	  passed in tdata parameter set to NULL on success.
+
+	  Change-Id: I09d53725c49b7183c41bfa1be3ff225f3a8d3047
+
+2016-06-30 08:25 +0000 [43a78100c0]  gtjoseph <gjoseph at digium.com>
 
 	* configure:  Fix HAVE_PJSIP_EVSUB_GRP_LOCK not set with external pjproject
 
@@ -134,7 +1162,34 @@
 
 	  Change-Id: I709af70428e125fb5ccd44b171d25dd29141f0ae
 
-2016-06-28 09:00 +0000 [1529e62f42]  gtjoseph <gjoseph at digium.com>
+2016-06-29 15:31 +0000 [99eff80e76]  Matt Jordan <mjordan at digium.com>
+
+	* hep.conf.sample: Default 'enabled' to 'no'
+
+	  Following the principle of least surprise, we should not be sending
+	  massive numbers of PJSIP and RTCP HEP packets out into the ether to some
+	  only-slightly-random IP address. Having 'enabled' set to 'no' in the
+	  sample configuration file should prevent this from happening for those
+	  who run 'make samples'.
+
+	  ASTERISK-26159 #close
+
+	  Change-Id: I1753a64ca83a3442a6ebdc31061f8185c062d9b1
+
+2016-06-29 15:09 +0000 [78960975f2]  Matt Jordan <mjordan at digium.com>
+
+	* pjproject/patches/config_site: Increase the max number of ICE candidates
+
+	  When negotiating ICE candidates with WebRTC capable endpoints, many
+	  networks will result in a browser offering ICE candidates that exceeds
+	  the default number of max candidates, 16. This patch bumps the max
+	  candidates to 32, with the max checks at twice the number of candidates.
+	  In practice, this has shown to be sufficient for browser/WebRTC
+	  negotiation.
+
+	  Change-Id: Ifd8da8b315f5ae14814d4ce20e10d2e6355020e5
+
+2016-06-28 09:00 +0000 [d07c8a0504]  gtjoseph <gjoseph at digium.com>
 
 	* codecs:  Fix ABI incompatibility created by adding format_name to ast_codec
 
@@ -151,6 +1206,77 @@
 
 	  Change-Id: I6df1b08f6a6ae089db23adfe1ebc8636330265ba
 
+2016-06-28 08:22 +0000 [f3d236ca7f]  gtjoseph <gjoseph at digium.com>
+
+	* BuildSystem:  Fix a few issues hightlighted by gcc 6.x
+
+	  gcc 6.1.1 caught a few more issues.
+	  Made sure the unit tests still pass for the func_env and stdtime
+	  issues.
+
+	  ASTERISK-26157 #close
+
+	  Change-Id: I6664d8f34a45bc1481d2a854481c7878b0c1cf8e
+
+2016-06-28 10:33 +0000 [9d5b0934d9]  Matt Jordan <mjordan at digium.com>
+
+	* configs/basic-pbx/modules.conf: Remove 'bad' modules
+
+	  This patch removes the following modules:
+	   - pbx_functions: It never existed.
+	   - res_pjsip_log_forwarder: It no longer exists.
+	   - res_hep_pjsip: The base HEP module wasn't loaded, and most basic PBXs
+	                    aren't going to be installing HOMER
+	   - res_pjsip_phoneprov_provider: The basic res_phoneprov module isn't
+	                    loaded, and we aren't configured to make use of the
+	                    module
+
+	  Change-Id: Id91f68cae7c9c8c3d370029fe1268cb51e4ff5a5
+
+2016-06-22 11:19 +0000 [1dfc286418]  Joshua Colp <jcolp at digium.com>
+
+	* siren: Add format attribute modules for Siren7 and Siren14.
+
+	  This change removes hardcoded SDP parsing and generation for
+	  Siren7 and Siren14 from chan_sip and moves it to format attribute
+	  modules so it can also be used by chan_pjsip.
+
+	  With this the fmtp lines for both are added with the bitrate
+	  information.
+
+	  ASTERISK-26021
+
+	  Change-Id: Ibb004eda37a14c0a35ef0613f6237977fc800037
+
+2016-06-23 04:33 +0000 [5f0a098243]  Alexander Traud <pabstraud at compuserve.com>
+
+	* BuildSystem: Avoid obsolete warning with AC_TYPE_SIGNAL on autoconf.
+
+	  Removed the obsolete macro AC_TYPE_SIGNAL because Asterisk does not use K&R C
+	  but requires ANSI C anyway.
+
+	  ASTERISK-26046
+
+	  Change-Id: I914c014385e1862102d90fe7650621def78db02e
+
+2016-06-02 17:26 +0000 [b3c787d1dd]  Alexei Gradinari <alex2grad at gmail.com>
+
+	* res_pjsip: improve realtime performance #2
+
+	  The patch removes updating all Endpoints' status on startup.
+	  Instead, only non-qualified aors with static contact
+	  and non-qualified non-expired contacts are retrieved from the realtime to
+	  update the endpoint status to ONLINE.
+	  The endpoint name was added to the contact object to simply find the endpoint
+	  that created this contact.
+
+	  The status of endpoints with qualified aors will be updated by 'qualify'
+	  functions.
+
+	  ASTERISK-26061 #close
+
+	  Change-Id: Id324c1776fa55d3741e0c5457ecac0304cb1a0df
+
 2016-06-23 13:47 +0000  Asterisk Development Team <asteriskteam at digium.com>
 
 	* asterisk 13.10.0-rc1 Released.
diff --git a/Makefile b/Makefile
index 20b7787..6385fac 100644
--- a/Makefile
+++ b/Makefile
@@ -492,7 +492,7 @@ doc/core-en_US.xml: makeopts .lastclean $(XML_core_en_US)
 	@printf "Building Documentation For: "
 	@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
 	@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
-	@echo "<?xml-stylesheet type=\"text/xsl\" href=\"appdocsxml.xslt\"?>" > $@
+	@echo "<?xml-stylesheet type=\"text/xsl\" href=\"appdocsxml.xslt\"?>" >> $@
 	@echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
 	@for x in $(MOD_SUBDIRS); do \
 		printf "$$x " ; \
@@ -516,7 +516,7 @@ else
 	@printf "Building Documentation For: "
 	@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
 	@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
-	@echo "<?xml-stylesheet type=\"text/xsl\" href=\"appdocsxml.xslt\"?>" > $@
+	@echo "<?xml-stylesheet type=\"text/xsl\" href=\"appdocsxml.xslt\"?>" >> $@
 	@echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
 	@for x in $(MOD_SUBDIRS); do \
 		printf "$$x " ; \
@@ -825,7 +825,7 @@ install-logrotate:
 	rm -f contrib/scripts/asterisk.logrotate.tmp
 
 config:
-	if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
+	@if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
 		./build_tools/install_subst contrib/init.d/rc.redhat.asterisk  "$(DESTDIR)/etc/rc.d/init.d/asterisk"; \
 		if [ ! -f "$(DESTDIR)/etc/sysconfig/asterisk" ] ; then \
 			$(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 3d22f98..1c1dd3b 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2337,10 +2337,17 @@ static void pending_members_remove(struct member *mem)
 */
 static void update_status(struct call_queue *q, struct member *m, const int status)
 {
-	m->status = status;
-
-	/* Whatever the status is clear the member from the pending members pool */
-	pending_members_remove(m);
+	if (m->status != status) {
+		m->status = status;
+
+		/* Remove the member from the pending members pool only when the status changes.
+		 * This is not done unconditionally because we can occasionally see multiple
+		 * device state notifications of not in use after a previous call has ended,
+		 * including after we have initiated a new call. This is more likely to
+		 * happen when there is latency in the connection to the member.
+		 */
+		pending_members_remove(m);
+	}
 
 	queue_publish_member_blob(queue_member_status_type(), queue_member_blob_create(q, m));
 }
@@ -4070,6 +4077,17 @@ static void hangupcalls(struct queue_ent *qe, struct callattempt *outgoing, stru
 				ast_channel_hangupcause_set(outgoing->chan, AST_CAUSE_ANSWERED_ELSEWHERE);
 			}
 			ast_channel_publish_dial(qe->chan, outgoing->chan, outgoing->interface, "CANCEL");
+
+			/* When dialing channels it is possible that they may not ever
+			 * leave the not in use state (Local channels in particular) by
+			 * the time we cancel them. If this occurs but we know they were
+			 * dialed we explicitly remove them from the pending members
+			 * container so that subsequent call attempts occur.
+			 */
+			if (outgoing->member->status == AST_DEVICE_NOT_INUSE) {
+				pending_members_remove(outgoing->member);
+			}
+
 			ast_hangup(outgoing->chan);
 		}
 		oo = outgoing;
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index e88d706..321e5c9 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -12228,6 +12228,7 @@ static int append_mailbox(const char *context, const char *box, const char *data
 	return 0;
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(test_voicemail_vmuser)
 {
 	int res = 0;
@@ -12415,6 +12416,7 @@ AST_TEST_DEFINE(test_voicemail_vmuser)
 	free_user(vmu);
 	return res ? AST_TEST_FAIL : AST_TEST_PASS;
 }
+#endif
 
 static int vm_box_exists(struct ast_channel *chan, const char *data) 
 {
diff --git a/asterisk-13.10.0-summary.html b/asterisk-13.10.0-summary.html
deleted file mode 100644
index 4036cfa..0000000
--- a/asterisk-13.10.0-summary.html
+++ /dev/null
@@ -1,488 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><title>Release Summary - asterisk-13.10.0</title><h1 align="center"><a name="top">Release Summary</a></h1><h3 align="center">asterisk-13.10.0</h3><h3 align="center">Date: 2016-07-21</h3><h3 align="center"><asteriskteam at digium.com></h3><hr><h2 align="center">Table of Contents</h2><ol>
-<li><a href="#summary">Summary</a></li>
-<li><a href="#contributors">Contributors</a></li>
-<li><a href="#closed_issues">Closed Issues</a></li>
-<li><a href="#open_issues">Open Issues</a></li>
-<li><a href="#commits">Other Changes</a></li>
-<li><a href="#diffstat">Diffstat</a></li>
-</ol><hr><a name="summary"><h2 align="center">Summary</h2></a><center><a href="#top">[Back to Top]</a></center><p>This release is a point release of an existing major version. The changes included were made to address problems that have been identified in this release series, or are minor, backwards compatible new features or improvements. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous version a [...]
-<tr><th width="33%">Coders</th><th width="33%">Testers</th><th width="33%">Reporters</th></tr>
-<tr valign="top"><td width="33%">33 Richard Mudgett <rmudgett at digium.com><br/>23 Mark Michelson <mmichelson at digium.com><br/>20 George Joseph <gjoseph at digium.com><br/>17 Alexei Gradinari <alex2grad at gmail.com><br/>13 Joshua Colp <jcolp at digium.com><br/>8 Alexander Traud <pabstraud at compuserve.com><br/>7 Kevin Harwell <kharwell at digium.com><br/>6 Tzafrir Cohen <tzafrir.cohen at xorcom.com><br/>5 Matt Jordan <mjordan at digium.com><br/>2 Corey Farrell <git at cfware.com><br/>2 gtjoseph <george.joseph at fa [...]
-</table><hr><a name="closed_issues"><h2 align="center">Closed Issues</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p><h3>Improvement</h3><h4>Category: Channels/chan_pjsip</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25835">ASTERISK-25835</a>: Authentication using 'Username' field from Digest<br/>Reported by: Ross Beer<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=38bed4515dc9fbb3bdf3a4fdb957bad3d3bd9cea">[38bed4515d]</a> gtjoseph -- res_pjsip:  Add ability to identify by Authorization username</li>
-</ul><br><h4>Category: Core/Sorcery</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26088">ASTERISK-26088</a>: Investigate heavy memory utilization by res_pjsip_pubsub<br/>Reported by: Richard Mudgett<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9c35f34301c15d1370623d6f8a59a25a723b59b6">[9c35f34301]</a> Richard Mudgett -- res_pjsip_registrar.c: Eliminate rx REGISTER request race condition.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=557333ea4c031d10bf52ceade79c32cbff801c0c">[557333ea4c]</a> Richard Mudgett -- stasis: Add setting subscription congestion levels.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=110d7724675a496dd1c338e296e0c26d96156c3e">[110d772467]</a> Richard Mudgett -- sorcery: Add setting object type congestion levels.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=610eee2a36d2d2426947784a230c31dca6b18c62">[610eee2a36]</a> Richard Mudgett -- taskprocessors: Implement high/low water mark alerts.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=26e34922469102ceb3ae93025b6b13c15fa19e8f">[26e3492246]</a> Richard Mudgett -- res_pjsip_session: Use distributor serializer for incoming calls.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ceb1007ed7b201059aafd4b8dcde8c5dd62e803d">[ceb1007ed7]</a> Richard Mudgett -- res_pjsip_pubsub.c: Recreate subscriptions using distributor serializer.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=27bafc3a8b7981051fa07ef01b9a6afe4ef37f8c">[27bafc3a8b]</a> Richard Mudgett -- res_pjsip_pubsub.c: Use distributor serializer for incoming subscriptions.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=16b08444dae47eded183f63300908b49cf6b2c1a">[16b08444da]</a> Richard Mudgett -- pjsip_distributor.c: Consistently pick a serializer for messages.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=993b769524b5e39aa5749a64e0389f01427235ee">[993b769524]</a> Richard Mudgett -- pjsip_distributor.c: Ignore messages until fully booted.</li>
-</ul><br><h4>Category: Core/Stasis</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26088">ASTERISK-26088</a>: Investigate heavy memory utilization by res_pjsip_pubsub<br/>Reported by: Richard Mudgett<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9c35f34301c15d1370623d6f8a59a25a723b59b6">[9c35f34301]</a> Richard Mudgett -- res_pjsip_registrar.c: Eliminate rx REGISTER request race condition.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=557333ea4c031d10bf52ceade79c32cbff801c0c">[557333ea4c]</a> Richard Mudgett -- stasis: Add setting subscription congestion levels.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=110d7724675a496dd1c338e296e0c26d96156c3e">[110d772467]</a> Richard Mudgett -- sorcery: Add setting object type congestion levels.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=610eee2a36d2d2426947784a230c31dca6b18c62">[610eee2a36]</a> Richard Mudgett -- taskprocessors: Implement high/low water mark alerts.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=26e34922469102ceb3ae93025b6b13c15fa19e8f">[26e3492246]</a> Richard Mudgett -- res_pjsip_session: Use distributor serializer for incoming calls.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ceb1007ed7b201059aafd4b8dcde8c5dd62e803d">[ceb1007ed7]</a> Richard Mudgett -- res_pjsip_pubsub.c: Recreate subscriptions using distributor serializer.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=27bafc3a8b7981051fa07ef01b9a6afe4ef37f8c">[27bafc3a8b]</a> Richard Mudgett -- res_pjsip_pubsub.c: Use distributor serializer for incoming subscriptions.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=16b08444dae47eded183f63300908b49cf6b2c1a">[16b08444da]</a> Richard Mudgett -- pjsip_distributor.c: Consistently pick a serializer for messages.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=993b769524b5e39aa5749a64e0389f01427235ee">[993b769524]</a> Richard Mudgett -- pjsip_distributor.c: Ignore messages until fully booted.</li>
-</ul><br><h4>Category: Resources/res_pjsip</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26088">ASTERISK-26088</a>: Investigate heavy memory utilization by res_pjsip_pubsub<br/>Reported by: Richard Mudgett<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9c35f34301c15d1370623d6f8a59a25a723b59b6">[9c35f34301]</a> Richard Mudgett -- res_pjsip_registrar.c: Eliminate rx REGISTER request race condition.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=557333ea4c031d10bf52ceade79c32cbff801c0c">[557333ea4c]</a> Richard Mudgett -- stasis: Add setting subscription congestion levels.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=110d7724675a496dd1c338e296e0c26d96156c3e">[110d772467]</a> Richard Mudgett -- sorcery: Add setting object type congestion levels.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=610eee2a36d2d2426947784a230c31dca6b18c62">[610eee2a36]</a> Richard Mudgett -- taskprocessors: Implement high/low water mark alerts.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=26e34922469102ceb3ae93025b6b13c15fa19e8f">[26e3492246]</a> Richard Mudgett -- res_pjsip_session: Use distributor serializer for incoming calls.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ceb1007ed7b201059aafd4b8dcde8c5dd62e803d">[ceb1007ed7]</a> Richard Mudgett -- res_pjsip_pubsub.c: Recreate subscriptions using distributor serializer.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=27bafc3a8b7981051fa07ef01b9a6afe4ef37f8c">[27bafc3a8b]</a> Richard Mudgett -- res_pjsip_pubsub.c: Use distributor serializer for incoming subscriptions.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=16b08444dae47eded183f63300908b49cf6b2c1a">[16b08444da]</a> Richard Mudgett -- pjsip_distributor.c: Consistently pick a serializer for messages.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=993b769524b5e39aa5749a64e0389f01427235ee">[993b769524]</a> Richard Mudgett -- pjsip_distributor.c: Ignore messages until fully booted.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26011">ASTERISK-26011</a>: [patch]PJSIP: add "via_addr", "via_port", "call_id" to contacts<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=230686f4ec82a774e2a41aaa5e86909fd589f9b4">[230686f4ec]</a> Alexei Gradinari -- res_pjsip: add "via_addr", "via_port", "call_id" to contact</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25994">ASTERISK-25994</a>: [patch]res_pjsip: module load priority<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=72eb7c8301b046fb10dfb9afd9f145f72889b921">[72eb7c8301]</a> Alexei Gradinari -- res_pjsip: module load priority</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25931">ASTERISK-25931</a>: PJSIP: add "reg_server" to contacts.<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=fe38d21c2a2bbb3a3e9c157c39cdb46e1925737e">[fe38d21c2a]</a> Alexei Gradinari -- pjsip: Added "reg_server" to contacts (fixed alembic)</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=3cb8934de0db468d600beddd3464b44d33759cdc">[3cb8934de0]</a> Alexei Gradinari -- pjsip: Added "reg_server" to contacts.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25930">ASTERISK-25930</a>: PJSIP: disable multi domain to improve realtime performace<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=df3639700a7d7e6a9a2dd67fde74e14b4bb46a37">[df3639700a]</a> Alexei Gradinari -- res_pjsip: disable multi domain to improve realtime performace</li>
-</ul><br><h4>Category: Resources/res_pjsip_pubsub</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26088">ASTERISK-26088</a>: Investigate heavy memory utilization by res_pjsip_pubsub<br/>Reported by: Richard Mudgett<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9c35f34301c15d1370623d6f8a59a25a723b59b6">[9c35f34301]</a> Richard Mudgett -- res_pjsip_registrar.c: Eliminate rx REGISTER request race condition.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=557333ea4c031d10bf52ceade79c32cbff801c0c">[557333ea4c]</a> Richard Mudgett -- stasis: Add setting subscription congestion levels.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=110d7724675a496dd1c338e296e0c26d96156c3e">[110d772467]</a> Richard Mudgett -- sorcery: Add setting object type congestion levels.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=610eee2a36d2d2426947784a230c31dca6b18c62">[610eee2a36]</a> Richard Mudgett -- taskprocessors: Implement high/low water mark alerts.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=26e34922469102ceb3ae93025b6b13c15fa19e8f">[26e3492246]</a> Richard Mudgett -- res_pjsip_session: Use distributor serializer for incoming calls.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ceb1007ed7b201059aafd4b8dcde8c5dd62e803d">[ceb1007ed7]</a> Richard Mudgett -- res_pjsip_pubsub.c: Recreate subscriptions using distributor serializer.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=27bafc3a8b7981051fa07ef01b9a6afe4ef37f8c">[27bafc3a8b]</a> Richard Mudgett -- res_pjsip_pubsub.c: Use distributor serializer for incoming subscriptions.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=16b08444dae47eded183f63300908b49cf6b2c1a">[16b08444da]</a> Richard Mudgett -- pjsip_distributor.c: Consistently pick a serializer for messages.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=993b769524b5e39aa5749a64e0389f01427235ee">[993b769524]</a> Richard Mudgett -- pjsip_distributor.c: Ignore messages until fully booted.</li>
-</ul><br><h4>Category: Resources/res_pjsip_registrar</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26088">ASTERISK-26088</a>: Investigate heavy memory utilization by res_pjsip_pubsub<br/>Reported by: Richard Mudgett<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9c35f34301c15d1370623d6f8a59a25a723b59b6">[9c35f34301]</a> Richard Mudgett -- res_pjsip_registrar.c: Eliminate rx REGISTER request race condition.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=557333ea4c031d10bf52ceade79c32cbff801c0c">[557333ea4c]</a> Richard Mudgett -- stasis: Add setting subscription congestion levels.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=110d7724675a496dd1c338e296e0c26d96156c3e">[110d772467]</a> Richard Mudgett -- sorcery: Add setting object type congestion levels.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=610eee2a36d2d2426947784a230c31dca6b18c62">[610eee2a36]</a> Richard Mudgett -- taskprocessors: Implement high/low water mark alerts.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=26e34922469102ceb3ae93025b6b13c15fa19e8f">[26e3492246]</a> Richard Mudgett -- res_pjsip_session: Use distributor serializer for incoming calls.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ceb1007ed7b201059aafd4b8dcde8c5dd62e803d">[ceb1007ed7]</a> Richard Mudgett -- res_pjsip_pubsub.c: Recreate subscriptions using distributor serializer.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=27bafc3a8b7981051fa07ef01b9a6afe4ef37f8c">[27bafc3a8b]</a> Richard Mudgett -- res_pjsip_pubsub.c: Use distributor serializer for incoming subscriptions.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=16b08444dae47eded183f63300908b49cf6b2c1a">[16b08444da]</a> Richard Mudgett -- pjsip_distributor.c: Consistently pick a serializer for messages.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=993b769524b5e39aa5749a64e0389f01427235ee">[993b769524]</a> Richard Mudgett -- pjsip_distributor.c: Ignore messages until fully booted.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26011">ASTERISK-26011</a>: [patch]PJSIP: add "via_addr", "via_port", "call_id" to contacts<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=230686f4ec82a774e2a41aaa5e86909fd589f9b4">[230686f4ec]</a> Alexei Gradinari -- res_pjsip: add "via_addr", "via_port", "call_id" to contact</li>
-</ul><br><h3>Bug</h3><h4>Category: Applications/app_followme</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26008">ASTERISK-26008</a>: app_followme does not delete recorded name prompt<br/>Reported by: Tzafrir Cohen<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=eec539a46e63bcaa222405d6e45e1d674061dd1f">[eec539a46e]</a> Tzafrir Cohen -- followme: delete the right recorded name file</li>
-</ul><br><h4>Category: Applications/app_queue</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-16115">ASTERISK-16115</a>: [patch] problem with ringinuse=no, queue members receive sometimes two calls<br/>Reported by: nik600<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=6959f5484b3077c6cced3477dda6fe04cfb86cb9">[6959f5484b]</a> Joshua Colp -- app_queue: Fix crash when unloading module.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=c345e530f4401c06d1f87a938cff3a12de84e048">[c345e530f4]</a> Kevin Harwell -- app_queue: queue members can receive multiple calls</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25954">ASTERISK-25954</a>: Manager QueueSummary and QueueStatus Actions are case sensitive to QueueName<br/>Reported by: Javier Acosta<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=c0688a6398f27296ff849848a2e416e036d794e3">[c0688a6398]</a> Javier Acosta -- Fix case sensitive actions in AMI QueueSummary and QueueStatus</li>
-</ul><br><h4>Category: Applications/app_voicemail</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26045">ASTERISK-26045</a>: [patch]app_voicemail: fix bugs, imap mm_status log change to debug<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=c1512f4108c7b455494dfa7779bf7fe671e0e4e6">[c1512f4108]</a> Richard Mudgett -- app_voicemail.c: Fix IMAP compile error.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=859bbec09b24541b7a789adc5b815bf4406c2eb6">[859bbec09b]</a> Alexei Gradinari -- app_voicemail: fix bugs, imap mm_status log change to debug</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-24463">ASTERISK-24463</a>: Voicemail email address corrupt or not sent when message is in the process of being recorded during reload<br/>Reported by: John Campbell<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=8028fc758597f9d9233c97c4be0e229d8af7e3ab">[8028fc7585]</a> Andrew Nagy -- app_voicemail: always copy dynamic struct to avoid race condition</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25917">ASTERISK-25917</a>: [patch]app_voicemail: passwordlocation=spooldir only works if you manually add secret.conf yourself<br/>Reported by: Jonathan R. Rose<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=b38f1146e54f295c89727de4fde150ed731d5b64">[b38f1146e5]</a> gtjoseph -- config:  Fix ast_config_text_file_save2 writability check for missing files</li>
-</ul><br><h4>Category: Applications/app_voicemail/IMAP</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26045">ASTERISK-26045</a>: [patch]app_voicemail: fix bugs, imap mm_status log change to debug<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=c1512f4108c7b455494dfa7779bf7fe671e0e4e6">[c1512f4108]</a> Richard Mudgett -- app_voicemail.c: Fix IMAP compile error.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=859bbec09b24541b7a789adc5b815bf4406c2eb6">[859bbec09b]</a> Alexei Gradinari -- app_voicemail: fix bugs, imap mm_status log change to debug</li>
-</ul><br><h4>Category: CDR/cdr_custom</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26054">ASTERISK-26054</a>: Asterisk crashes (core dump)<br/>Reported by: B. Davis<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=321a9b128fdc8dd59ea720fd50691a3a32c0d934">[321a9b128f]</a> Joshua Colp -- res_odbc: Implement a connection pool.</li>
-</ul><br><h4>Category: CEL/General</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25262">ASTERISK-25262</a>: Memory leak when a caller channel does multiple dials and CEL is enabled<br/>Reported by: Etienne Lessard<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=caf6cccc5c75c310f0eedbd5b01b5d6751681e0d">[caf6cccc5c]</a> Joshua Colp -- cel: Ensure only one dial status per channel exists.</li>
-</ul><br><h4>Category: Channels/chan_pjsip</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26063">ASTERISK-26063</a>: ${PJSIP_HEADER(read,Call-ID)} does not work - documentation needs clarification for when read/write is possible<br/>Reported by: Private Name<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=37d039fdf31b89a315ca2d76ea23a3ce1a8151ec">[37d039fdf3]</a> Rusty Newton -- res_pjsip: Add clarifying documentation to PJSIP_HEADER help text</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-24986">ASTERISK-24986</a>: keepalive INFO packages ignored by asterisk<br/>Reported by: Ilya Trikoz<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=39fedfa4235da9f2d5de63bafae0521d7591ac8e">[39fedfa423]</a> snuffy -- res_pjsip_empty_info: Respond to empty SIP INFO packets</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26005">ASTERISK-26005</a>: res_pjsip: Multiple SIP messages are combined into 1 TCP packet<br/>Reported by: Ross Beer<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=b6f9392a122a905ebf1925c8b00ababa8ad04125">[b6f9392a12]</a> gtjoseph -- res_pjsip:  Set TCP_NODELAY on TCP transports</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25990">ASTERISK-25990</a>: PJSIP TLS registration should respect client_uri scheme when generating Contact URI<br/>Reported by: Sebastian Damm<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=a94a12bbf73c7e643a77e4aa0597e4e49eb5b7ab">[a94a12bbf7]</a> Sebastian Damm -- res_pjsip_outbound_registration: generate correct Contact URI for TLS</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25826">ASTERISK-25826</a>: PJSIP / Sorcery slow load from realtime<br/>Reported by: Ross Beer<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9c2032240e4974fc4b6212f411c86c7d673006e3">[9c2032240e]</a> Alexei Gradinari -- res_pjsip: improve realtime performance</li>
-</ul><br><h4>Category: Channels/chan_sip/General</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26069">ASTERISK-26069</a>: Asterisk truncates To: header, dropping the closing '>'<br/>Reported by: Vasil Kolev<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=89cc86fc383664f91cfd0d4463c1d9de3131f794">[89cc86fc38]</a> Vasil Kolev -- chan_sip: bigger buffers for headers, better failure mode</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25950">ASTERISK-25950</a>: [patch]SIP channel does not send PeerStatus events for autocreated peers<br/>Reported by: Kirill Katsnelson<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=29bab0d1a4d6bbcdbf27fcff49b2e2262f65460e">[29bab0d1a4]</a> Kirill Katsnelson -- chan_sip: Make autocreated peers send PeerStatus events</li>
-</ul><br><h4>Category: Channels/chan_sip/Interoperability</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26030">ASTERISK-26030</a>: call cut because of double Session-Expires header in re-invite after proxy authentication is required<br/>Reported by: George Joseph<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=77e8ec162b4625b144fae18203d2ac67a4f7a4eb">[77e8ec162b]</a> gtjoseph -- chan_sip:  Prevent extra Session-Expires headers from being added</li>
-</ul><br><h4>Category: Channels/chan_sip/Registration</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25950">ASTERISK-25950</a>: [patch]SIP channel does not send PeerStatus events for autocreated peers<br/>Reported by: Kirill Katsnelson<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=29bab0d1a4d6bbcdbf27fcff49b2e2262f65460e">[29bab0d1a4]</a> Kirill Katsnelson -- chan_sip: Make autocreated peers send PeerStatus events</li>
-</ul><br><h4>Category: Channels/chan_skinny</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26029">ASTERISK-26029</a>: parking: ast_parking_park_call should return parking_space instead of parking_exten<br/>Reported by: Diederik de Groot<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9453d1187ab1258166ae2fd8185ffb7b6e2c4575">[9453d1187a]</a> Richard Mudgett -- parking.h: Update ast_parking_park_call() doxygen to reality.</li>
-</ul><br><h4>Category: Channels/chan_unistim</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26138">ASTERISK-26138</a>: chan_unistim:  Under FreeBSD, chan_unistim generates a compile error<br/>Reported by: George Joseph<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=bc69b033167c0fe6f2cfb71e39aaa2c73d60fa32">[bc69b03316]</a> gtjoseph -- chan_unistim:  Fix memcpy in get_to_address</li>
-</ul><br><h4>Category: Codecs/General</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26144">ASTERISK-26144</a>: Crash on loading codecs g729/g723<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=1529e62f421fadddca75b1d2547743da39af1db8">[1529e62f42]</a> gtjoseph -- codecs:  Fix ABI incompatibility created by adding format_name to ast_codec</li>
-</ul><br><h4>Category: Contrib/General</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26128">ASTERISK-26128</a>: Alembic scripts are failing<br/>Reported by: Mark Michelson<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=1b79e2deff58dbf3f98791da1715aa4a696b028c">[1b79e2deff]</a> Mark Michelson -- Fix Alembic upgrades.</li>
-</ul><br><h4>Category: Core/BuildSystem</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26046">ASTERISK-26046</a>: [patch] Avoid obsolete warnings on autoconf.<br/>Reported by: Alexander Traud<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=e30602587cea1f2398c82874f964b85f27de9b8d">[e30602587c]</a> Alexander Traud -- BuildSystem: Avoid obsolete warning with AC_FUNC_SETVBUF_REVERSED on autoconf.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=cbfa9f771e0756a4c8f76b68d65a936af2a55ace">[cbfa9f771e]</a> Alexander Traud -- BuildSystem: Avoid obsolete warning with HELP_STRING on autoconf.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26091">ASTERISK-26091</a>: [patch] ar cru creates warning, instead use ar cr<br/>Reported by: Alexander Traud<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=d38b8e6399094805ad551f149ba6916ba80d7a6b">[d38b8e6399]</a> Alexander Traud -- BuildSystem: Avoid 'ar cru' and use 'ar cr' instead.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26038">ASTERISK-26038</a>: 'make install' doesn't seem to install OS/X init files<br/>Reported by: Tzafrir Cohen<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=a32616d60c380733da01c04008b84bc82086698d">[a32616d60c]</a> Tzafrir Cohen -- Makefile: remove OSARCH check for init install</li>
-</ul><br><h4>Category: Core/Configuration</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25956">ASTERISK-25956</a>: Compilation error in conditionally compiled code in config_options.c<br/>Reported by: Chris Trobridge<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=dd00c71aae12ddfb8af9ca5fab41b1badd50ca5a">[dd00c71aae]</a> Chris Trobridge -- config_options.c: Expand #ifdef to contain whole if statement.</li>
-</ul><br><h4>Category: Core/FileFormatInterface</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25998">ASTERISK-25998</a>: file: Crash when using nativeformats<br/>Reported by: Joshua Colp<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=fa11f4c920226da3677a4e7ff95649994036462f">[fa11f4c920]</a> Joshua Colp -- file: Ensure nativeformats remains valid for lifetime of use.</li>
-</ul><br><h4>Category: Core/General</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26119">ASTERISK-26119</a>: [patch] fix: memory leaks, resource leaks, out of bounds and bugs<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=5134a8043a81b5b3d0b70ae3fbf7564f2526469a">[5134a8043a]</a> Alexei Gradinari -- fix: memory leaks, resource leaks, out of bounds and bugs</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26097">ASTERISK-26097</a>: [patch] CLI: show maximum file descriptors<br/>Reported by: Alexander Traud<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ca38a3cbb48a27160d764459123053f930a2bec6">[ca38a3cbb4]</a> Alexander Traud -- core: Not the configured but granted number of possible file descriptors.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=0d84421f9315a974de821dd5ce99ce2c8728d3a2">[0d84421f93]</a> Alexander Traud -- astfd: Not maximum size of a single file but maximum file descriptors.</li>
-</ul><br><h4>Category: Core/HTTP</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26126">ASTERISK-26126</a>: [patch] leverage 'bindaddr' for TLS in http.conf<br/>Reported by: Alexander Traud<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=76516bd79d7d9c8cf51b2359c2741db29d5bc54f">[76516bd79d]</a> Alexander Traud -- http: leverage 'bindaddr' for TLS in http.conf</li>
-</ul><br><h4>Category: Core/Logging</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26078">ASTERISK-26078</a>: core: Memory leak in logging<br/>Reported by: Etienne Lessard<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=e2132dd3588b10538f7c67a92aa26b9b4a5bf1b5">[e2132dd358]</a> Richard Mudgett -- logging,cdr,cel: Fix stringfield memory leak.</li>
-</ul><br><h4>Category: Core/Sorcery</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26014">ASTERISK-26014</a>: res_sorcery_astdb: Make tolerant of unknown fields<br/>Reported by: Joshua Colp<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ddcf983e392c6eeeb925109961697992f341e5d5">[ddcf983e39]</a> Joshua Colp -- res_sorcery_astdb: Filter fields to only the registered ones.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25826">ASTERISK-25826</a>: PJSIP / Sorcery slow load from realtime<br/>Reported by: Ross Beer<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9c2032240e4974fc4b6212f411c86c7d673006e3">[9c2032240e]</a> Alexei Gradinari -- res_pjsip: improve realtime performance</li>
-</ul><br><h4>Category: Core/UDPTL</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26034">ASTERISK-26034</a>: T.38 passthrough problem behind firewall due to early nosignal packet<br/>Reported by: George Joseph<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=935e0496c4b10604c100005cb3ebff594380486b">[935e0496c4]</a> gtjoseph -- udptl:  Don't eat sequence numbers until OK is received</li>
-</ul><br><h4>Category: Features/Parking</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26029">ASTERISK-26029</a>: parking: ast_parking_park_call should return parking_space instead of parking_exten<br/>Reported by: Diederik de Groot<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9453d1187ab1258166ae2fd8185ffb7b6e2c4575">[9453d1187a]</a> Richard Mudgett -- parking.h: Update ast_parking_park_call() doxygen to reality.</li>
-</ul><br><h4>Category: Functions/func_curl</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25669">ASTERISK-25669</a>: [patch]CURL incorrect trim for non ASCII characters<br/>Reported by: Jesper<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9ddaab789eb1ac5afc440ab751ad1b2288ce35e0">[9ddaab789e]</a> Jesper -- func_curl: Don't trim response text on non-ASCII characters</li>
-</ul><br><h4>Category: Functions/func_odbc</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26177">ASTERISK-26177</a>: func_odbc: Database handle is kept when it should be released<br/>Reported by: Leandro Dardini<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=21b5d56f398a4a3918cb77cae3bb29a61dcd926f">[21b5d56f39]</a> Joshua Colp -- func_odbc: Fix connection deadlock.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25938">ASTERISK-25938</a>: res_odbc: MySQL/MariaDB statement LAST_INSERT_ID() always returns zero.<br/>Reported by: Edwin Vandamme<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=cd89501d48b516ef03957bd39cdd8180b4684a56">[cd89501d48]</a> Alexei Gradinari -- func_odbc: single database connection should be optional</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25963">ASTERISK-25963</a>: func_odbc requires reconnect checks for stale connections<br/>Reported by: Ross Beer<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=677d5b515151b51ed8be5e760ce0c7b99dae2761">[677d5b5151]</a> Mark Michelson -- func_odbc: Check connection status before executing queries.</li>
-</ul><br><h4>Category: Functions/func_strings</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25669">ASTERISK-25669</a>: [patch]CURL incorrect trim for non ASCII characters<br/>Reported by: Jesper<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9ddaab789eb1ac5afc440ab751ad1b2288ce35e0">[9ddaab789e]</a> Jesper -- func_curl: Don't trim response text on non-ASCII characters</li>
-</ul><br><h4>Category: Resources/res_ari</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25941">ASTERISK-25941</a>: chan_pjsip: Crash on an immediate SIP final response<br/>Reported by: Javier Riveros <ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=c0b190dd9ab71904b0e0e8492edfdbd6e538e9e1">[c0b190dd9a]</a> Mark Michelson -- res_pjsip: Match dialogs on responses better.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25964">ASTERISK-25964</a>: Outbound registrations created via ARI/push configuration do not clean up outbound registrations currently in flight<br/>Reported by: Matt Jordan<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=3f6ef63099d58d0aa74895156e8038eb44180ea8">[3f6ef63099]</a> gtjoseph -- res_pjsip_outbound_registration:  Clean up state when registration is deleted</li>
-</ul><br><h4>Category: Resources/res_ari_channels</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26070">ASTERISK-26070</a>: ari/channels:  Creating a local channel without an originator adds all audio formats to it's capabilities<br/>Reported by: George Joseph<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=c27c2320574902117b1c2e66f210640eb606a736">[c27c232057]</a> gtjoseph -- ari/resource_channels:  Add 'formats' to channel create/originate</li>
-</ul><br><h4>Category: Resources/res_fax</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26141">ASTERISK-26141</a>: res_fax: fax_v21_session_new leaks reference to v21_details<br/>Reported by: Corey Farrell<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=3d904659ec3aa23565aa54690961048be7ec7f4c">[3d904659ec]</a> Corey Farrell -- res_fax: Fix reference leak in fax_v21_session_new.</li>
-</ul><br><h4>Category: Resources/res_hep</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26096">ASTERISK-26096</a>: res_hep: Crash when configuration file is missing<br/>Reported by: Niklas Larsson<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=eabb398d71772ee47c81220faba2781d4f4fbf2a">[eabb398d71]</a> Matt Jordan -- res_hep_{pjsip|rtcp}: Decline module loads if res_hep had not loaded</li>
-</ul><br><h4>Category: Resources/res_hep_rtcp</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25352">ASTERISK-25352</a>: res_hep_rtcp correlation_id is different then res_hep<br/>Reported by: Kevin Scott Adams<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=89ae4466eacc6ae2bef56b2e10000046be7ae2c0">[89ae4466ea]</a> Matt Jordan -- res_hep: Provide an option to pick the UUID type</li>
-</ul><br><h4>Category: Resources/res_odbc</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26074">ASTERISK-26074</a>: res_odbc: Deadlock within UnixODBC<br/>Reported by: Ross Beer<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=321a9b128fdc8dd59ea720fd50691a3a32c0d934">[321a9b128f]</a> Joshua Colp -- res_odbc: Implement a connection pool.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25938">ASTERISK-25938</a>: res_odbc: MySQL/MariaDB statement LAST_INSERT_ID() always returns zero.<br/>Reported by: Edwin Vandamme<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=cd89501d48b516ef03957bd39cdd8180b4684a56">[cd89501d48]</a> Alexei Gradinari -- func_odbc: single database connection should be optional</li>
-</ul><br><h4>Category: Resources/res_phoneprov</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26119">ASTERISK-26119</a>: [patch] fix: memory leaks, resource leaks, out of bounds and bugs<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=5134a8043a81b5b3d0b70ae3fbf7564f2526469a">[5134a8043a]</a> Alexei Gradinari -- fix: memory leaks, resource leaks, out of bounds and bugs</li>
-</ul><br><h4>Category: Resources/res_pjsip</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26160">ASTERISK-26160</a>: pjsip: Updated->Reachable during qualify<br/>Reported by: Matt Jordan<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=25a42c176fa613228b5953ebe7718ad915da4f2d">[25a42c176f]</a> Richard Mudgett -- res_pjsip: Fix statsd regression.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25941">ASTERISK-25941</a>: chan_pjsip: Crash on an immediate SIP final response<br/>Reported by: Javier Riveros <ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=c0b190dd9ab71904b0e0e8492edfdbd6e538e9e1">[c0b190dd9a]</a> Mark Michelson -- res_pjsip: Match dialogs on responses better.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26007">ASTERISK-26007</a>: res_pjsip: Endpoints deleting early after upgrade from 13.8.2 to 13.9<br/>Reported by: Greg Siemon<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=02d30e171e439b52b0914ea87e427e175f371ad7">[02d30e171e]</a> Mark Michelson -- Use doubles instead of floats for conversions when comparing strings.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26004">ASTERISK-26004</a>: res_pjsip:  The transport/method parameter is ignored<br/>Reported by: George Joseph<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=fb6227a37289e51931574ba33dd836e10ea5e5c7">[fb6227a372]</a> gtjoseph -- config_transport:  Tell pjproject to allow all SSL/TLS protocols</li>
-</ul><br><h4>Category: Resources/res_pjsip_mwi</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26065">ASTERISK-26065</a>: chan_pjsip: MWI NOTIFY contents not ordered properly<br/>Reported by: Ross Beer<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=fe305ccf01003e9484098ee5e8319e847a1cecc7">[fe305ccf01]</a> gtjoseph -- res_pjsip_mwi_body_generator:  Re-order the body items</li>
-</ul><br><h4>Category: Resources/res_pjsip_mwi_body_generator</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26065">ASTERISK-26065</a>: chan_pjsip: MWI NOTIFY contents not ordered properly<br/>Reported by: Ross Beer<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=fe305ccf01003e9484098ee5e8319e847a1cecc7">[fe305ccf01]</a> gtjoseph -- res_pjsip_mwi_body_generator:  Re-order the body items</li>
-</ul><br><h4>Category: Resources/res_pjsip_outbound_registration</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25964">ASTERISK-25964</a>: Outbound registrations created via ARI/push configuration do not clean up outbound registrations currently in flight<br/>Reported by: Matt Jordan<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=3f6ef63099d58d0aa74895156e8038eb44180ea8">[3f6ef63099]</a> gtjoseph -- res_pjsip_outbound_registration:  Clean up state when registration is deleted</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25990">ASTERISK-25990</a>: PJSIP TLS registration should respect client_uri scheme when generating Contact URI<br/>Reported by: Sebastian Damm<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=a94a12bbf73c7e643a77e4aa0597e4e49eb5b7ab">[a94a12bbf7]</a> Sebastian Damm -- res_pjsip_outbound_registration: generate correct Contact URI for TLS</li>
-</ul><br><h4>Category: Resources/res_pjsip_pubsub</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26099">ASTERISK-26099</a>: res_pjsip_pubsub: Crash when sending request due to server timeout<br/>Reported by: Ross Beer<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=78dcdd3010566ea136e1572e9c52be8b18f406a2">[78dcdd3010]</a> gtjoseph -- configure:  Fix HAVE_PJSIP_EVSUB_GRP_LOCK not set with external pjproject</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=6a568bcc665714376d077b562ee819d864b2e520">[6a568bcc66]</a> gtjoseph -- res_pjsip_pubsub: Address SEGV when attempting to terminate a subscription</li>
-</ul><br><h4>Category: Resources/res_pjsip_sdp_rtp</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26119">ASTERISK-26119</a>: [patch] fix: memory leaks, resource leaks, out of bounds and bugs<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=5134a8043a81b5b3d0b70ae3fbf7564f2526469a">[5134a8043a]</a> Alexei Gradinari -- fix: memory leaks, resource leaks, out of bounds and bugs</li>
-</ul><br><h4>Category: Resources/res_pjsip_session</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26127">ASTERISK-26127</a>: res_pjsip_session: Crash due to race condition between res_pjsip_session unload and timer<br/>Reported by: Joshua Colp<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ba0d9e7f7af620e27ce3b09062c28a7f8fcc4557">[ba0d9e7f7a]</a> Joshua Colp -- res_pjsip_session: Handle race condition at shutdown with timer.</li>
-</ul><br><h4>Category: Resources/res_rtp_asterisk</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26140">ASTERISK-26140</a>: res_rtp_asterisk: gcc 6 caught a self-comparison<br/>Reported by: George Joseph<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=48db4c215924f2881f6eef79ae120f6a3166ad63">[48db4c2159]</a> gtjoseph -- res_rtp_asterisk:  Fix a self-comparison identified by gcc 6</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26130">ASTERISK-26130</a>: [patch] WebRTC: Should use latest DTLS version.<br/>Reported by: Alexander Traud<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ef97911a1c0f380d17df3b92c9b5805dd3dbd6b5">[ef97911a1c]</a> Alexander Traud -- res_rtp_asterisk: Use latest DTLS version available by underlying platform.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26092">ASTERISK-26092</a>: [Segfault] in res_rtp_asterisk.c:4268 after Remotely bridged channels<br/>Reported by: Niklas Larsson<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=715ef071a1d27d550ddc3f83d9ff569381b8fddc">[715ef071a1]</a> Mark Michelson -- chan_pjsip: Lock channel when checking for RTP changes.</li>
-</ul><br><h4>Category: Resources/res_srtp</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-24436">ASTERISK-24436</a>: Missing header in res/res_srtp.c when compiling against libsrtp-1.5.0<br/>Reported by: Patrick Laimbock<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=c6ee4a0f44f7f5d8e3c77f63f3c56694584e28e9">[c6ee4a0f44]</a> Alexander Traud -- res_srtp: Instead of libSRTP use OpenSSL as random source.</li>
-</ul><br><h4>Category: Resources/res_stasis_playback</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26083">ASTERISK-26083</a>: ARI: Announcer channels staying around after playback to a bridge is finished<br/>Reported by: Per Jensen<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=cfebe3b94a8e80db054a899e76c19607f103a48c">[cfebe3b94a]</a> Mark Michelson -- ARI: Ensure announcer channels are destroyed.</li>
-</ul><br><h4>Category: Tests/General</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26139">ASTERISK-26139</a>: test_res_pjsip_scheduler:  Compile failure if pjproject isn't installed in a system location<br/>Reported by: George Joseph<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=77da168e58df6f030ceec4f80b27438cef0ba079">[77da168e58]</a> gtjoseph -- test_res_pjsip_scheduler: Add 'depends' on pjproject in MODULEINFO</li>
-</ul><br><h4>Category: Tests/testsuite</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25961">ASTERISK-25961</a>: tests/channels/SIP/sip_tls_call: Sporadic crash when running test<br/>Reported by: Joshua Colp<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=949bf6b282e09cb7104a5cc55a3be3d33873db0f">[949bf6b282]</a> Joshua Colp -- chan_sip: Give more time for TCP/TLS threads to stop.</li>
-</ul><br><h4>Category: pjproject/pjsip</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26089">ASTERISK-26089</a>: Invalid security events during boot using PJSIP Realtime<br/>Reported by: Scott Griepentrog<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=993b769524b5e39aa5749a64e0389f01427235ee">[993b769524]</a> Richard Mudgett -- pjsip_distributor.c: Ignore messages until fully booted.</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25993">ASTERISK-25993</a>: pjproject: Allow bundling to not require everything it does<br/>Reported by: Joshua Colp<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=2a7130b8b09358744a7b75f17285b5d4ea01d650">[2a7130b8b0]</a> gtjoseph -- pjproject_bundled:  Check for python-dev and TEST_FRAMEWORK</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25968">ASTERISK-25968</a>: pjproject_bundled:  Configure and make need to be re-tested<br/>Reported by: George Joseph<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=f39089f17cc3df6f795914d664c5ddbe41027498">[f39089f17c]</a> gtjoseph -- pjproject_bundled:  Various fixes discovered during testing of OSes</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25970">ASTERISK-25970</a>: Segfault in pjsip_url_compare<br/>Reported by: Dmitriy Serov<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=719ece5659e166df7006d2fd3afdb83235022052">[719ece5659]</a> gtjoseph -- pjproject_bundled:  Disable PJSIP_UNESCAPE_IN_PLACE</li>
-</ul><br><h3>New Feature</h3><h4>Category: Core/ManagerInterface/NewFeature</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25904">ASTERISK-25904</a>: PJSIP: add contact.updated event<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=25a42c176fa613228b5953ebe7718ad915da4f2d">[25a42c176f]</a> Richard Mudgett -- res_pjsip: Fix statsd regression.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=e6eb17efd95ab42b4437666587ec292117565656">[e6eb17efd9]</a> Alexei Gradinari -- stasis_endpoints: Add new Status and Headers to ContactStatus</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=7a14e669f073d6845ce4c13e8537b87fa4f3b042">[7a14e669f0]</a> Alexei Gradinari -- res_pjsip/AMI: add contact.updated event</li>
-</ul><br><h4>Category: Resources/res_pjsip</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25904">ASTERISK-25904</a>: PJSIP: add contact.updated event<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=25a42c176fa613228b5953ebe7718ad915da4f2d">[25a42c176f]</a> Richard Mudgett -- res_pjsip: Fix statsd regression.</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=e6eb17efd95ab42b4437666587ec292117565656">[e6eb17efd9]</a> Alexei Gradinari -- stasis_endpoints: Add new Status and Headers to ContactStatus</li>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=7a14e669f073d6845ce4c13e8537b87fa4f3b042">[7a14e669f0]</a> Alexei Gradinari -- res_pjsip/AMI: add contact.updated event</li>
-</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25900">ASTERISK-25900</a>: PJSIP Endpoint IP Access Controls<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=524a30297468dc2bb7627f0dd589bd9e7368c744">[524a302974]</a> Alexei Gradinari -- res_pjsip: Endpoint IP Access Controls</li>
-</ul><br><hr><a name="open_issues"><h2 align="center">Open Issues</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a list of all open issues from the issue tracker that were referenced by changes that went into this release.</p><h3>New Feature</h3><h4>Category: Applications/app_confbridge</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25989">ASTERISK-25989</a>: apps/confbridge: add regcontext feature<br/>Reported by: Jaco Kroon<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=2db17a793ca85ebef7ba36671272fad48e047e66">[2db17a793c]</a> Jaco Kroon -- app_confbridge: Add a regcontext option for confbridge bridge profiles.</li>
-</ul><br><h4>Category: Core/ManagerInterface/NewFeature</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25903">ASTERISK-25903</a>: PJSIP AMI Event ContactStatus: add Useragent and RegExpire<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=e6eb17efd95ab42b4437666587ec292117565656">[e6eb17efd9]</a> Alexei Gradinari -- stasis_endpoints: Add new Status and Headers to ContactStatus</li>
-</ul><br><h4>Category: Resources/res_pjsip</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25903">ASTERISK-25903</a>: PJSIP AMI Event ContactStatus: add Useragent and RegExpire<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=e6eb17efd95ab42b4437666587ec292117565656">[e6eb17efd9]</a> Alexei Gradinari -- stasis_endpoints: Add new Status and Headers to ContactStatus</li>
-</ul><br><h3>Bug</h3><h4>Category: Core/Logging</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25538">ASTERISK-25538</a>: [patch]Missing PID in syslog logger messages<br/>Reported by: Javier Acosta<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=36d66a23e0afce16c89382ea9cbf5b60afd331f2">[36d66a23e0]</a> Alexei Gradinari -- logger: Add PID to syslog messages.</li>
-</ul><br><h4>Category: Resources/res_fax</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25982">ASTERISK-25982</a>: [patch]res_fax/t38_gateway: Peer V.21 session is created on wrong channel<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=2d17fe06c55eedb2c0429af5f13d0589cf1866d0">[2d17fe06c5]</a> Alexei Gradinari -- res_fax/t38_gateway: Peer V.21 session is created on wrong channel</li>
-</ul><br><h4>Category: Resources/res_rtp_asterisk</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26129">ASTERISK-26129</a>: res_rtp_asterisk: Memory leak of CERT bio in DTLS implementation<br/>Reported by: Torrey Searle<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=dfcd466bf03104c570c501af1571654370e50de7">[dfcd466bf0]</a> Torrey Searle -- res_rtp_asterisk: fix memory leak in dtls</li>
-</ul><br><h3>Improvement</h3><h4>Category: Applications/app_dial</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26059">ASTERISK-26059</a>: [patch]core: New channel variable FORWARDERNAME<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=2de58c6d01a3ef1d6b31167833731eefcf844f0a">[2de58c6d01]</a> Alexei Gradinari -- core/dial: New channel variable FORWARDERNAME</li>
-</ul><br><h4>Category: Core/Bridging</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26059">ASTERISK-26059</a>: [patch]core: New channel variable FORWARDERNAME<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=2de58c6d01a3ef1d6b31167833731eefcf844f0a">[2de58c6d01]</a> Alexei Gradinari -- core/dial: New channel variable FORWARDERNAME</li>
-</ul><br><h4>Category: Core/Channels</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26059">ASTERISK-26059</a>: [patch]core: New channel variable FORWARDERNAME<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=2de58c6d01a3ef1d6b31167833731eefcf844f0a">[2de58c6d01]</a> Alexei Gradinari -- core/dial: New channel variable FORWARDERNAME</li>
-</ul><br><h4>Category: Functions/func_odbc</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26010">ASTERISK-26010</a>: [patch]func_odbc: single database connection should be optional<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=cd89501d48b516ef03957bd39cdd8180b4684a56">[cd89501d48]</a> Alexei Gradinari -- func_odbc: single database connection should be optional</li>
-</ul><br><h4>Category: Resources/res_fax</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-25980">ASTERISK-25980</a>: [patch]res_fax: set FAXMODE variable to let dialplan know what fax transport was used<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=06d4ac0355d99ce7a6caacf2e52a22078233e9c4">[06d4ac0355]</a> Alexei Gradinari -- res_fax: add FAXMODE variable</li>
-</ul><br><h4>Category: Resources/res_pjsip</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26055">ASTERISK-26055</a>: [patch]res_pjsip: chatty verbose messages<br/>Reported by: Alexei Gradinari<ul>
-<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=04c12561a7c7a10f416081520a72a22248a72cd4">[04c12561a7]</a> Alexei Gradinari -- res_pjsip: chatty verbose messages</li>
-</ul><br><hr><a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a list of all changes that went into this release that did not reference a JIRA issue.</p><table width="100%" border="1">
-<tr><th>Revision</th><th>Author</th><th>Summary</th></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=b0a2ca913300ad1888a95ff2669ff6ef4fb3f2f7">b0a2ca9133</a></td><td>Joshua Colp</td><td>Release summaries: Remove previous versions</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=734a7de6ff76ea7d0b6a00960f99615d0a3ae245">734a7de6ff</a></td><td>Joshua Colp</td><td>.version: Update for 13.10.0</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=cf223d2cadc45a19d9523a4a41d13d5f214d123c">cf223d2cad</a></td><td>Joshua Colp</td><td>.lastclean: Update for 13.10.0</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=07af28131f0d3cee5716e740a81057b3dac3ff2e">07af28131f</a></td><td>Joshua Colp</td><td>realtime: Add database scripts for 13.10.0</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=af1421588249c5e0e0340c518fdd66b96a61cdff">af14215882</a></td><td>Mark Michelson</td><td>ChangeLog: Updated for 13.10.0-rc3</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=d456aa0519773859963aa720c858b183d20bcd43">d456aa0519</a></td><td>Mark Michelson</td><td>Release summaries: Add summaries for 13.10.0-rc3</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=b3df380e56307fe16410b17e71dd0be65a5642f1">b3df380e56</a></td><td>Mark Michelson</td><td>Release summaries: Remove previous versions</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ac5a6c8cadb1b8d69f78ec21b772d5a75f832c32">ac5a6c8cad</a></td><td>Mark Michelson</td><td>.version: Update for 13.10.0-rc3</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=d3c10e5de31622c71e14f24e280fb2d369325281">d3c10e5de3</a></td><td>Mark Michelson</td><td>.lastclean: Update for 13.10.0-rc3</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=305a6dbc85ba86ff8122637d15ba29f854b6d4d4">305a6dbc85</a></td><td>Mark Michelson</td><td>realtime: Add database scripts for 13.10.0-rc3</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9a8b4251b8b8833085b68853b472c501fb885c4a">9a8b4251b8</a></td><td>Mark Michelson</td><td>ChangeLog: Updated for 13.10.0-rc2</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=d579dce1473ded011786ed658f854ea60d020de1">d579dce147</a></td><td>Mark Michelson</td><td>Release summaries: Add summaries for 13.10.0-rc2</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=486fbce3d50282943ac828a9c9c905333f665043">486fbce3d5</a></td><td>Mark Michelson</td><td>Release summaries: Remove previous versions</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=fb6bd302918e9bffc5a8f31d7039992dd9d9de3d">fb6bd30291</a></td><td>Mark Michelson</td><td>.version: Update for 13.10.0-rc2</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=f6bd754584af685aba54f128884550e5036f75b4">f6bd754584</a></td><td>Mark Michelson</td><td>.lastclean: Update for 13.10.0-rc2</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=40cd52de7edeafc78ba651e792e714c83cf39c6d">40cd52de7e</a></td><td>Mark Michelson</td><td>realtime: Add database scripts for 13.10.0-rc2</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=3c4b64351bc44b26fdfbb9101501ad8e485c9e11">3c4b64351b</a></td><td>Mark Michelson</td><td>ChangeLog: Updated for 13.10.0-rc1</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=62349ac1b475d9d18ee61246645a5f9fe493a28f">62349ac1b4</a></td><td>Mark Michelson</td><td>Release summaries: Add summaries for 13.10.0-rc1</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=8da6ba4328a32a5aa7a8e6955c76089eb54be4eb">8da6ba4328</a></td><td>Mark Michelson</td><td>.version: Update for 13.10.0-rc1</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=170b85e3aeb8dde1f9daada437ccf5643184788c">170b85e3ae</a></td><td>Mark Michelson</td><td>.lastclean: Update for 13.10.0-rc1</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=4af7049b8f4b303acf1b94c487f9ec172511babf">4af7049b8f</a></td><td>Mark Michelson</td><td>realtime: Add database scripts for 13.10.0-rc1</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=c982da0641f7cc43b9014fb47423ac7066ba4bdb">c982da0641</a></td><td>Richard Mudgett</td><td>res_pjproject.c: Replace inlined DEBUG_ATLEAST() with macro.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=d53a36ff335e8a2176712f759266e4870bfe4f10">d53a36ff33</a></td><td>Richard Mudgett</td><td>res_pjsip_transport_management.c: Misc cleanups to survive shutdown.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=03953d80346b3561305606f8509ab3ea2fa962a1">03953d8034</a></td><td>Richard Mudgett</td><td>res_pjsip.c: Add check that timer actually got scheduled.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=32ab98116e7e43674cb9f639876cdbbb5cf86f4b">32ab98116e</a></td><td>Richard Mudgett</td><td>res_rtp_multicast.c: Fix warning message typo.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=0429c5336845e08c3f3a1279da34d958eff14391">0429c53368</a></td><td>Richard Mudgett</td><td>res_pjsip_session.c: Reorganize ast_sip_session_terminate().</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=5823f279f32244bef2f6389dbe5022c2f73e4685">5823f279f3</a></td><td>Richard Mudgett</td><td>chan_rtp: Backport changes from master.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=dde58df3182b7f99714e446a684d8ddb81f759bb">dde58df318</a></td><td>Richard Mudgett</td><td>chan_rtp.c: Copy file from chan_multicast_rtp.c</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=a99ddc6a0d2b9075c2cc436a6770c8ac889f5286">a99ddc6a0d</a></td><td>gtjoseph</td><td>build:  Fix ast_sockaddr initialization to be more portable</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9c5a0b814b9fa6f7348cb7fbfdd0bc1204e72b77">9c5a0b814b</a></td><td>Timo Teräs</td><td>Fix #include poll.h and sys/cdefs.h</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=cda33854091eabf243dee228b92da3fcaa5bb5e3">cda3385409</a></td><td>Joshua Colp</td><td>alembic: Fix migration.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=b2ce0e354b780d373b2243fa23df02efec540b7f">b2ce0e354b</a></td><td>Richard Mudgett</td><td>pjsip_distributor.c: Use correct rdata info access method (Part 2).</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=e8abfdcdc5ce4d32d1fe281e75b13fd652f9e5f7">e8abfdcdc5</a></td><td>gtjoseph</td><td>pjproject_bundled:  Move to pjproject 2.5</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=03d5b3ce5c8403b790fcae53c938625ae5dd10f8">03d5b3ce5c</a></td><td>Richard Mudgett</td><td>pjsip_distributor.c: Use correct rdata info access method.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=361a16f3160506b1d5f32c9bdd10fd31cfc4e81f">361a16f316</a></td><td>Matt Jordan</td><td>configs/samples/pjsip.conf.sample: Fix typo</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=f91a7dc99350f8be610e303e8cbd0d263eda4d7d">f91a7dc993</a></td><td>Matt Jordan</td><td>res/res_hep_pjsip: Fix reported local IP address when bound to 'any'</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9de5cd209e5918d27d03afaaddb41125d7a76701">9de5cd209e</a></td><td>Sean Bright</td><td>res_ari: Correct Location headers returned by some ARI resources</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=a73d79c22f69d0c7a4a5cdbe7e92e3c8cd9dd0e7">a73d79c22f</a></td><td>Tzafrir Cohen</td><td>basic-cfg: asterisk.conf: remove [directories]</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=1c56de9453c67b54d023feed738ed7ec1c17a245">1c56de9453</a></td><td>Tzafrir Cohen</td><td>basic-cfg: asterisk.conf: defaults of options</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=d7af591c59ecda3856ae28a8cd442828be75ded8">d7af591c59</a></td><td>Tzafrir Cohen</td><td>basic-cfg: asterisk.conf: debug level 5 spams</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9b7db18fc1c6c6b740ad0240f0684e4ca002035c">9b7db18fc1</a></td><td>Tzafrir Cohen</td><td>basic-cfg: asterisk.conf: don't set languages</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=e2df15bae971794960fe61efee498b7bf00fe869">e2df15bae9</a></td><td>gtjoseph</td><td>pjsip_distributor:  Add missing newline to NOTICE</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=37214b0bdf52cf2f742349b22fae73742aeda091">37214b0bdf</a></td><td>Matt Jordan</td><td>configure: Fix errors with AST_UNDEFINED_SANITIZER/AST_LEAK_SANITIZER</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=49b25a095656dd6d41a75e4fcbbe9651946b1605">49b25a0956</a></td><td>Kevin Harwell</td><td>res_pjsip_outbound_publish: state potential dropped on reloads/realtime fetches</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=1b5c91b7be1020754ca724e488c9fb733dbce99d">1b5c91b7be</a></td><td>Kevin Harwell</td><td>res_pjsip_outbound_publish: Potential crash due to off nominal path</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=10de553c9d6922ebf3959b4fd7b50a2fad629eb1">10de553c9d</a></td><td>Kevin Harwell</td><td>res_pjsip_outbound_publishing: After unloading the library won't load again</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=1a833b97398c0f2479d3fd828b0a8152ff72cfb3">1a833b9739</a></td><td>Kevin Harwell</td><td>res_pjsip_outbound_publish: Ref leak in off nominal callback paths</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=4752ef02e02dfcb1b1ec38d154eb9bc42736df3c">4752ef02e0</a></td><td>Kevin Harwell</td><td>res_pjsip_outbound_publish: Won't unload if condition wait times out</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=a2f19d82a86590c58737f252e28b816f957686ff">a2f19d82a8</a></td><td>Diederik de Groot</td><td>configs/basic-pbx/asterisk.conf: contains incorrect path separator</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=7992923c709ee155fa4f792ca063ac24d7fdf817">7992923c70</a></td><td>Richard Mudgett</td><td>res_pjsip: Start body generator users after suppliers.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=5dc0e082b26896e8a6ae07927aa46c2cec75a7ed">5dc0e082b2</a></td><td>Richard Mudgett</td><td>res_pjsip_pubsub.c: Add useful information to some messages.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=f9e416f0538ee404906390e4b1c1a97cedf23075">f9e416f053</a></td><td>Richard Mudgett</td><td>res_pjsip_pubsub.c: Fix body generator registration race.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=b1b201904697e394e405ec8864e4c60383d1ffda">b1b2019046</a></td><td>Richard Mudgett</td><td>res_pjsip_pubsub.h: Fix doxygen association.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=b7f07fdff548b0dcc5aa2259d7c37d3c37555abd">b7f07fdff5</a></td><td>Richard Mudgett</td><td>res_pjsip_outbound_publish.c: Remove redundant flag check.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ebf0724a8355e060764f1f6a4b92abb071eb9af6">ebf0724a83</a></td><td>Richard Mudgett</td><td>test_message.c: Wait longer in case dialplan also processes the test message.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ba63aa7c9e01919d53588e0e35066db554613d53">ba63aa7c9e</a></td><td>Richard Mudgett</td><td>Manager: Short circuit AMI message processing.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=d5ee6acf28f67670b5afa1be0161280b33a5a9e9">d5ee6acf28</a></td><td>Richard Mudgett</td><td>manager.c: Eliminate most RAII_VAR usage.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=7303e3dc96a4b2d5f36bb03c7cf8880aaa9e0753">7303e3dc96</a></td><td>Richard Mudgett</td><td>manager_channels.c: Fix allocation failure crash.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=1e93f3d7232a2a087a190a18e4a3f490a41d42d1">1e93f3d723</a></td><td>Richard Mudgett</td><td>Bridge system: Fix memory leaks and double frees on impart failure.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=5e388d41888a1e1c4061003a4a090dbe797bca7a">5e388d4188</a></td><td>Richard Mudgett</td><td>bridge_softmix.c: Fix crash if channel fails to join mixing tech.</td></tr>
-<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9740277713fe308a3f6014a07180a52c3de08b58">9740277713</a></td><td>gtjoseph</td><td>res_pjsip:  Add serialized scheduler (res_pjsip/pjsip_scheduler.c)</td></tr>
-</table><hr><a name="diffstat"><h2 align="center">Diffstat Results</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p><pre>asterisk-13.9.0-summary.html                                                                    |  333 -
-asterisk-13.9.0-summary.txt                                                                     |  821 ---
-b/.version                                                                                      |    2
-b/CHANGES                                                                                       |  137
-b/ChangeLog                                                                                     | 2235 +++++++++-
-b/Makefile                                                                                      |  102
-b/addons/ooh323c/src/Makefile.in                                                                |    2
-b/apps/app_confbridge.c                                                                         |   15
-b/apps/app_dial.c                                                                               |    3
-b/apps/app_followme.c                                                                           |   17
-b/apps/app_queue.c                                                                              |  159
-b/apps/app_voicemail.c                                                                          |  328 +
-b/apps/confbridge/conf_chan_announce.c                                                          |    1
-b/apps/confbridge/conf_config_parser.c                                                          |   19
-b/apps/confbridge/include/confbridge.h                                                          |    1
-b/autoconf/ast_ext_lib.m4                                                                       |    2
-b/autoconf/ast_prog_ld.m4                                                                       |    2
-b/bridges/bridge_softmix.c                                                                      |   13
-b/cdr/cdr_custom.c                                                                              |    2
-b/cdr/cdr_syslog.c                                                                              |    2
-b/cel/cel_custom.c                                                                              |    2
-b/channels/chan_multicast_rtp.c                                                                 |    7
-b/channels/chan_pjsip.c                                                                         |    9
-b/channels/chan_rtp.c                                                                           |  415 +
-b/channels/chan_sip.c                                                                           |  100
-b/channels/chan_unistim.c                                                                       |    2
-b/configs/basic-pbx/asterisk.conf                                                               |   25
-b/configs/samples/confbridge.conf.sample                                                        |    2
-b/configs/samples/func_odbc.conf.sample                                                         |   14
-b/configs/samples/hep.conf.sample                                                               |    4
-b/configs/samples/pjsip.conf.sample                                                             |   45
-b/configs/samples/res_odbc.conf.sample                                                          |    5
-b/configure                                                                                     |  242 +
-b/configure.ac                                                                                  |   14
-b/contrib/ast-db-manage/config/versions/65eb22eb195_add_unidentified_request_options_to_.py     |   27
-b/contrib/ast-db-manage/config/versions/6d8c104e6184_res_pjsip_add_contact_via_addr_and_.py     |   25
-b/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py            |   23
-b/contrib/ast-db-manage/config/versions/837aa67461fb_add_pjsip_endpoint_ip_access_control_.py   |   32
-b/contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py    |   32
-b/contrib/ast-db-manage/config/versions/8d478ab86e29_pjsip_add_disable_multi_domain.py          |   31
-b/contrib/realtime/mssql/mssql_config.sql                                                       |  112
-b/contrib/realtime/mysql/mysql_config.sql                                                       |   58
-b/contrib/realtime/oracle/oracle_config.sql                                                     |  112
-b/contrib/realtime/postgresql/postgresql_config.sql                                             |   58
-b/contrib/scripts/install_prereq                                                                |   36
-b/funcs/func_odbc.c                                                                             |  231 -
-b/include/asterisk/astobj2.h                                                                    |  134
-b/include/asterisk/autoconfig.h.in                                                              |    6
-b/include/asterisk/bridge_technology.h                                                          |    3
-b/include/asterisk/compat.h                                                                     |    2
-b/include/asterisk/config_options.h                                                             |   22
-b/include/asterisk/features.h                                                                   |    9
-b/include/asterisk/multicast_rtp.h                                                              |   58
-b/include/asterisk/parking.h                                                                    |   11
-b/include/asterisk/poll-compat.h                                                                |    2
-b/include/asterisk/res_hep.h                                                                    |   22
-b/include/asterisk/res_odbc.h                                                                   |    5
-b/include/asterisk/res_pjsip.h                                                                  |  296 +
-b/include/asterisk/res_pjsip_pubsub.h                                                           |    4
-b/include/asterisk/res_pjsip_session.h                                                          |    3
-b/include/asterisk/sorcery.h                                                                    |   14
-b/include/asterisk/stasis.h                                                                     |   38
-b/include/asterisk/stasis_app.h                                                                 |    9
-b/include/asterisk/stasis_message_router.h                                                      |   14
-b/include/asterisk/strings.h                                                                    |    2
-b/include/asterisk/taskprocessor.h                                                              |   23
-b/main/Makefile                                                                                 |   12
-b/main/ast_expr2.c                                                                              |   10
-b/main/ast_expr2.y                                                                              |   10
-b/main/asterisk.c                                                                               |   16
-b/main/asterisk.exports.in                                                                      |    2
-b/main/astfd.c                                                                                  |    2
-b/main/bridge.c                                                                                 |   11
-b/main/bridge_channel.c                                                                         |    3
-b/main/cdr.c                                                                                    |    3
-b/main/cel.c                                                                                    |  111
-b/main/channel.c                                                                                |    3
-b/main/codec.c                                                                                  |   70
-b/main/codec_builtin.c                                                                          |   11
-b/main/config.c                                                                                 |   34
-b/main/config_options.c                                                                         |    7
-b/main/core_unreal.c                                                                            |    1
-b/main/dial.c                                                                                   |   14
-b/main/editline/Makefile.in                                                                     |    2
-b/main/features.c                                                                               |    1
-b/main/file.c                                                                                   |   24
-b/main/http.c                                                                                   |    2
-b/main/logger.c                                                                                 |    2
-b/main/manager.c                                                                                |  205
-b/main/manager_channels.c                                                                       |   24
-b/main/say.c                                                                                    |    4
-b/main/sorcery.c                                                                                |   21
-b/main/stasis.c                                                                                 |   12
-b/main/stasis_endpoints.c                                                                       |   13
-b/main/stasis_message.c                                                                         |   35
-b/main/stasis_message_router.c                                                                  |   12
-b/main/strings.c                                                                                |    6
-b/main/taskprocessor.c                                                                          |  172
-b/main/threadpool.c                                                                             |    4
-b/main/udptl.c                                                                                  |   12
-b/makeopts.in                                                                                   |    3
-b/res/ael/pval.c                                                                                |   70
-b/res/ari/resource_bridges.c                                                                    |   11
-b/res/ari/resource_channels.c                                                                   |   49
-b/res/ari/resource_channels.h                                                                   |    4
-b/res/res_ari.c                                                                                 |    3
-b/res/res_ari_channels.c                                                                        |   14
-b/res/res_fax.c                                                                                 |   51
-b/res/res_hep.c                                                                                 |   49
-b/res/res_hep.exports.in                                                                        |    2
-b/res/res_hep_pjsip.c                                                                           |   68
-b/res/res_hep_rtcp.c                                                                            |   37
-b/res/res_odbc.c                                                                                |  248 -
-b/res/res_phoneprov.c                                                                           |    5
-b/res/res_pjproject.c                                                                           |    7
-b/res/res_pjsip.c                                                                               |  199
-b/res/res_pjsip/config_global.c                                                                 |   77
-b/res/res_pjsip/config_transport.c                                                              |   10
-b/res/res_pjsip/include/res_pjsip_private.h                                                     |   19
-b/res/res_pjsip/location.c                                                                      |   29
-b/res/res_pjsip/pjsip_configuration.c                                                           |  190
-b/res/res_pjsip/pjsip_distributor.c                                                             |  676 ++-
-b/res/res_pjsip/pjsip_options.c                                                                 |  161
-b/res/res_pjsip/pjsip_scheduler.c                                                               |  495 ++
-b/res/res_pjsip_authenticator_digest.c                                                          |   28
-b/res/res_pjsip_dtmf_info.c                                                                     |    7
-b/res/res_pjsip_empty_info.c                                                                    |   89
-b/res/res_pjsip_endpoint_identifier_anonymous.c                                                 |   38
-b/res/res_pjsip_endpoint_identifier_ip.c                                                        |    2
-b/res/res_pjsip_endpoint_identifier_user.c                                                      |  145
-b/res/res_pjsip_exten_state.c                                                                   |    8
-b/res/res_pjsip_header_funcs.c                                                                  |    9
-b/res/res_pjsip_messaging.c                                                                     |   18
-b/res/res_pjsip_mwi.c                                                                           |   10
-b/res/res_pjsip_mwi_body_generator.c                                                            |    4
-b/res/res_pjsip_one_touch_record_info.c                                                         |    9
-b/res/res_pjsip_outbound_publish.c                                                              |  189
-b/res/res_pjsip_outbound_registration.c                                                         |   26
-b/res/res_pjsip_publish_asterisk.c                                                              |   10
-b/res/res_pjsip_pubsub.c                                                                        |  565 +-
-b/res/res_pjsip_registrar.c                                                                     |  468 --
-b/res/res_pjsip_sdp_rtp.c                                                                       |    2
-b/res/res_pjsip_session.c                                                                       |  109
-b/res/res_pjsip_transport_management.c                                                          |  100
-b/res/res_rtp_asterisk.c                                                                        |   17
-b/res/res_rtp_multicast.c                                                                       |  189
-b/res/res_rtp_multicast.exports.in                                                              |    6
-b/res/res_sorcery_astdb.c                                                                       |   60
-b/res/res_srtp.c                                                                                |    8
-b/res/res_stasis.c                                                                              |   16
-b/rest-api/api-docs/channels.json                                                               |   17
-b/tests/test_cel.c                                                                              |    2
-b/tests/test_channel_feature_hooks.c                                                            |   15
-b/tests/test_config.c                                                                           |   75
-b/tests/test_message.c                                                                          |    8
-b/tests/test_netsock2.c                                                                         |    6
-b/tests/test_res_pjsip_scheduler.c                                                              |  401 +
-b/third-party/pjproject/Makefile                                                                |   23
-b/third-party/pjproject/Makefile.rules                                                          |   11
-b/third-party/pjproject/apply_patches                                                           |    4
-b/third-party/pjproject/configure.m4                                                            |    7
-b/third-party/pjproject/patches/0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch |   73
-b/third-party/pjproject/patches/0001-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch |   48
-third-party/pjproject/patches/0001-2.4.5-fix-for-tls-async-ops.patch                            |  224 -
-third-party/pjproject/patches/0001-Bump-tcp-tls-and-transaction-log-levels-from-1-to-3.patch    |   70
-third-party/pjproject/patches/0001-ioqueue-Enable-epoll-in-aconfigure.ac.patch                  |   80
-third-party/pjproject/patches/0001-sip_parser.c-Fix-pjsip_VIA_PARAM_SPEC_ESC.patch              |   30
-third-party/pjproject/patches/0001-sip_parser.c-Remove-wholesale-strip-from-parse_param.patch   |   55
-third-party/pjproject/patches/0001-sip_transport-Search-for-transport-even-if-listener-.patch   |  114
-169 files changed, 9993 insertions(+), 3286 deletions(-)</pre><br></html>
\ No newline at end of file
diff --git a/asterisk-13.10.0-summary.txt b/asterisk-13.10.0-summary.txt
deleted file mode 100644
index 5135682..0000000
--- a/asterisk-13.10.0-summary.txt
+++ /dev/null
@@ -1,1217 +0,0 @@
-                                Release Summary
-
-                                asterisk-13.10.0
-
-                                Date: 2016-07-21
-
-                           <asteriskteam at digium.com>
-
-     ----------------------------------------------------------------------
-
-                               Table of Contents
-
-    1. Summary
-    2. Contributors
-    3. Closed Issues
-    4. Open Issues
-    5. Other Changes
-    6. Diffstat
-
-     ----------------------------------------------------------------------
-
-                                    Summary
-
-                                 [Back to Top]
-
-   This release is a point release of an existing major version. The changes
-   included were made to address problems that have been identified in this
-   release series, or are minor, backwards compatible new features or
-   improvements. Users should be able to safely upgrade to this version if
-   this release series is already in use. Users considering upgrading from a
-   previous version are strongly encouraged to review the UPGRADE.txt
-   document as well as the CHANGES document for information about upgrading
-   to this release series.
-
-   The data in this summary reflects changes that have been made since the
-   previous release, asterisk-13.9.0.
-
-     ----------------------------------------------------------------------
-
-                                  Contributors
-
-                                 [Back to Top]
-
-   This table lists the people who have submitted code, those that have
-   tested patches, as well as those that reported issues on the issue tracker
-   that were resolved in this release. For coders, the number is how many of
-   their patches (of any size) were committed into this release. For testers,
-   the number is the number of times their name was listed as assisting with
-   testing a patch. Finally, for reporters, the number is the number of
-   issues that they reported that were affected by commits that went into
-   this release.
-
-   Coders                Testers             Reporters                        
-   33 Richard Mudgett    1 Rusty Newton      18 Alexei Gradinari              
-   23 Mark Michelson     1 Etienne Lessard   9 Richard Mudgett                
-   20 George Joseph      1 Andrew Nagy       8 Ross Beer                      
-   17 Alexei Gradinari                       8 George Joseph                  
-   13 Joshua Colp                            7 Alexander Traud                
-   8 Alexander Traud                         6 Joshua Colp                    
-   7 Kevin Harwell                           2 nik600                         
-   6 Tzafrir Cohen                           2 Scott Griepentrog              
-   5 Matt Jordan                             2 Niklas Larsson                 
-   2 Corey Farrell                           2 Matt Jordan                    
-   2 gtjoseph                                2 Javier Acosta                  
-   1 Rusty Newton                            2 Etienne Lessard                
-   1 Jaco Kroon                              2 Tzafrir Cohen                  
-   1 Scott Griepentrog                       2 Mark Michelson                 
-   1 snuffy                                  1 John Campbell                  
-   1 Sean Bright                             1 Jaco Kroon                     
-   1 Vasil Kolev                             1 Javier Riveros                 
-   1 Chris Trobridge                         1 Edwin Vandamme                 
-   1 Diederik de Groot                       1 Private Name                   
-   1 Kirill Katsnelson                       1 Vasil Kolev                    
-   1 Timo TerACURs                           1 Ross Beer.                     
-   1 darkskiez                               1 Jesper                         
-   1 Jesper                                  1 Patrick Laimbock               
-   1 Sebastian Damm                          1 Corey Farrell                  
-   1 Andrew Nagy                             1 Leandro Dardini                
-   1 Torrey Searle                           1 Jonathan R. Rose               
-                                             1 Kevin Scott Adams              
-                                             1 Diederik de Groot              
-                                             1 Badalian Vyacheslav            
-                                             1 Ilya Trikoz, Federico Santulli 
-                                             1 Kirill Katsnelson              
-                                             1 Jonathan Rose                  
-                                             1 Chris Trobridge                
-                                             1 Sebastian Damm                 
-                                             1 Per Jensen                     
-                                             1 B. Davis                       
-                                             1 Ilya Trikoz                    
-                                             1 Dmitriy Serov                  
-                                             1 Greg Siemon                    
-                                             1 Torrey Searle                  
-
-     ----------------------------------------------------------------------
-
-                                 Closed Issues
-
-                                 [Back to Top]
-
-   This is a list of all issues from the issue tracker that were closed by
-   changes that went into this release.
-
-  Improvement
-
-    Category: Channels/chan_pjsip
-
-   ASTERISK-25835: Authentication using 'Username' field from Digest
-   Reported by: Ross Beer
-     * [38bed4515d] gtjoseph -- res_pjsip: Add ability to identify by
-       Authorization username
-
-    Category: Core/Sorcery
-
-   ASTERISK-26088: Investigate heavy memory utilization by res_pjsip_pubsub
-   Reported by: Richard Mudgett
-     * [9c35f34301] Richard Mudgett -- res_pjsip_registrar.c: Eliminate rx
-       REGISTER request race condition.
-     * [557333ea4c] Richard Mudgett -- stasis: Add setting subscription
-       congestion levels.
-     * [110d772467] Richard Mudgett -- sorcery: Add setting object type
-       congestion levels.
-     * [610eee2a36] Richard Mudgett -- taskprocessors: Implement high/low
-       water mark alerts.
-     * [26e3492246] Richard Mudgett -- res_pjsip_session: Use distributor
-       serializer for incoming calls.
-     * [ceb1007ed7] Richard Mudgett -- res_pjsip_pubsub.c: Recreate
-       subscriptions using distributor serializer.
-     * [27bafc3a8b] Richard Mudgett -- res_pjsip_pubsub.c: Use distributor
-       serializer for incoming subscriptions.
-     * [16b08444da] Richard Mudgett -- pjsip_distributor.c: Consistently pick
-       a serializer for messages.
-     * [993b769524] Richard Mudgett -- pjsip_distributor.c: Ignore messages
-       until fully booted.
-
-    Category: Core/Stasis
-
-   ASTERISK-26088: Investigate heavy memory utilization by res_pjsip_pubsub
-   Reported by: Richard Mudgett
-     * [9c35f34301] Richard Mudgett -- res_pjsip_registrar.c: Eliminate rx
-       REGISTER request race condition.
-     * [557333ea4c] Richard Mudgett -- stasis: Add setting subscription
-       congestion levels.
-     * [110d772467] Richard Mudgett -- sorcery: Add setting object type
-       congestion levels.
-     * [610eee2a36] Richard Mudgett -- taskprocessors: Implement high/low
-       water mark alerts.
-     * [26e3492246] Richard Mudgett -- res_pjsip_session: Use distributor
-       serializer for incoming calls.
-     * [ceb1007ed7] Richard Mudgett -- res_pjsip_pubsub.c: Recreate
-       subscriptions using distributor serializer.
-     * [27bafc3a8b] Richard Mudgett -- res_pjsip_pubsub.c: Use distributor
-       serializer for incoming subscriptions.
-     * [16b08444da] Richard Mudgett -- pjsip_distributor.c: Consistently pick
-       a serializer for messages.
-     * [993b769524] Richard Mudgett -- pjsip_distributor.c: Ignore messages
-       until fully booted.
-
-    Category: Resources/res_pjsip
-
-   ASTERISK-26088: Investigate heavy memory utilization by res_pjsip_pubsub
-   Reported by: Richard Mudgett
-     * [9c35f34301] Richard Mudgett -- res_pjsip_registrar.c: Eliminate rx
-       REGISTER request race condition.
-     * [557333ea4c] Richard Mudgett -- stasis: Add setting subscription
-       congestion levels.
-     * [110d772467] Richard Mudgett -- sorcery: Add setting object type
-       congestion levels.
-     * [610eee2a36] Richard Mudgett -- taskprocessors: Implement high/low
-       water mark alerts.
-     * [26e3492246] Richard Mudgett -- res_pjsip_session: Use distributor
-       serializer for incoming calls.
-     * [ceb1007ed7] Richard Mudgett -- res_pjsip_pubsub.c: Recreate
-       subscriptions using distributor serializer.
-     * [27bafc3a8b] Richard Mudgett -- res_pjsip_pubsub.c: Use distributor
-       serializer for incoming subscriptions.
-     * [16b08444da] Richard Mudgett -- pjsip_distributor.c: Consistently pick
-       a serializer for messages.
-     * [993b769524] Richard Mudgett -- pjsip_distributor.c: Ignore messages
-       until fully booted.
-   ASTERISK-26011: [patch]PJSIP: add "via_addr", "via_port", "call_id" to
-   contacts
-   Reported by: Alexei Gradinari
-     * [230686f4ec] Alexei Gradinari -- res_pjsip: add "via_addr",
-       "via_port", "call_id" to contact
-   ASTERISK-25994: [patch]res_pjsip: module load priority
-   Reported by: Alexei Gradinari
-     * [72eb7c8301] Alexei Gradinari -- res_pjsip: module load priority
-   ASTERISK-25931: PJSIP: add "reg_server" to contacts.
-   Reported by: Alexei Gradinari
-     * [fe38d21c2a] Alexei Gradinari -- pjsip: Added "reg_server" to contacts
-       (fixed alembic)
-     * [3cb8934de0] Alexei Gradinari -- pjsip: Added "reg_server" to
-       contacts.
-   ASTERISK-25930: PJSIP: disable multi domain to improve realtime performace
-   Reported by: Alexei Gradinari
-     * [df3639700a] Alexei Gradinari -- res_pjsip: disable multi domain to
-       improve realtime performace
-
-    Category: Resources/res_pjsip_pubsub
-
-   ASTERISK-26088: Investigate heavy memory utilization by res_pjsip_pubsub
-   Reported by: Richard Mudgett
-     * [9c35f34301] Richard Mudgett -- res_pjsip_registrar.c: Eliminate rx
-       REGISTER request race condition.
-     * [557333ea4c] Richard Mudgett -- stasis: Add setting subscription
-       congestion levels.
-     * [110d772467] Richard Mudgett -- sorcery: Add setting object type
-       congestion levels.
-     * [610eee2a36] Richard Mudgett -- taskprocessors: Implement high/low
-       water mark alerts.
-     * [26e3492246] Richard Mudgett -- res_pjsip_session: Use distributor
-       serializer for incoming calls.
-     * [ceb1007ed7] Richard Mudgett -- res_pjsip_pubsub.c: Recreate
-       subscriptions using distributor serializer.
-     * [27bafc3a8b] Richard Mudgett -- res_pjsip_pubsub.c: Use distributor
-       serializer for incoming subscriptions.
-     * [16b08444da] Richard Mudgett -- pjsip_distributor.c: Consistently pick
-       a serializer for messages.
-     * [993b769524] Richard Mudgett -- pjsip_distributor.c: Ignore messages
-       until fully booted.
-
-    Category: Resources/res_pjsip_registrar
-
-   ASTERISK-26088: Investigate heavy memory utilization by res_pjsip_pubsub
-   Reported by: Richard Mudgett
-     * [9c35f34301] Richard Mudgett -- res_pjsip_registrar.c: Eliminate rx
-       REGISTER request race condition.
-     * [557333ea4c] Richard Mudgett -- stasis: Add setting subscription
-       congestion levels.
-     * [110d772467] Richard Mudgett -- sorcery: Add setting object type
-       congestion levels.
-     * [610eee2a36] Richard Mudgett -- taskprocessors: Implement high/low
-       water mark alerts.
-     * [26e3492246] Richard Mudgett -- res_pjsip_session: Use distributor
-       serializer for incoming calls.
-     * [ceb1007ed7] Richard Mudgett -- res_pjsip_pubsub.c: Recreate
-       subscriptions using distributor serializer.
-     * [27bafc3a8b] Richard Mudgett -- res_pjsip_pubsub.c: Use distributor
-       serializer for incoming subscriptions.
-     * [16b08444da] Richard Mudgett -- pjsip_distributor.c: Consistently pick
-       a serializer for messages.
-     * [993b769524] Richard Mudgett -- pjsip_distributor.c: Ignore messages
-       until fully booted.
-   ASTERISK-26011: [patch]PJSIP: add "via_addr", "via_port", "call_id" to
-   contacts
-   Reported by: Alexei Gradinari
-     * [230686f4ec] Alexei Gradinari -- res_pjsip: add "via_addr",
-       "via_port", "call_id" to contact
-
-  Bug
-
-    Category: Applications/app_followme
-
-   ASTERISK-26008: app_followme does not delete recorded name prompt
-   Reported by: Tzafrir Cohen
-     * [eec539a46e] Tzafrir Cohen -- followme: delete the right recorded name
-       file
-
-    Category: Applications/app_queue
-
-   ASTERISK-16115: [patch] problem with ringinuse=no, queue members receive
-   sometimes two calls
-   Reported by: nik600
-     * [6959f5484b] Joshua Colp -- app_queue: Fix crash when unloading
-       module.
-     * [c345e530f4] Kevin Harwell -- app_queue: queue members can receive
-       multiple calls
-   ASTERISK-25954: Manager QueueSummary and QueueStatus Actions are case
-   sensitive to QueueName
-   Reported by: Javier Acosta
-     * [c0688a6398] Javier Acosta -- Fix case sensitive actions in AMI
-       QueueSummary and QueueStatus
-
-    Category: Applications/app_voicemail
-
-   ASTERISK-26045: [patch]app_voicemail: fix bugs, imap mm_status log change
-   to debug
-   Reported by: Alexei Gradinari
-     * [c1512f4108] Richard Mudgett -- app_voicemail.c: Fix IMAP compile
-       error.
-     * [859bbec09b] Alexei Gradinari -- app_voicemail: fix bugs, imap
-       mm_status log change to debug
-   ASTERISK-24463: Voicemail email address corrupt or not sent when message
-   is in the process of being recorded during reload
-   Reported by: John Campbell
-     * [8028fc7585] Andrew Nagy -- app_voicemail: always copy dynamic struct
-       to avoid race condition
-   ASTERISK-25917: [patch]app_voicemail: passwordlocation=spooldir only works
-   if you manually add secret.conf yourself
-   Reported by: Jonathan R. Rose
-     * [b38f1146e5] gtjoseph -- config: Fix ast_config_text_file_save2
-       writability check for missing files
-
-    Category: Applications/app_voicemail/IMAP
-
-   ASTERISK-26045: [patch]app_voicemail: fix bugs, imap mm_status log change
-   to debug
-   Reported by: Alexei Gradinari
-     * [c1512f4108] Richard Mudgett -- app_voicemail.c: Fix IMAP compile
-       error.
-     * [859bbec09b] Alexei Gradinari -- app_voicemail: fix bugs, imap
-       mm_status log change to debug
-
-    Category: CDR/cdr_custom
-
-   ASTERISK-26054: Asterisk crashes (core dump)
-   Reported by: B. Davis
-     * [321a9b128f] Joshua Colp -- res_odbc: Implement a connection pool.
-
-    Category: CEL/General
-
-   ASTERISK-25262: Memory leak when a caller channel does multiple dials and
-   CEL is enabled
-   Reported by: Etienne Lessard
-     * [caf6cccc5c] Joshua Colp -- cel: Ensure only one dial status per
-       channel exists.
-
-    Category: Channels/chan_pjsip
-
-   ASTERISK-26063: ${PJSIP_HEADER(read,Call-ID)} does not work -
-   documentation needs clarification for when read/write is possible
-   Reported by: Private Name
-     * [37d039fdf3] Rusty Newton -- res_pjsip: Add clarifying documentation
-       to PJSIP_HEADER help text
-   ASTERISK-24986: keepalive INFO packages ignored by asterisk
-   Reported by: Ilya Trikoz
-     * [39fedfa423] snuffy -- res_pjsip_empty_info: Respond to empty SIP INFO
-       packets
-   ASTERISK-26005: res_pjsip: Multiple SIP messages are combined into 1 TCP
-   packet
-   Reported by: Ross Beer
-     * [b6f9392a12] gtjoseph -- res_pjsip: Set TCP_NODELAY on TCP transports
-   ASTERISK-25990: PJSIP TLS registration should respect client_uri scheme
-   when generating Contact URI
-   Reported by: Sebastian Damm
-     * [a94a12bbf7] Sebastian Damm -- res_pjsip_outbound_registration:
-       generate correct Contact URI for TLS
-   ASTERISK-25826: PJSIP / Sorcery slow load from realtime
-   Reported by: Ross Beer
-     * [9c2032240e] Alexei Gradinari -- res_pjsip: improve realtime
-       performance
-
-    Category: Channels/chan_sip/General
-
-   ASTERISK-26069: Asterisk truncates To: header, dropping the closing '>'
-   Reported by: Vasil Kolev
-     * [89cc86fc38] Vasil Kolev -- chan_sip: bigger buffers for headers,
-       better failure mode
-   ASTERISK-25950: [patch]SIP channel does not send PeerStatus events for
-   autocreated peers
-   Reported by: Kirill Katsnelson
-     * [29bab0d1a4] Kirill Katsnelson -- chan_sip: Make autocreated peers
-       send PeerStatus events
-
-    Category: Channels/chan_sip/Interoperability
-
-   ASTERISK-26030: call cut because of double Session-Expires header in
-   re-invite after proxy authentication is required
-   Reported by: George Joseph
-     * [77e8ec162b] gtjoseph -- chan_sip: Prevent extra Session-Expires
-       headers from being added
-
-    Category: Channels/chan_sip/Registration
-
-   ASTERISK-25950: [patch]SIP channel does not send PeerStatus events for
-   autocreated peers
-   Reported by: Kirill Katsnelson
-     * [29bab0d1a4] Kirill Katsnelson -- chan_sip: Make autocreated peers
-       send PeerStatus events
-
-    Category: Channels/chan_skinny
-
-   ASTERISK-26029: parking: ast_parking_park_call should return parking_space
-   instead of parking_exten
-   Reported by: Diederik de Groot
-     * [9453d1187a] Richard Mudgett -- parking.h: Update
-       ast_parking_park_call() doxygen to reality.
-
-    Category: Channels/chan_unistim
-
-   ASTERISK-26138: chan_unistim: Under FreeBSD, chan_unistim generates a
-   compile error
-   Reported by: George Joseph
-     * [bc69b03316] gtjoseph -- chan_unistim: Fix memcpy in get_to_address
-
-    Category: Codecs/General
-
-   ASTERISK-26144: Crash on loading codecs g729/g723
-   Reported by: Alexei Gradinari
-     * [1529e62f42] gtjoseph -- codecs: Fix ABI incompatibility created by
-       adding format_name to ast_codec
-
-    Category: Contrib/General
-
-   ASTERISK-26128: Alembic scripts are failing
-   Reported by: Mark Michelson
-     * [1b79e2deff] Mark Michelson -- Fix Alembic upgrades.
-
-    Category: Core/BuildSystem
-
-   ASTERISK-26046: [patch] Avoid obsolete warnings on autoconf.
-   Reported by: Alexander Traud
-     * [e30602587c] Alexander Traud -- BuildSystem: Avoid obsolete warning
-       with AC_FUNC_SETVBUF_REVERSED on autoconf.
-     * [cbfa9f771e] Alexander Traud -- BuildSystem: Avoid obsolete warning
-       with HELP_STRING on autoconf.
-   ASTERISK-26091: [patch] ar cru creates warning, instead use ar cr
-   Reported by: Alexander Traud
-     * [d38b8e6399] Alexander Traud -- BuildSystem: Avoid 'ar cru' and use
-       'ar cr' instead.
-   ASTERISK-26038: 'make install' doesn't seem to install OS/X init files
-   Reported by: Tzafrir Cohen
-     * [a32616d60c] Tzafrir Cohen -- Makefile: remove OSARCH check for init
-       install
-
-    Category: Core/Configuration
-
-   ASTERISK-25956: Compilation error in conditionally compiled code in
-   config_options.c
-   Reported by: Chris Trobridge
-     * [dd00c71aae] Chris Trobridge -- config_options.c: Expand #ifdef to
-       contain whole if statement.
-
-    Category: Core/FileFormatInterface
-
-   ASTERISK-25998: file: Crash when using nativeformats
-   Reported by: Joshua Colp
-     * [fa11f4c920] Joshua Colp -- file: Ensure nativeformats remains valid
-       for lifetime of use.
-
-    Category: Core/General
-
-   ASTERISK-26119: [patch] fix: memory leaks, resource leaks, out of bounds
-   and bugs
-   Reported by: Alexei Gradinari
-     * [5134a8043a] Alexei Gradinari -- fix: memory leaks, resource leaks,
-       out of bounds and bugs
-   ASTERISK-26097: [patch] CLI: show maximum file descriptors
-   Reported by: Alexander Traud
-     * [ca38a3cbb4] Alexander Traud -- core: Not the configured but granted
-       number of possible file descriptors.
-     * [0d84421f93] Alexander Traud -- astfd: Not maximum size of a single
-       file but maximum file descriptors.
-
-    Category: Core/HTTP
-
-   ASTERISK-26126: [patch] leverage 'bindaddr' for TLS in http.conf
-   Reported by: Alexander Traud
-     * [76516bd79d] Alexander Traud -- http: leverage 'bindaddr' for TLS in
-       http.conf
-
-    Category: Core/Logging
-
-   ASTERISK-26078: core: Memory leak in logging
-   Reported by: Etienne Lessard
-     * [e2132dd358] Richard Mudgett -- logging,cdr,cel: Fix stringfield
-       memory leak.
-
-    Category: Core/Sorcery
-
-   ASTERISK-26014: res_sorcery_astdb: Make tolerant of unknown fields
-   Reported by: Joshua Colp
-     * [ddcf983e39] Joshua Colp -- res_sorcery_astdb: Filter fields to only
-       the registered ones.
-   ASTERISK-25826: PJSIP / Sorcery slow load from realtime
-   Reported by: Ross Beer
-     * [9c2032240e] Alexei Gradinari -- res_pjsip: improve realtime
-       performance
-
-    Category: Core/UDPTL
-
-   ASTERISK-26034: T.38 passthrough problem behind firewall due to early
-   nosignal packet
-   Reported by: George Joseph
-     * [935e0496c4] gtjoseph -- udptl: Don't eat sequence numbers until OK is
-       received
-
-    Category: Features/Parking
-
-   ASTERISK-26029: parking: ast_parking_park_call should return parking_space
-   instead of parking_exten
-   Reported by: Diederik de Groot
-     * [9453d1187a] Richard Mudgett -- parking.h: Update
-       ast_parking_park_call() doxygen to reality.
-
-    Category: Functions/func_curl
-
-   ASTERISK-25669: [patch]CURL incorrect trim for non ASCII characters
-   Reported by: Jesper
-     * [9ddaab789e] Jesper -- func_curl: Don't trim response text on
-       non-ASCII characters
-
-    Category: Functions/func_odbc
-
-   ASTERISK-26177: func_odbc: Database handle is kept when it should be
-   released
-   Reported by: Leandro Dardini
-     * [21b5d56f39] Joshua Colp -- func_odbc: Fix connection deadlock.
-   ASTERISK-25938: res_odbc: MySQL/MariaDB statement LAST_INSERT_ID() always
-   returns zero.
-   Reported by: Edwin Vandamme
-     * [cd89501d48] Alexei Gradinari -- func_odbc: single database connection
-       should be optional
-   ASTERISK-25963: func_odbc requires reconnect checks for stale connections
-   Reported by: Ross Beer
-     * [677d5b5151] Mark Michelson -- func_odbc: Check connection status
-       before executing queries.
-
-    Category: Functions/func_strings
-
-   ASTERISK-25669: [patch]CURL incorrect trim for non ASCII characters
-   Reported by: Jesper
-     * [9ddaab789e] Jesper -- func_curl: Don't trim response text on
-       non-ASCII characters
-
-    Category: Resources/res_ari
-
-   ASTERISK-25941: chan_pjsip: Crash on an immediate SIP final response
-   Reported by: Javier Riveros
-     * [c0b190dd9a] Mark Michelson -- res_pjsip: Match dialogs on responses
-       better.
-   ASTERISK-25964: Outbound registrations created via ARI/push configuration
-   do not clean up outbound registrations currently in flight
-   Reported by: Matt Jordan
-     * [3f6ef63099] gtjoseph -- res_pjsip_outbound_registration: Clean up
-       state when registration is deleted
-
-    Category: Resources/res_ari_channels
-
-   ASTERISK-26070: ari/channels: Creating a local channel without an
-   originator adds all audio formats to it's capabilities
-   Reported by: George Joseph
-     * [c27c232057] gtjoseph -- ari/resource_channels: Add 'formats' to
-       channel create/originate
-
-    Category: Resources/res_fax
-
-   ASTERISK-26141: res_fax: fax_v21_session_new leaks reference to
-   v21_details
-   Reported by: Corey Farrell
-     * [3d904659ec] Corey Farrell -- res_fax: Fix reference leak in
-       fax_v21_session_new.
-
-    Category: Resources/res_hep
-
-   ASTERISK-26096: res_hep: Crash when configuration file is missing
-   Reported by: Niklas Larsson
-     * [eabb398d71] Matt Jordan -- res_hep_{pjsip|rtcp}: Decline module loads
-       if res_hep had not loaded
-
-    Category: Resources/res_hep_rtcp
-
-   ASTERISK-25352: res_hep_rtcp correlation_id is different then res_hep
-   Reported by: Kevin Scott Adams
-     * [89ae4466ea] Matt Jordan -- res_hep: Provide an option to pick the
-       UUID type
-
-    Category: Resources/res_odbc
-
-   ASTERISK-26074: res_odbc: Deadlock within UnixODBC
-   Reported by: Ross Beer
-     * [321a9b128f] Joshua Colp -- res_odbc: Implement a connection pool.
-   ASTERISK-25938: res_odbc: MySQL/MariaDB statement LAST_INSERT_ID() always
-   returns zero.
-   Reported by: Edwin Vandamme
-     * [cd89501d48] Alexei Gradinari -- func_odbc: single database connection
-       should be optional
-
-    Category: Resources/res_phoneprov
-
-   ASTERISK-26119: [patch] fix: memory leaks, resource leaks, out of bounds
-   and bugs
-   Reported by: Alexei Gradinari
-     * [5134a8043a] Alexei Gradinari -- fix: memory leaks, resource leaks,
-       out of bounds and bugs
-
-    Category: Resources/res_pjsip
-
-   ASTERISK-26160: pjsip: Updated->Reachable during qualify
-   Reported by: Matt Jordan
-     * [25a42c176f] Richard Mudgett -- res_pjsip: Fix statsd regression.
-   ASTERISK-25941: chan_pjsip: Crash on an immediate SIP final response
-   Reported by: Javier Riveros
-     * [c0b190dd9a] Mark Michelson -- res_pjsip: Match dialogs on responses
-       better.
-   ASTERISK-26007: res_pjsip: Endpoints deleting early after upgrade from
-   13.8.2 to 13.9
-   Reported by: Greg Siemon
-     * [02d30e171e] Mark Michelson -- Use doubles instead of floats for
-       conversions when comparing strings.
-   ASTERISK-26004: res_pjsip: The transport/method parameter is ignored
-   Reported by: George Joseph
-     * [fb6227a372] gtjoseph -- config_transport: Tell pjproject to allow all
-       SSL/TLS protocols
-
-    Category: Resources/res_pjsip_mwi
-
-   ASTERISK-26065: chan_pjsip: MWI NOTIFY contents not ordered properly
-   Reported by: Ross Beer
-     * [fe305ccf01] gtjoseph -- res_pjsip_mwi_body_generator: Re-order the
-       body items
-
-    Category: Resources/res_pjsip_mwi_body_generator
-
-   ASTERISK-26065: chan_pjsip: MWI NOTIFY contents not ordered properly
-   Reported by: Ross Beer
-     * [fe305ccf01] gtjoseph -- res_pjsip_mwi_body_generator: Re-order the
-       body items
-
-    Category: Resources/res_pjsip_outbound_registration
-
-   ASTERISK-25964: Outbound registrations created via ARI/push configuration
-   do not clean up outbound registrations currently in flight
-   Reported by: Matt Jordan
-     * [3f6ef63099] gtjoseph -- res_pjsip_outbound_registration: Clean up
-       state when registration is deleted
-   ASTERISK-25990: PJSIP TLS registration should respect client_uri scheme
-   when generating Contact URI
-   Reported by: Sebastian Damm
-     * [a94a12bbf7] Sebastian Damm -- res_pjsip_outbound_registration:
-       generate correct Contact URI for TLS
-
-    Category: Resources/res_pjsip_pubsub
-
-   ASTERISK-26099: res_pjsip_pubsub: Crash when sending request due to server
-   timeout
-   Reported by: Ross Beer
-     * [78dcdd3010] gtjoseph -- configure: Fix HAVE_PJSIP_EVSUB_GRP_LOCK not
-       set with external pjproject
-     * [6a568bcc66] gtjoseph -- res_pjsip_pubsub: Address SEGV when
-       attempting to terminate a subscription
-
-    Category: Resources/res_pjsip_sdp_rtp
-
-   ASTERISK-26119: [patch] fix: memory leaks, resource leaks, out of bounds
-   and bugs
-   Reported by: Alexei Gradinari
-     * [5134a8043a] Alexei Gradinari -- fix: memory leaks, resource leaks,
-       out of bounds and bugs
-
-    Category: Resources/res_pjsip_session
-
-   ASTERISK-26127: res_pjsip_session: Crash due to race condition between
-   res_pjsip_session unload and timer
-   Reported by: Joshua Colp
-     * [ba0d9e7f7a] Joshua Colp -- res_pjsip_session: Handle race condition
-       at shutdown with timer.
-
-    Category: Resources/res_rtp_asterisk
-
-   ASTERISK-26140: res_rtp_asterisk: gcc 6 caught a self-comparison
-   Reported by: George Joseph
-     * [48db4c2159] gtjoseph -- res_rtp_asterisk: Fix a self-comparison
-       identified by gcc 6
-   ASTERISK-26130: [patch] WebRTC: Should use latest DTLS version.
-   Reported by: Alexander Traud
-     * [ef97911a1c] Alexander Traud -- res_rtp_asterisk: Use latest DTLS
-       version available by underlying platform.
-   ASTERISK-26092: [Segfault] in res_rtp_asterisk.c:4268 after Remotely
-   bridged channels
-   Reported by: Niklas Larsson
-     * [715ef071a1] Mark Michelson -- chan_pjsip: Lock channel when checking
-       for RTP changes.
-
-    Category: Resources/res_srtp
-
-   ASTERISK-24436: Missing header in res/res_srtp.c when compiling against
-   libsrtp-1.5.0
-   Reported by: Patrick Laimbock
-     * [c6ee4a0f44] Alexander Traud -- res_srtp: Instead of libSRTP use
-       OpenSSL as random source.
-
-    Category: Resources/res_stasis_playback
-
-   ASTERISK-26083: ARI: Announcer channels staying around after playback to a
-   bridge is finished
-   Reported by: Per Jensen
-     * [cfebe3b94a] Mark Michelson -- ARI: Ensure announcer channels are
-       destroyed.
-
-    Category: Tests/General
-
-   ASTERISK-26139: test_res_pjsip_scheduler: Compile failure if pjproject
-   isn't installed in a system location
-   Reported by: George Joseph
-     * [77da168e58] gtjoseph -- test_res_pjsip_scheduler: Add 'depends' on
-       pjproject in MODULEINFO
-
-    Category: Tests/testsuite
-
-   ASTERISK-25961: tests/channels/SIP/sip_tls_call: Sporadic crash when
-   running test
-   Reported by: Joshua Colp
-     * [949bf6b282] Joshua Colp -- chan_sip: Give more time for TCP/TLS
-       threads to stop.
-
-    Category: pjproject/pjsip
-
-   ASTERISK-26089: Invalid security events during boot using PJSIP Realtime
-   Reported by: Scott Griepentrog
-     * [993b769524] Richard Mudgett -- pjsip_distributor.c: Ignore messages
-       until fully booted.
-   ASTERISK-25993: pjproject: Allow bundling to not require everything it
-   does
-   Reported by: Joshua Colp
-     * [2a7130b8b0] gtjoseph -- pjproject_bundled: Check for python-dev and
-       TEST_FRAMEWORK
-   ASTERISK-25968: pjproject_bundled: Configure and make need to be re-tested
-   Reported by: George Joseph
-     * [f39089f17c] gtjoseph -- pjproject_bundled: Various fixes discovered
-       during testing of OSes
-   ASTERISK-25970: Segfault in pjsip_url_compare
-   Reported by: Dmitriy Serov
-     * [719ece5659] gtjoseph -- pjproject_bundled: Disable
-       PJSIP_UNESCAPE_IN_PLACE
-
-  New Feature
-
-    Category: Core/ManagerInterface/NewFeature
-
-   ASTERISK-25904: PJSIP: add contact.updated event
-   Reported by: Alexei Gradinari
-     * [25a42c176f] Richard Mudgett -- res_pjsip: Fix statsd regression.
-     * [e6eb17efd9] Alexei Gradinari -- stasis_endpoints: Add new Status and
-       Headers to ContactStatus
-     * [7a14e669f0] Alexei Gradinari -- res_pjsip/AMI: add contact.updated
-       event
-
-    Category: Resources/res_pjsip
-
-   ASTERISK-25904: PJSIP: add contact.updated event
-   Reported by: Alexei Gradinari
-     * [25a42c176f] Richard Mudgett -- res_pjsip: Fix statsd regression.
-     * [e6eb17efd9] Alexei Gradinari -- stasis_endpoints: Add new Status and
-       Headers to ContactStatus
-     * [7a14e669f0] Alexei Gradinari -- res_pjsip/AMI: add contact.updated
-       event
-   ASTERISK-25900: PJSIP Endpoint IP Access Controls
-   Reported by: Alexei Gradinari
-     * [524a302974] Alexei Gradinari -- res_pjsip: Endpoint IP Access
-       Controls
-
-     ----------------------------------------------------------------------
-
-                                  Open Issues
-
-                                 [Back to Top]
-
-   This is a list of all open issues from the issue tracker that were
-   referenced by changes that went into this release.
-
-  New Feature
-
-    Category: Applications/app_confbridge
-
-   ASTERISK-25989: apps/confbridge: add regcontext feature
-   Reported by: Jaco Kroon
-     * [2db17a793c] Jaco Kroon -- app_confbridge: Add a regcontext option for
-       confbridge bridge profiles.
-
-    Category: Core/ManagerInterface/NewFeature
-
-   ASTERISK-25903: PJSIP AMI Event ContactStatus: add Useragent and RegExpire
-   Reported by: Alexei Gradinari
-     * [e6eb17efd9] Alexei Gradinari -- stasis_endpoints: Add new Status and
-       Headers to ContactStatus
-
-    Category: Resources/res_pjsip
-
-   ASTERISK-25903: PJSIP AMI Event ContactStatus: add Useragent and RegExpire
-   Reported by: Alexei Gradinari
-     * [e6eb17efd9] Alexei Gradinari -- stasis_endpoints: Add new Status and
-       Headers to ContactStatus
-
-  Bug
-
-    Category: Core/Logging
-
-   ASTERISK-25538: [patch]Missing PID in syslog logger messages
-   Reported by: Javier Acosta
-     * [36d66a23e0] Alexei Gradinari -- logger: Add PID to syslog messages.
-
-    Category: Resources/res_fax
-
-   ASTERISK-25982: [patch]res_fax/t38_gateway: Peer V.21 session is created
-   on wrong channel
-   Reported by: Alexei Gradinari
-     * [2d17fe06c5] Alexei Gradinari -- res_fax/t38_gateway: Peer V.21
-       session is created on wrong channel
-
-    Category: Resources/res_rtp_asterisk
-
-   ASTERISK-26129: res_rtp_asterisk: Memory leak of CERT bio in DTLS
-   implementation
-   Reported by: Torrey Searle
-     * [dfcd466bf0] Torrey Searle -- res_rtp_asterisk: fix memory leak in
-       dtls
-
-  Improvement
-
-    Category: Applications/app_dial
-
-   ASTERISK-26059: [patch]core: New channel variable FORWARDERNAME
-   Reported by: Alexei Gradinari
-     * [2de58c6d01] Alexei Gradinari -- core/dial: New channel variable
-       FORWARDERNAME
-
-    Category: Core/Bridging
-
-   ASTERISK-26059: [patch]core: New channel variable FORWARDERNAME
-   Reported by: Alexei Gradinari
-     * [2de58c6d01] Alexei Gradinari -- core/dial: New channel variable
-       FORWARDERNAME
-
-    Category: Core/Channels
-
-   ASTERISK-26059: [patch]core: New channel variable FORWARDERNAME
-   Reported by: Alexei Gradinari
-     * [2de58c6d01] Alexei Gradinari -- core/dial: New channel variable
-       FORWARDERNAME
-
-    Category: Functions/func_odbc
-
-   ASTERISK-26010: [patch]func_odbc: single database connection should be
-   optional
-   Reported by: Alexei Gradinari
-     * [cd89501d48] Alexei Gradinari -- func_odbc: single database connection
-       should be optional
-
-    Category: Resources/res_fax
-
-   ASTERISK-25980: [patch]res_fax: set FAXMODE variable to let dialplan know
-   what fax transport was used
-   Reported by: Alexei Gradinari
-     * [06d4ac0355] Alexei Gradinari -- res_fax: add FAXMODE variable
-
-    Category: Resources/res_pjsip
-
-   ASTERISK-26055: [patch]res_pjsip: chatty verbose messages
-   Reported by: Alexei Gradinari
-     * [04c12561a7] Alexei Gradinari -- res_pjsip: chatty verbose messages
-
-     ----------------------------------------------------------------------
-
-                      Commits Not Associated with an Issue
-
-                                 [Back to Top]
-
-   This is a list of all changes that went into this release that did not
-   reference a JIRA issue.
-
-   +------------------------------------------------------------------------+
-   | Revision   | Author    | Summary                                       |
-   |------------+-----------+-----------------------------------------------|
-   | b0a2ca9133 | Joshua    | Release summaries: Remove previous versions   |
-   |            | Colp      |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | 734a7de6ff | Joshua    | .version: Update for 13.10.0                  |
-   |            | Colp      |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | cf223d2cad | Joshua    | .lastclean: Update for 13.10.0                |
-   |            | Colp      |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | 07af28131f | Joshua    | realtime: Add database scripts for 13.10.0    |
-   |            | Colp      |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | af14215882 | Mark      | ChangeLog: Updated for 13.10.0-rc3            |
-   |            | Michelson |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | d456aa0519 | Mark      | Release summaries: Add summaries for          |
-   |            | Michelson | 13.10.0-rc3                                   |
-   |------------+-----------+-----------------------------------------------|
-   | b3df380e56 | Mark      | Release summaries: Remove previous versions   |
-   |            | Michelson |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | ac5a6c8cad | Mark      | .version: Update for 13.10.0-rc3              |
-   |            | Michelson |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | d3c10e5de3 | Mark      | .lastclean: Update for 13.10.0-rc3            |
-   |            | Michelson |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | 305a6dbc85 | Mark      | realtime: Add database scripts for            |
-   |            | Michelson | 13.10.0-rc3                                   |
-   |------------+-----------+-----------------------------------------------|
-   | 9a8b4251b8 | Mark      | ChangeLog: Updated for 13.10.0-rc2            |
-   |            | Michelson |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | d579dce147 | Mark      | Release summaries: Add summaries for          |
-   |            | Michelson | 13.10.0-rc2                                   |
-   |------------+-----------+-----------------------------------------------|
-   | 486fbce3d5 | Mark      | Release summaries: Remove previous versions   |
-   |            | Michelson |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | fb6bd30291 | Mark      | .version: Update for 13.10.0-rc2              |
-   |            | Michelson |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | f6bd754584 | Mark      | .lastclean: Update for 13.10.0-rc2            |
-   |            | Michelson |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | 40cd52de7e | Mark      | realtime: Add database scripts for            |
-   |            | Michelson | 13.10.0-rc2                                   |
-   |------------+-----------+-----------------------------------------------|
-   | 3c4b64351b | Mark      | ChangeLog: Updated for 13.10.0-rc1            |
-   |            | Michelson |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | 62349ac1b4 | Mark      | Release summaries: Add summaries for          |
-   |            | Michelson | 13.10.0-rc1                                   |
-   |------------+-----------+-----------------------------------------------|
-   | 8da6ba4328 | Mark      | .version: Update for 13.10.0-rc1              |
-   |            | Michelson |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | 170b85e3ae | Mark      | .lastclean: Update for 13.10.0-rc1            |
-   |            | Michelson |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | 4af7049b8f | Mark      | realtime: Add database scripts for            |
-   |            | Michelson | 13.10.0-rc1                                   |
-   |------------+-----------+-----------------------------------------------|
-   | c982da0641 | Richard   | res_pjproject.c: Replace inlined              |
-   |            | Mudgett   | DEBUG_ATLEAST() with macro.                   |
-   |------------+-----------+-----------------------------------------------|
-   | d53a36ff33 | Richard   | res_pjsip_transport_management.c: Misc        |
-   |            | Mudgett   | cleanups to survive shutdown.                 |
-   |------------+-----------+-----------------------------------------------|
-   | 03953d8034 | Richard   | res_pjsip.c: Add check that timer actually    |
-   |            | Mudgett   | got scheduled.                                |
-   |------------+-----------+-----------------------------------------------|
-   | 32ab98116e | Richard   | res_rtp_multicast.c: Fix warning message      |
-   |            | Mudgett   | typo.                                         |
-   |------------+-----------+-----------------------------------------------|
-   | 0429c53368 | Richard   | res_pjsip_session.c: Reorganize               |
-   |            | Mudgett   | ast_sip_session_terminate().                  |
-   |------------+-----------+-----------------------------------------------|
-   | 5823f279f3 | Richard   | chan_rtp: Backport changes from master.       |
-   |            | Mudgett   |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | dde58df318 | Richard   | chan_rtp.c: Copy file from                    |
-   |            | Mudgett   | chan_multicast_rtp.c                          |
-   |------------+-----------+-----------------------------------------------|
-   | a99ddc6a0d | gtjoseph  | build: Fix ast_sockaddr initialization to be  |
-   |            |           | more portable                                 |
-   |------------+-----------+-----------------------------------------------|
-   | 9c5a0b814b | Timo      | Fix #include poll.h and sys/cdefs.h           |
-   |            | TerACURs  |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | cda3385409 | Joshua    | alembic: Fix migration.                       |
-   |            | Colp      |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | b2ce0e354b | Richard   | pjsip_distributor.c: Use correct rdata info   |
-   |            | Mudgett   | access method (Part 2).                       |
-   |------------+-----------+-----------------------------------------------|
-   | e8abfdcdc5 | gtjoseph  | pjproject_bundled: Move to pjproject 2.5      |
-   |------------+-----------+-----------------------------------------------|
-   | 03d5b3ce5c | Richard   | pjsip_distributor.c: Use correct rdata info   |
-   |            | Mudgett   | access method.                                |
-   |------------+-----------+-----------------------------------------------|
-   | 361a16f316 | Matt      | configs/samples/pjsip.conf.sample: Fix typo   |
-   |            | Jordan    |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | f91a7dc993 | Matt      | res/res_hep_pjsip: Fix reported local IP      |
-   |            | Jordan    | address when bound to 'any'                   |
-   |------------+-----------+-----------------------------------------------|
-   | 9de5cd209e | Sean      | res_ari: Correct Location headers returned by |
-   |            | Bright    | some ARI resources                            |
-   |------------+-----------+-----------------------------------------------|
-   | a73d79c22f | Tzafrir   | basic-cfg: asterisk.conf: remove              |
-   |            | Cohen     | [directories]                                 |
-   |------------+-----------+-----------------------------------------------|
-   | 1c56de9453 | Tzafrir   | basic-cfg: asterisk.conf: defaults of options |
-   |            | Cohen     |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | d7af591c59 | Tzafrir   | basic-cfg: asterisk.conf: debug level 5 spams |
-   |            | Cohen     |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | 9b7db18fc1 | Tzafrir   | basic-cfg: asterisk.conf: don't set languages |
-   |            | Cohen     |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | e2df15bae9 | gtjoseph  | pjsip_distributor: Add missing newline to     |
-   |            |           | NOTICE                                        |
-   |------------+-----------+-----------------------------------------------|
-   | 37214b0bdf | Matt      | configure: Fix errors with                    |
-   |            | Jordan    | AST_UNDEFINED_SANITIZER/AST_LEAK_SANITIZER    |
-   |------------+-----------+-----------------------------------------------|
-   | 49b25a0956 | Kevin     | res_pjsip_outbound_publish: state potential   |
-   |            | Harwell   | dropped on reloads/realtime fetches           |
-   |------------+-----------+-----------------------------------------------|
-   | 1b5c91b7be | Kevin     | res_pjsip_outbound_publish: Potential crash   |
-   |            | Harwell   | due to off nominal path                       |
-   |------------+-----------+-----------------------------------------------|
-   | 10de553c9d | Kevin     | res_pjsip_outbound_publishing: After          |
-   |            | Harwell   | unloading the library won't load again        |
-   |------------+-----------+-----------------------------------------------|
-   | 1a833b9739 | Kevin     | res_pjsip_outbound_publish: Ref leak in off   |
-   |            | Harwell   | nominal callback paths                        |
-   |------------+-----------+-----------------------------------------------|
-   | 4752ef02e0 | Kevin     | res_pjsip_outbound_publish: Won't unload if   |
-   |            | Harwell   | condition wait times out                      |
-   |------------+-----------+-----------------------------------------------|
-   | a2f19d82a8 | Diederik  | configs/basic-pbx/asterisk.conf: contains     |
-   |            | de Groot  | incorrect path separator                      |
-   |------------+-----------+-----------------------------------------------|
-   | 7992923c70 | Richard   | res_pjsip: Start body generator users after   |
-   |            | Mudgett   | suppliers.                                    |
-   |------------+-----------+-----------------------------------------------|
-   | 5dc0e082b2 | Richard   | res_pjsip_pubsub.c: Add useful information to |
-   |            | Mudgett   | some messages.                                |
-   |------------+-----------+-----------------------------------------------|
-   | f9e416f053 | Richard   | res_pjsip_pubsub.c: Fix body generator        |
-   |            | Mudgett   | registration race.                            |
-   |------------+-----------+-----------------------------------------------|
-   | b1b2019046 | Richard   | res_pjsip_pubsub.h: Fix doxygen association.  |
-   |            | Mudgett   |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | b7f07fdff5 | Richard   | res_pjsip_outbound_publish.c: Remove          |
-   |            | Mudgett   | redundant flag check.                         |
-   |------------+-----------+-----------------------------------------------|
-   | ebf0724a83 | Richard   | test_message.c: Wait longer in case dialplan  |
-   |            | Mudgett   | also processes the test message.              |
-   |------------+-----------+-----------------------------------------------|
-   | ba63aa7c9e | Richard   | Manager: Short circuit AMI message            |
-   |            | Mudgett   | processing.                                   |
-   |------------+-----------+-----------------------------------------------|
-   | d5ee6acf28 | Richard   | manager.c: Eliminate most RAII_VAR usage.     |
-   |            | Mudgett   |                                               |
-   |------------+-----------+-----------------------------------------------|
-   | 7303e3dc96 | Richard   | manager_channels.c: Fix allocation failure    |
-   |            | Mudgett   | crash.                                        |
-   |------------+-----------+-----------------------------------------------|
-   | 1e93f3d723 | Richard   | Bridge system: Fix memory leaks and double    |
-   |            | Mudgett   | frees on impart failure.                      |
-   |------------+-----------+-----------------------------------------------|
-   | 5e388d4188 | Richard   | bridge_softmix.c: Fix crash if channel fails  |
-   |            | Mudgett   | to join mixing tech.                          |
-   |------------+-----------+-----------------------------------------------|
-   | 9740277713 | gtjoseph  | res_pjsip: Add serialized scheduler           |
-   |            |           | (res_pjsip/pjsip_scheduler.c)                 |
-   +------------------------------------------------------------------------+
-
-     ----------------------------------------------------------------------
-
-                                Diffstat Results
-
-                                 [Back to Top]
-
-   This is a summary of the changes to the source code that went into this
-   release that was generated using the diffstat utility.
-
- asterisk-13.9.0-summary.html                                                                    |  333 -
- asterisk-13.9.0-summary.txt                                                                     |  821 ---
- b/.version                                                                                      |    2
- b/CHANGES                                                                                       |  137
- b/ChangeLog                                                                                     | 2235 +++++++++-
- b/Makefile                                                                                      |  102
- b/addons/ooh323c/src/Makefile.in                                                                |    2
- b/apps/app_confbridge.c                                                                         |   15
- b/apps/app_dial.c                                                                               |    3
- b/apps/app_followme.c                                                                           |   17
- b/apps/app_queue.c                                                                              |  159
- b/apps/app_voicemail.c                                                                          |  328 +
- b/apps/confbridge/conf_chan_announce.c                                                          |    1
- b/apps/confbridge/conf_config_parser.c                                                          |   19
- b/apps/confbridge/include/confbridge.h                                                          |    1
- b/autoconf/ast_ext_lib.m4                                                                       |    2
- b/autoconf/ast_prog_ld.m4                                                                       |    2
- b/bridges/bridge_softmix.c                                                                      |   13
- b/cdr/cdr_custom.c                                                                              |    2
- b/cdr/cdr_syslog.c                                                                              |    2
- b/cel/cel_custom.c                                                                              |    2
- b/channels/chan_multicast_rtp.c                                                                 |    7
- b/channels/chan_pjsip.c                                                                         |    9
- b/channels/chan_rtp.c                                                                           |  415 +
- b/channels/chan_sip.c                                                                           |  100
- b/channels/chan_unistim.c                                                                       |    2
- b/configs/basic-pbx/asterisk.conf                                                               |   25
- b/configs/samples/confbridge.conf.sample                                                        |    2
- b/configs/samples/func_odbc.conf.sample                                                         |   14
- b/configs/samples/hep.conf.sample                                                               |    4
- b/configs/samples/pjsip.conf.sample                                                             |   45
- b/configs/samples/res_odbc.conf.sample                                                          |    5
- b/configure                                                                                     |  242 +
- b/configure.ac                                                                                  |   14
- b/contrib/ast-db-manage/config/versions/65eb22eb195_add_unidentified_request_options_to_.py     |   27
- b/contrib/ast-db-manage/config/versions/6d8c104e6184_res_pjsip_add_contact_via_addr_and_.py     |   25
- b/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py            |   23
- b/contrib/ast-db-manage/config/versions/837aa67461fb_add_pjsip_endpoint_ip_access_control_.py   |   32
- b/contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py    |   32
- b/contrib/ast-db-manage/config/versions/8d478ab86e29_pjsip_add_disable_multi_domain.py          |   31
- b/contrib/realtime/mssql/mssql_config.sql                                                       |  112
- b/contrib/realtime/mysql/mysql_config.sql                                                       |   58
- b/contrib/realtime/oracle/oracle_config.sql                                                     |  112
- b/contrib/realtime/postgresql/postgresql_config.sql                                             |   58
- b/contrib/scripts/install_prereq                                                                |   36
- b/funcs/func_odbc.c                                                                             |  231 -
- b/include/asterisk/astobj2.h                                                                    |  134
- b/include/asterisk/autoconfig.h.in                                                              |    6
- b/include/asterisk/bridge_technology.h                                                          |    3
- b/include/asterisk/compat.h                                                                     |    2
- b/include/asterisk/config_options.h                                                             |   22
- b/include/asterisk/features.h                                                                   |    9
- b/include/asterisk/multicast_rtp.h                                                              |   58
- b/include/asterisk/parking.h                                                                    |   11
- b/include/asterisk/poll-compat.h                                                                |    2
- b/include/asterisk/res_hep.h                                                                    |   22
- b/include/asterisk/res_odbc.h                                                                   |    5
- b/include/asterisk/res_pjsip.h                                                                  |  296 +
- b/include/asterisk/res_pjsip_pubsub.h                                                           |    4
- b/include/asterisk/res_pjsip_session.h                                                          |    3
- b/include/asterisk/sorcery.h                                                                    |   14
- b/include/asterisk/stasis.h                                                                     |   38
- b/include/asterisk/stasis_app.h                                                                 |    9
- b/include/asterisk/stasis_message_router.h                                                      |   14
- b/include/asterisk/strings.h                                                                    |    2
- b/include/asterisk/taskprocessor.h                                                              |   23
- b/main/Makefile                                                                                 |   12
- b/main/ast_expr2.c                                                                              |   10
- b/main/ast_expr2.y                                                                              |   10
- b/main/asterisk.c                                                                               |   16
- b/main/asterisk.exports.in                                                                      |    2
- b/main/astfd.c                                                                                  |    2
- b/main/bridge.c                                                                                 |   11
- b/main/bridge_channel.c                                                                         |    3
- b/main/cdr.c                                                                                    |    3
- b/main/cel.c                                                                                    |  111
- b/main/channel.c                                                                                |    3
- b/main/codec.c                                                                                  |   70
- b/main/codec_builtin.c                                                                          |   11
- b/main/config.c                                                                                 |   34
- b/main/config_options.c                                                                         |    7
- b/main/core_unreal.c                                                                            |    1
- b/main/dial.c                                                                                   |   14
- b/main/editline/Makefile.in                                                                     |    2
- b/main/features.c                                                                               |    1
- b/main/file.c                                                                                   |   24
- b/main/http.c                                                                                   |    2
- b/main/logger.c                                                                                 |    2
- b/main/manager.c                                                                                |  205
- b/main/manager_channels.c                                                                       |   24
- b/main/say.c                                                                                    |    4
- b/main/sorcery.c                                                                                |   21
- b/main/stasis.c                                                                                 |   12
- b/main/stasis_endpoints.c                                                                       |   13
- b/main/stasis_message.c                                                                         |   35
- b/main/stasis_message_router.c                                                                  |   12
- b/main/strings.c                                                                                |    6
- b/main/taskprocessor.c                                                                          |  172
- b/main/threadpool.c                                                                             |    4
- b/main/udptl.c                                                                                  |   12
- b/makeopts.in                                                                                   |    3
- b/res/ael/pval.c                                                                                |   70
- b/res/ari/resource_bridges.c                                                                    |   11
- b/res/ari/resource_channels.c                                                                   |   49
- b/res/ari/resource_channels.h                                                                   |    4
- b/res/res_ari.c                                                                                 |    3
- b/res/res_ari_channels.c                                                                        |   14
- b/res/res_fax.c                                                                                 |   51
- b/res/res_hep.c                                                                                 |   49
- b/res/res_hep.exports.in                                                                        |    2
- b/res/res_hep_pjsip.c                                                                           |   68
- b/res/res_hep_rtcp.c                                                                            |   37
- b/res/res_odbc.c                                                                                |  248 -
- b/res/res_phoneprov.c                                                                           |    5
- b/res/res_pjproject.c                                                                           |    7
- b/res/res_pjsip.c                                                                               |  199
- b/res/res_pjsip/config_global.c                                                                 |   77
- b/res/res_pjsip/config_transport.c                                                              |   10
- b/res/res_pjsip/include/res_pjsip_private.h                                                     |   19
- b/res/res_pjsip/location.c                                                                      |   29
- b/res/res_pjsip/pjsip_configuration.c                                                           |  190
- b/res/res_pjsip/pjsip_distributor.c                                                             |  676 ++-
- b/res/res_pjsip/pjsip_options.c                                                                 |  161
- b/res/res_pjsip/pjsip_scheduler.c                                                               |  495 ++
- b/res/res_pjsip_authenticator_digest.c                                                          |   28
- b/res/res_pjsip_dtmf_info.c                                                                     |    7
- b/res/res_pjsip_empty_info.c                                                                    |   89
- b/res/res_pjsip_endpoint_identifier_anonymous.c                                                 |   38
- b/res/res_pjsip_endpoint_identifier_ip.c                                                        |    2
- b/res/res_pjsip_endpoint_identifier_user.c                                                      |  145
- b/res/res_pjsip_exten_state.c                                                                   |    8
- b/res/res_pjsip_header_funcs.c                                                                  |    9
- b/res/res_pjsip_messaging.c                                                                     |   18
- b/res/res_pjsip_mwi.c                                                                           |   10
- b/res/res_pjsip_mwi_body_generator.c                                                            |    4
- b/res/res_pjsip_one_touch_record_info.c                                                         |    9
- b/res/res_pjsip_outbound_publish.c                                                              |  189
- b/res/res_pjsip_outbound_registration.c                                                         |   26
- b/res/res_pjsip_publish_asterisk.c                                                              |   10
- b/res/res_pjsip_pubsub.c                                                                        |  565 +-
- b/res/res_pjsip_registrar.c                                                                     |  468 --
- b/res/res_pjsip_sdp_rtp.c                                                                       |    2
- b/res/res_pjsip_session.c                                                                       |  109
- b/res/res_pjsip_transport_management.c                                                          |  100
- b/res/res_rtp_asterisk.c                                                                        |   17
- b/res/res_rtp_multicast.c                                                                       |  189
- b/res/res_rtp_multicast.exports.in                                                              |    6
- b/res/res_sorcery_astdb.c                                                                       |   60
- b/res/res_srtp.c                                                                                |    8
- b/res/res_stasis.c                                                                              |   16
- b/rest-api/api-docs/channels.json                                                               |   17
- b/tests/test_cel.c                                                                              |    2
- b/tests/test_channel_feature_hooks.c                                                            |   15
- b/tests/test_config.c                                                                           |   75
- b/tests/test_message.c                                                                          |    8
- b/tests/test_netsock2.c                                                                         |    6
- b/tests/test_res_pjsip_scheduler.c                                                              |  401 +
- b/third-party/pjproject/Makefile                                                                |   23
- b/third-party/pjproject/Makefile.rules                                                          |   11
- b/third-party/pjproject/apply_patches                                                           |    4
- b/third-party/pjproject/configure.m4                                                            |    7
- b/third-party/pjproject/patches/0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch |   73
- b/third-party/pjproject/patches/0001-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch |   48
- third-party/pjproject/patches/0001-2.4.5-fix-for-tls-async-ops.patch                            |  224 -
- third-party/pjproject/patches/0001-Bump-tcp-tls-and-transaction-log-levels-from-1-to-3.patch    |   70
- third-party/pjproject/patches/0001-ioqueue-Enable-epoll-in-aconfigure.ac.patch                  |   80
- third-party/pjproject/patches/0001-sip_parser.c-Fix-pjsip_VIA_PARAM_SPEC_ESC.patch              |   30
- third-party/pjproject/patches/0001-sip_parser.c-Remove-wholesale-strip-from-parse_param.patch   |   55
- third-party/pjproject/patches/0001-sip_transport-Search-for-transport-even-if-listener-.patch   |  114
- 169 files changed, 9993 insertions(+), 3286 deletions(-)
diff --git a/asterisk-13.11.2-summary.html b/asterisk-13.11.2-summary.html
new file mode 100644
index 0000000..578d05e
--- /dev/null
+++ b/asterisk-13.11.2-summary.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><title>Release Summary - asterisk-13.11.2</title><h1 align="center"><a name="top">Release Summary</a></h1><h3 align="center">asterisk-13.11.2</h3><h3 align="center">Date: 2016-09-09</h3><h3 align="center"><asteriskteam at digium.com></h3><hr><h2 align="center">Table of Contents</h2><ol>
+<li><a href="#summary">Summary</a></li>
+<li><a href="#contributors">Contributors</a></li>
+<li><a href="#closed_issues">Closed Issues</a></li>
+<li><a href="#commits">Other Changes</a></li>
+<li><a href="#diffstat">Diffstat</a></li>
+</ol><hr><a name="summary"><h2 align="center">Summary</h2></a><center><a href="#top">[Back to Top]</a></center><p>This release is a point release of an existing major version. The changes included were made to address problems that have been identified in this release series, or are minor, backwards compatible new features or improvements. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous version a [...]
+<tr><th width="33%">Coders</th><th width="33%">Testers</th><th width="33%">Reporters</th></tr>
+<tr valign="top"><td width="33%">4 George Joseph <gjoseph at digium.com><br/>1 Joshua Colp <jcolp at digium.com><br/></td><td width="33%"><td width="33%">1 Dmitry Melekhov <dm at belkam.com><br/></td></tr>
+</table><hr><a name="closed_issues"><h2 align="center">Closed Issues</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p><h3>Bug</h3><h4>Category: pjproject/pjsip</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26349">ASTERISK-26349</a>:  13.11.1 res_pjsip/pjsip_distributor.c: Request 'REGISTER' failed<br/>Reported by: Dmitry Melekhov<ul>
+<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=54a182b3ecbe59e1d0f2f6f1ddee45848cdf65a3">[54a182b3ec]</a> Joshua Colp -- res_pjsip: Only invoke unidentified endpoint logic when unidentified.</li>
+</ul><br><hr><a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a list of all changes that went into this release that did not reference a JIRA issue.</p><table width="100%" border="1">
+<tr><th>Revision</th><th>Author</th><th>Summary</th></tr>
+<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=5d9c842bd226d59dd203bf8d2bf882523d761f7d">5d9c842bd2</a></td><td>gtjoseph</td><td>Release summaries: Remove previous versions</td></tr>
+<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=a05e4fbcbfa21285d870597564f755aae502ff80">a05e4fbcbf</a></td><td>gtjoseph</td><td>.version: Update for 13.11.2</td></tr>
+<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=a017f5d6625bfae80fd56e96311fd884a89c0f05">a017f5d662</a></td><td>gtjoseph</td><td>.lastclean: Update for 13.11.2</td></tr>
+<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ec8e92bdbd1e1fdd459e4589b98dc750bbcac4b7">ec8e92bdbd</a></td><td>gtjoseph</td><td>realtime: Add database scripts for 13.11.2</td></tr>
+</table><hr><a name="diffstat"><h2 align="center">Diffstat Results</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p><pre>asterisk-13.11.1-summary.html |   34 ------------
+asterisk-13.11.1-summary.txt  |  115 ------------------------------------------
+b/.version                    |    2
+3 files changed, 1 insertion(+), 150 deletions(-)</pre><br></html>
\ No newline at end of file
diff --git a/asterisk-13.11.2-summary.txt b/asterisk-13.11.2-summary.txt
new file mode 100644
index 0000000..45bfa1a
--- /dev/null
+++ b/asterisk-13.11.2-summary.txt
@@ -0,0 +1,108 @@
+                                Release Summary
+
+                                asterisk-13.11.2
+
+                                Date: 2016-09-09
+
+                           <asteriskteam at digium.com>
+
+     ----------------------------------------------------------------------
+
+                               Table of Contents
+
+    1. Summary
+    2. Contributors
+    3. Closed Issues
+    4. Other Changes
+    5. Diffstat
+
+     ----------------------------------------------------------------------
+
+                                    Summary
+
+                                 [Back to Top]
+
+   This release is a point release of an existing major version. The changes
+   included were made to address problems that have been identified in this
+   release series, or are minor, backwards compatible new features or
+   improvements. Users should be able to safely upgrade to this version if
+   this release series is already in use. Users considering upgrading from a
+   previous version are strongly encouraged to review the UPGRADE.txt
+   document as well as the CHANGES document for information about upgrading
+   to this release series.
+
+   The data in this summary reflects changes that have been made since the
+   previous release, asterisk-13.11.1.
+
+     ----------------------------------------------------------------------
+
+                                  Contributors
+
+                                 [Back to Top]
+
+   This table lists the people who have submitted code, those that have
+   tested patches, as well as those that reported issues on the issue tracker
+   that were resolved in this release. For coders, the number is how many of
+   their patches (of any size) were committed into this release. For testers,
+   the number is the number of times their name was listed as assisting with
+   testing a patch. Finally, for reporters, the number is the number of
+   issues that they reported that were affected by commits that went into
+   this release.
+
+   Coders                   Testers                  Reporters                
+   4 George Joseph                                   1 Dmitry Melekhov        
+   1 Joshua Colp            
+
+     ----------------------------------------------------------------------
+
+                                 Closed Issues
+
+                                 [Back to Top]
+
+   This is a list of all issues from the issue tracker that were closed by
+   changes that went into this release.
+
+  Bug
+
+    Category: pjproject/pjsip
+
+   ASTERISK-26349: 13.11.1 res_pjsip/pjsip_distributor.c: Request 'REGISTER'
+   failed
+   Reported by: Dmitry Melekhov
+     * [54a182b3ec] Joshua Colp -- res_pjsip: Only invoke unidentified
+       endpoint logic when unidentified.
+
+     ----------------------------------------------------------------------
+
+                      Commits Not Associated with an Issue
+
+                                 [Back to Top]
+
+   This is a list of all changes that went into this release that did not
+   reference a JIRA issue.
+
+   +------------------------------------------------------------------------+
+   | Revision    | Author    | Summary                                      |
+   |-------------+-----------+----------------------------------------------|
+   | 5d9c842bd2  | gtjoseph  | Release summaries: Remove previous versions  |
+   |-------------+-----------+----------------------------------------------|
+   | a05e4fbcbf  | gtjoseph  | .version: Update for 13.11.2                 |
+   |-------------+-----------+----------------------------------------------|
+   | a017f5d662  | gtjoseph  | .lastclean: Update for 13.11.2               |
+   |-------------+-----------+----------------------------------------------|
+   | ec8e92bdbd  | gtjoseph  | realtime: Add database scripts for 13.11.2   |
+   +------------------------------------------------------------------------+
+
+     ----------------------------------------------------------------------
+
+                                Diffstat Results
+
+                                 [Back to Top]
+
+   This is a summary of the changes to the source code that went into this
+   release that was generated using the diffstat utility.
+
+ asterisk-13.11.1-summary.html |   34 ------------
+ asterisk-13.11.1-summary.txt  |  115 ------------------------------------------
+ b/.version                    |    2
+ 3 files changed, 1 insertion(+), 150 deletions(-)
diff --git a/autoconf/acx_pthread.m4 b/autoconf/acx_pthread.m4
deleted file mode 100644
index b7ee73d..0000000
--- a/autoconf/acx_pthread.m4
+++ /dev/null
@@ -1,243 +0,0 @@
-dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-dnl
-dnl @summary figure out how to build C programs using POSIX threads
-dnl
-dnl This macro figures out how to build C programs using POSIX threads.
-dnl It sets the PTHREAD_LIBS output variable to the threads library and
-dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
-dnl C compiler flags that are needed. (The user can also force certain
-dnl compiler flags/libs to be tested by setting these environment
-dnl variables.)
-dnl
-dnl Also sets PTHREAD_CC to any special C compiler that is needed for
-dnl multi-threaded programs (defaults to the value of CC otherwise).
-dnl (This is necessary on AIX to use the special cc_r compiler alias.)
-dnl
-dnl NOTE: You are assumed to not only compile your program with these
-dnl flags, but also link it with them as well. e.g. you should link
-dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
-dnl $LIBS
-dnl
-dnl If you are only building threads programs, you may wish to use
-dnl these variables in your default LIBS, CFLAGS, and CC:
-dnl
-dnl        LIBS="$PTHREAD_LIBS $LIBS"
-dnl        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-dnl        CC="$PTHREAD_CC"
-dnl
-dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
-dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
-dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-dnl
-dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
-dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
-dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
-dnl default action will define HAVE_PTHREAD.
-dnl
-dnl Please let the authors know if this macro fails on any platform, or
-dnl if you have any other suggestions or comments. This macro was based
-dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
-dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
-dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
-dnl We are also grateful for the helpful feedback of numerous users.
-dnl
-dnl @category InstalledPackages
-dnl @author Steven G. Johnson <stevenj at alum.mit.edu>
-dnl @version 2006-05-29
-dnl @license GPLWithACException
-
-AC_DEFUN([ACX_PTHREAD],
-[
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_SAVE
-AC_LANG_C
-acx_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
-        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
-        AC_MSG_RESULT($acx_pthread_ok)
-        if test x"$acx_pthread_ok" = xno; then
-                PTHREAD_LIBS=""
-                PTHREAD_CFLAGS=""
-        fi
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important.  Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-#       other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-#      doesn't hurt to check since this sometimes defines pthreads too;
-#      also defines -D_REENTRANT)
-#      ... -mt is also the pthreads flag for HP/aCC
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case "${host_cpu}-${host_os}" in
-        *solaris*)
-
-        # On Solaris (at least, for some versions), libc contains stubbed
-        # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
-        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
-        # a function called by this macro, so we could check for that, but
-        # who knows whether they'll stub that too in a future libc.)  So,
-        # we'll just look for -pthreads and -lpthread first:
-
-        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
-        ;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
-        case $flag in
-                none)
-                AC_MSG_CHECKING([whether pthreads work without any flags])
-                ;;
-
-                -*)
-                AC_MSG_CHECKING([whether pthreads work with $flag])
-                PTHREAD_CFLAGS="$flag"
-                ;;
-
-		pthread-config)
-		AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
-		if test x"$acx_pthread_config" = xno; then continue; fi
-		PTHREAD_CFLAGS="`pthread-config --cflags`"
-		PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-		;;
-
-                *)
-                AC_MSG_CHECKING([for the pthreads library -l$flag])
-                PTHREAD_LIBS="-l$flag"
-                ;;
-        esac
-
-        save_LIBS="$LIBS"
-        save_CFLAGS="$CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
-        # Check for various functions.  We must include pthread.h,
-        # since some functions may be macros.  (On the Sequent, we
-        # need a special flag -Kthread to make this header compile.)
-        # We check for pthread_join because it is in -lpthread on IRIX
-        # while pthread_create is in libc.  We check for pthread_attr_init
-        # due to DEC craziness with -lpthreads.  We check for
-        # pthread_cleanup_push because it is one of the few pthread
-        # functions on Solaris that doesn't have a non-functional libc stub.
-        # We try pthread_create on general principles.
-        AC_TRY_LINK([#include <pthread.h>],
-                    [pthread_t th; pthread_join(th, 0);
-                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
-                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
-                    [acx_pthread_ok=yes])
-
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-
-        AC_MSG_RESULT($acx_pthread_ok)
-        if test "x$acx_pthread_ok" = xyes; then
-                break;
-        fi
-
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
-        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
-	AC_MSG_CHECKING([for joinable pthread attribute])
-	attr_name=unknown
-	for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
-	    AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
-                        [attr_name=$attr; break])
-	done
-        AC_MSG_RESULT($attr_name)
-        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
-                               [Define to necessary symbol if this constant
-                                uses a non-standard name on your system.])
-        fi
-
-        AC_MSG_CHECKING([if more special flags are required for pthreads])
-        flag=no
-        case "${host_cpu}-${host_os}" in
-            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
-            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-        esac
-        AC_MSG_RESULT(${flag})
-        if test "x$flag" != xno; then
-            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-        fi
-
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-
-        # More AIX lossage: must compile with xlc_r or cc_r
-	if test x"$GCC" != xyes; then
-          AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
-        else
-          PTHREAD_CC=$CC
-	fi
-else
-        PTHREAD_CC="$CC"
-fi
-
-AC_SUBST(PTHREAD_LIBS)
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_CC)
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
-        :
-else
-        acx_pthread_ok=no
-        $2
-fi
-AC_LANG_RESTORE
-])dnl ACX_PTHREAD
diff --git a/autoconf/ax_pthread.m4 b/autoconf/ax_pthread.m4
new file mode 100644
index 0000000..4c4051e
--- /dev/null
+++ b/autoconf/ax_pthread.m4
@@ -0,0 +1,485 @@
+# ===========================================================================
+#        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+#   This macro figures out how to build C programs using POSIX threads. It
+#   sets the PTHREAD_LIBS output variable to the threads library and linker
+#   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+#   flags that are needed. (The user can also force certain compiler
+#   flags/libs to be tested by setting these environment variables.)
+#
+#   Also sets PTHREAD_CC to any special C compiler that is needed for
+#   multi-threaded programs (defaults to the value of CC otherwise). (This
+#   is necessary on AIX to use the special cc_r compiler alias.)
+#
+#   NOTE: You are assumed to not only compile your program with these flags,
+#   but also to link with them as well. For example, you might link with
+#   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+#   If you are only building threaded programs, you may wish to use these
+#   variables in your default LIBS, CFLAGS, and CC:
+#
+#     LIBS="$PTHREAD_LIBS $LIBS"
+#     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+#     CC="$PTHREAD_CC"
+#
+#   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+#   has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
+#   that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+#   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+#   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
+#   PTHREAD_CFLAGS.
+#
+#   ACTION-IF-FOUND is a list of shell commands to run if a threads library
+#   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+#   is not found. If ACTION-IF-FOUND is not specified, the default action
+#   will define HAVE_PTHREAD.
+#
+#   Please let the authors know if this macro fails on any platform, or if
+#   you have any other suggestions or comments. This macro was based on work
+#   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+#   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+#   Alejandro Forero Cuervo to the autoconf macro repository. We are also
+#   grateful for the helpful feedback of numerous users.
+#
+#   Updated for Autoconf 2.68 by Daniel Richard G.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Steven G. Johnson <stevenj at alum.mit.edu>
+#   Copyright (c) 2011 Daniel Richard G. <skunk at iSKUNK.ORG>
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 23
+
+AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
+AC_DEFUN([AX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_SED])
+AC_LANG_PUSH([C])
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on Tru64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
+        ax_pthread_save_CC="$CC"
+        ax_pthread_save_CFLAGS="$CFLAGS"
+        ax_pthread_save_LIBS="$LIBS"
+        AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
+        AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
+        AC_MSG_RESULT([$ax_pthread_ok])
+        if test "x$ax_pthread_ok" = "xno"; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        CC="$ax_pthread_save_CC"
+        CFLAGS="$ax_pthread_save_CFLAGS"
+        LIBS="$ax_pthread_save_LIBS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
+#           (Note: HP C rejects this with "bad form for `-t' option")
+# -pthreads: Solaris/gcc (Note: HP C also rejects)
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads and
+#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
+#      is present but should not be used directly; and before -mthreads,
+#      because the compiler interprets this as "-mt" + "-hreads")
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case $host_os in
+
+        freebsd*)
+
+        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+
+        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
+        ;;
+
+        hpux*)
+
+        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
+        # multi-threading and also sets -lpthread."
+
+        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
+        ;;
+
+        openedition*)
+
+        # IBM z/OS requires a feature-test macro to be defined in order to
+        # enable POSIX threads at all, so give the user a hint if this is
+        # not set. (We don't define these ourselves, as they can affect
+        # other portions of the system API in unpredictable ways.)
+
+        AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
+            [
+#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
+             AX_PTHREAD_ZOS_MISSING
+#            endif
+            ],
+            [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
+        ;;
+
+        solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed. (N.B.: The stubs are missing
+        # pthread_cleanup_push, or rather a function called by this macro,
+        # so we could check for that, but who knows whether they'll stub
+        # that too in a future libc.)  So we'll check first for the
+        # standard Solaris way of linking pthreads (-mt -lpthread).
+
+        ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
+        ;;
+esac
+
+# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
+
+AS_IF([test "x$GCC" = "xyes"],
+      [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"])
+
+# The presence of a feature test macro requesting re-entrant function
+# definitions is, on some systems, a strong hint that pthreads support is
+# correctly enabled
+
+case $host_os in
+        darwin* | hpux* | linux* | osf* | solaris*)
+        ax_pthread_check_macro="_REENTRANT"
+        ;;
+
+        aix*)
+        ax_pthread_check_macro="_THREAD_SAFE"
+        ;;
+
+        *)
+        ax_pthread_check_macro="--"
+        ;;
+esac
+AS_IF([test "x$ax_pthread_check_macro" = "x--"],
+      [ax_pthread_check_cond=0],
+      [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
+
+# Are we compiling with Clang?
+
+AC_CACHE_CHECK([whether $CC is Clang],
+    [ax_cv_PTHREAD_CLANG],
+    [ax_cv_PTHREAD_CLANG=no
+     # Note that Autoconf sets GCC=yes for Clang as well as GCC
+     if test "x$GCC" = "xyes"; then
+        AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
+            [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
+#            if defined(__clang__) && defined(__llvm__)
+             AX_PTHREAD_CC_IS_CLANG
+#            endif
+            ],
+            [ax_cv_PTHREAD_CLANG=yes])
+     fi
+    ])
+ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
+
+ax_pthread_clang_warning=no
+
+# Clang needs special handling, because older versions handle the -pthread
+# option in a rather... idiosyncratic way
+
+if test "x$ax_pthread_clang" = "xyes"; then
+
+        # Clang takes -pthread; it has never supported any other flag
+
+        # (Note 1: This will need to be revisited if a system that Clang
+        # supports has POSIX threads in a separate library.  This tends not
+        # to be the way of modern systems, but it's conceivable.)
+
+        # (Note 2: On some systems, notably Darwin, -pthread is not needed
+        # to get POSIX threads support; the API is always present and
+        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
+        # -pthread does define _REENTRANT, and while the Darwin headers
+        # ignore this macro, third-party headers might not.)
+
+        PTHREAD_CFLAGS="-pthread"
+        PTHREAD_LIBS=
+
+        ax_pthread_ok=yes
+
+        # However, older versions of Clang make a point of warning the user
+        # that, in an invocation where only linking and no compilation is
+        # taking place, the -pthread option has no effect ("argument unused
+        # during compilation").  They expect -pthread to be passed in only
+        # when source code is being compiled.
+        #
+        # Problem is, this is at odds with the way Automake and most other
+        # C build frameworks function, which is that the same flags used in
+        # compilation (CFLAGS) are also used in linking.  Many systems
+        # supported by AX_PTHREAD require exactly this for POSIX threads
+        # support, and in fact it is often not straightforward to specify a
+        # flag that is used only in the compilation phase and not in
+        # linking.  Such a scenario is extremely rare in practice.
+        #
+        # Even though use of the -pthread flag in linking would only print
+        # a warning, this can be a nuisance for well-run software projects
+        # that build with -Werror.  So if the active version of Clang has
+        # this misfeature, we search for an option to squash it.
+
+        AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
+            [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
+            [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
+             # Create an alternate version of $ac_link that compiles and
+             # links in two steps (.c -> .o, .o -> exe) instead of one
+             # (.c -> exe), because the warning occurs only in the second
+             # step
+             ax_pthread_save_ac_link="$ac_link"
+             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
+             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
+             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
+             ax_pthread_save_CFLAGS="$CFLAGS"
+             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
+                AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
+                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
+                ac_link="$ax_pthread_save_ac_link"
+                AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
+                    [ac_link="$ax_pthread_2step_ac_link"
+                     AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
+                         [break])
+                    ])
+             done
+             ac_link="$ax_pthread_save_ac_link"
+             CFLAGS="$ax_pthread_save_CFLAGS"
+             AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
+             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
+            ])
+
+        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
+                no | unknown) ;;
+                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
+        esac
+
+fi # $ax_pthread_clang = yes
+
+if test "x$ax_pthread_ok" = "xno"; then
+for ax_pthread_try_flag in $ax_pthread_flags; do
+
+        case $ax_pthread_try_flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                -mt,pthread)
+                AC_MSG_CHECKING([whether pthreads work with -mt -lpthread])
+                PTHREAD_CFLAGS="-mt"
+                PTHREAD_LIBS="-lpthread"
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
+                PTHREAD_CFLAGS="$ax_pthread_try_flag"
+                ;;
+
+                pthread-config)
+                AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
+                AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
+                PTHREAD_CFLAGS="`pthread-config --cflags`"
+                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+                ;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
+                PTHREAD_LIBS="-l$ax_pthread_try_flag"
+                ;;
+        esac
+
+        ax_pthread_save_CFLAGS="$CFLAGS"
+        ax_pthread_save_LIBS="$LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
+#                       if $ax_pthread_check_cond
+#                        error "$ax_pthread_check_macro must be defined"
+#                       endif
+                        static void routine(void *a) { a = 0; }
+                        static void *start_routine(void *a) { return a; }],
+                       [pthread_t th; pthread_attr_t attr;
+                        pthread_create(&th, 0, start_routine, 0);
+                        pthread_join(th, 0);
+                        pthread_attr_init(&attr);
+                        pthread_cleanup_push(routine, 0);
+                        pthread_cleanup_pop(0) /* ; */])],
+            [ax_pthread_ok=yes],
+            [])
+
+        CFLAGS="$ax_pthread_save_CFLAGS"
+        LIBS="$ax_pthread_save_LIBS"
+
+        AC_MSG_RESULT([$ax_pthread_ok])
+        AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$ax_pthread_ok" = "xyes"; then
+        ax_pthread_save_CFLAGS="$CFLAGS"
+        ax_pthread_save_LIBS="$LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+        AC_CACHE_CHECK([for joinable pthread attribute],
+            [ax_cv_PTHREAD_JOINABLE_ATTR],
+            [ax_cv_PTHREAD_JOINABLE_ATTR=unknown
+             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+                 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+                                                 [int attr = $ax_pthread_attr; return attr /* ; */])],
+                                [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
+                                [])
+             done
+            ])
+        AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
+               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
+               test "x$ax_pthread_joinable_attr_defined" != "xyes"],
+              [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
+                                  [$ax_cv_PTHREAD_JOINABLE_ATTR],
+                                  [Define to necessary symbol if this constant
+                                   uses a non-standard name on your system.])
+               ax_pthread_joinable_attr_defined=yes
+              ])
+
+        AC_CACHE_CHECK([whether more special flags are required for pthreads],
+            [ax_cv_PTHREAD_SPECIAL_FLAGS],
+            [ax_cv_PTHREAD_SPECIAL_FLAGS=no
+             case $host_os in
+             solaris*)
+             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
+             ;;
+             esac
+            ])
+        AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
+               test "x$ax_pthread_special_flags_added" != "xyes"],
+              [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
+               ax_pthread_special_flags_added=yes])
+
+        AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
+            [ax_cv_PTHREAD_PRIO_INHERIT],
+            [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
+                                             [[int i = PTHREAD_PRIO_INHERIT;]])],
+                            [ax_cv_PTHREAD_PRIO_INHERIT=yes],
+                            [ax_cv_PTHREAD_PRIO_INHERIT=no])
+            ])
+        AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
+               test "x$ax_pthread_prio_inherit_defined" != "xyes"],
+              [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
+               ax_pthread_prio_inherit_defined=yes
+              ])
+
+        CFLAGS="$ax_pthread_save_CFLAGS"
+        LIBS="$ax_pthread_save_LIBS"
+
+        # More AIX lossage: compile with *_r variant
+        if test "x$GCC" != "xyes"; then
+            case $host_os in
+                aix*)
+                AS_CASE(["x/$CC"],
+                    [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
+                    [#handle absolute path differently from PATH based program lookup
+                     AS_CASE(["x$CC"],
+                         [x/*],
+                         [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
+                         [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
+                ;;
+            esac
+        fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+AC_SUBST([PTHREAD_LIBS])
+AC_SUBST([PTHREAD_CFLAGS])
+AC_SUBST([PTHREAD_CC])
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test "x$ax_pthread_ok" = "xyes"; then
+        ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
+        :
+else
+        ax_pthread_ok=no
+        $2
+fi
+AC_LANG_POP
+])dnl AX_PTHREAD
diff --git a/autoconf/libcurl.m4 b/autoconf/libcurl.m4
index 085ee0e..9a31bfc 100644
--- a/autoconf/libcurl.m4
+++ b/autoconf/libcurl.m4
@@ -1,3 +1,24 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2006, David Shaw <dshaw at jabberwocky.com>
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+###########################################################################
 # LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
 #                       [ACTION-IF-YES], [ACTION-IF-NO])
 # ----------------------------------------------------------
@@ -55,10 +76,14 @@ AC_DEFUN([AST_LIBCURL_CHECK_CONFIG],
   AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
   AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT])
   AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
+  AH_TEMPLATE([LIBCURL_PROTOCOL_RTSP],[Defined if libcurl supports RTSP])
+  AH_TEMPLATE([LIBCURL_PROTOCOL_POP3],[Defined if libcurl supports POP3])
+  AH_TEMPLATE([LIBCURL_PROTOCOL_IMAP],[Defined if libcurl supports IMAP])
+  AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP])
   AC_SUBST(PBX_CURL)
 
   AC_ARG_WITH(libcurl,
-     AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
+     AS_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]),
      [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
 
   if test "$_libcurl_with" != "no" ; then
@@ -72,10 +97,10 @@ AC_DEFUN([AST_LIBCURL_CHECK_CONFIG],
      if test -d "$_libcurl_with" ; then
         CURL_INCLUDE="-I$withval/include"
         _libcurl_ldflags="-L$withval/lib"
-        AC_PATH_PROG([_libcurl_config],[curl-config],["$withval/bin"],
+        AC_PATH_PROG([_libcurl_config],[curl-config],[],
                      ["$withval/bin"])
      else
-        AC_PATH_PROG([_libcurl_config],[curl-config])
+        AC_PATH_PROG([_libcurl_config],[curl-config],[],[$PATH])
      fi
 
      if test x$_libcurl_config != "x" ; then
@@ -143,18 +168,19 @@ AC_DEFUN([AST_LIBCURL_CHECK_CONFIG],
            _libcurl_save_libs=$LIBS
            LIBS="$CURL_LIB $LIBS"
 
-           AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <curl/curl.h>],[
+           AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curl/curl.h>]],[[
 /* Try and use a few common options to force a failure if we are
    missing symbols or can't link. */
 int x;
 curl_easy_setopt(NULL,CURLOPT_URL,NULL);
 x=CURL_ERROR_SIZE;
 x=CURLOPT_WRITEFUNCTION;
-x=CURLOPT_FILE;
+x=CURLOPT_WRITEDATA;
 x=CURLOPT_ERRORBUFFER;
 x=CURLOPT_STDERR;
 x=CURLOPT_VERBOSE;
-])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
+if (x) {;}
+]])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
 
            CPPFLAGS=$_libcurl_save_cppflags
            LIBS=$_libcurl_save_libs
@@ -196,17 +222,23 @@ x=CURLOPT_VERBOSE;
 
               # We don't have --protocols, so just assume that all
               # protocols are available
-              _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
+              _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
 
               if test x$libcurl_feature_SSL = xyes ; then
                  _libcurl_protocols="$_libcurl_protocols HTTPS"
 
                  # FTPS wasn't standards-compliant until version
-                 # 7.11.0
+                 # 7.11.0 (0x070b00 == 461568)
                  if test $_libcurl_version -ge 461568; then
                     _libcurl_protocols="$_libcurl_protocols FTPS"
                  fi
               fi
+
+              # RTSP, IMAP, POP3 and SMTP were added in
+              # 7.20.0 (0x071400 == 463872)
+              if test $_libcurl_version -ge 463872; then
+                 _libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP"
+              fi
            fi
 
            for _libcurl_protocol in $_libcurl_protocols ; do
@@ -241,4 +273,3 @@ x=CURLOPT_VERBOSE;
 
   unset _libcurl_with
 ])dnl
-
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index e9d0b5b..b01fe89 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -1696,26 +1696,28 @@ static void my_handle_dtmf(void *pvt, struct ast_channel *ast, enum analog_sub a
 				if (strcmp(ast_channel_exten(ast), "fax")) {
 					const char *target_context = S_OR(ast_channel_macrocontext(ast), ast_channel_context(ast));
 
-					/* We need to unlock 'ast' here because ast_exists_extension has the
+					/*
+					 * We need to unlock 'ast' here because ast_exists_extension has the
 					 * potential to start autoservice on the channel. Such action is prone
-					 * to deadlock.
+					 * to deadlock if the channel is locked.
+					 *
+					 * ast_async_goto() has its own restriction on not holding the
+					 * channel lock.
 					 */
 					ast_mutex_unlock(&p->lock);
 					ast_channel_unlock(ast);
 					if (ast_exists_extension(ast, target_context, "fax", 1,
 						S_COR(ast_channel_caller(ast)->id.number.valid, ast_channel_caller(ast)->id.number.str, NULL))) {
-						ast_channel_lock(ast);
-						ast_mutex_lock(&p->lock);
 						ast_verb(3, "Redirecting %s to fax extension\n", ast_channel_name(ast));
 						/* Save the DID/DNIS when we transfer the fax call to a "fax" extension */
 						pbx_builtin_setvar_helper(ast, "FAXEXTEN", ast_channel_exten(ast));
 						if (ast_async_goto(ast, target_context, "fax", 1))
 							ast_log(LOG_WARNING, "Failed to async goto '%s' into fax of '%s'\n", ast_channel_name(ast), target_context);
 					} else {
-						ast_channel_lock(ast);
-						ast_mutex_lock(&p->lock);
 						ast_log(LOG_NOTICE, "Fax detected, but no fax extension\n");
 					}
+					ast_channel_lock(ast);
+					ast_mutex_lock(&p->lock);
 				} else {
 					ast_debug(1, "Already in a fax extension, not redirecting\n");
 				}
@@ -2348,7 +2350,6 @@ static void my_pri_ss7_open_media(void *p)
 
 	if (pvt->dsp_features && pvt->dsp) {
 		ast_dsp_set_features(pvt->dsp, pvt->dsp_features);
-		pvt->dsp_features = 0;
 	}
 }
 #endif	/* defined(HAVE_PRI) || defined(HAVE_SS7) */
@@ -7203,26 +7204,28 @@ static void dahdi_handle_dtmf(struct ast_channel *ast, int idx, struct ast_frame
 				if (strcmp(ast_channel_exten(ast), "fax")) {
 					const char *target_context = S_OR(ast_channel_macrocontext(ast), ast_channel_context(ast));
 
-					/* We need to unlock 'ast' here because ast_exists_extension has the
+					/*
+					 * We need to unlock 'ast' here because ast_exists_extension has the
 					 * potential to start autoservice on the channel. Such action is prone
-					 * to deadlock.
+					 * to deadlock if the channel is locked.
+					 *
+					 * ast_async_goto() has its own restriction on not holding the
+					 * channel lock.
 					 */
 					ast_mutex_unlock(&p->lock);
 					ast_channel_unlock(ast);
 					if (ast_exists_extension(ast, target_context, "fax", 1,
 						S_COR(ast_channel_caller(ast)->id.number.valid, ast_channel_caller(ast)->id.number.str, NULL))) {
-						ast_channel_lock(ast);
-						ast_mutex_lock(&p->lock);
 						ast_verb(3, "Redirecting %s to fax extension\n", ast_channel_name(ast));
 						/* Save the DID/DNIS when we transfer the fax call to a "fax" extension */
 						pbx_builtin_setvar_helper(ast, "FAXEXTEN", ast_channel_exten(ast));
 						if (ast_async_goto(ast, target_context, "fax", 1))
 							ast_log(LOG_WARNING, "Failed to async goto '%s' into fax of '%s'\n", ast_channel_name(ast), target_context);
 					} else {
-						ast_channel_lock(ast);
-						ast_mutex_lock(&p->lock);
 						ast_log(LOG_NOTICE, "Fax detected, but no fax extension\n");
 					}
+					ast_channel_lock(ast);
+					ast_mutex_lock(&p->lock);
 				} else {
 					ast_debug(1, "Already in a fax extension, not redirecting\n");
 				}
@@ -8643,6 +8646,15 @@ static struct ast_frame *dahdi_read(struct ast_channel *ast)
 		/* Perform busy detection etc on the dahdi line */
 		int mute;
 
+		if ((p->dsp_features & DSP_FEATURE_FAX_DETECT)
+			&& p->faxdetect_timeout
+			&& p->faxdetect_timeout <= ast_channel_get_up_time(ast)) {
+			p->dsp_features &= ~DSP_FEATURE_FAX_DETECT;
+			ast_dsp_set_features(p->dsp, p->dsp_features);
+			ast_debug(1, "Channel driver fax CNG detection timeout on %s\n",
+				ast_channel_name(ast));
+		}
+
 		f = ast_dsp_process(ast, p->dsp, &p->subs[idx].f);
 
 		/* Check if DSP code thinks we should be muting this frame and mute the conference if so */
@@ -12542,6 +12554,7 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
 		tmp->callprogress = conf->chan.callprogress;
 		tmp->waitfordialtone = conf->chan.waitfordialtone;
 		tmp->dialtone_detect = conf->chan.dialtone_detect;
+		tmp->faxdetect_timeout = conf->chan.faxdetect_timeout;
 		tmp->cancallforward = conf->chan.cancallforward;
 		tmp->dtmfrelax = conf->chan.dtmfrelax;
 		tmp->callwaiting = tmp->permcallwaiting;
@@ -17793,6 +17806,10 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
 				confp->chan.callprogress |= CALLPROGRESS_FAX_OUTGOING;
 			} else if (!strcasecmp(v->value, "both") || ast_true(v->value))
 				confp->chan.callprogress |= CALLPROGRESS_FAX_INCOMING | CALLPROGRESS_FAX_OUTGOING;
+		} else if (!strcasecmp(v->name, "faxdetect_timeout")) {
+			if (sscanf(v->value, "%30u", &confp->chan.faxdetect_timeout) != 1) {
+				confp->chan.faxdetect_timeout = 0;
+			}
 		} else if (!strcasecmp(v->name, "echocancel")) {
 			process_echocancel(confp, v->value, v->lineno);
 		} else if (!strcasecmp(v->name, "echotraining")) {
diff --git a/channels/chan_dahdi.h b/channels/chan_dahdi.h
index 4bb5d19..ab5c1eb 100644
--- a/channels/chan_dahdi.h
+++ b/channels/chan_dahdi.h
@@ -612,6 +612,11 @@ struct dahdi_pvt {
 	 */
 	int dialtone_detect;
 	int dialtone_scanning_time_elapsed;	/*!< Amount of audio scanned for dialtone, in frames */
+	/*!
+	 * \brief The number of seconds into call to disable fax detection.  (0 = disabled)
+	 * \note Set from the "faxdetect_timeout" value read in from chan_dahdi.conf
+	 */
+	unsigned int faxdetect_timeout;
 	struct timeval waitingfordt;			/*!< Time we started waiting for dialtone */
 	struct timeval flashtime;			/*!< Last flash-hook time */
 	/*! \brief Opaque DSP configuration structure. */
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 970fef4..98b4cf8 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -612,10 +612,12 @@ static struct ast_frame *chan_pjsip_cng_tone_detected(struct ast_sip_session *se
 {
 	const char *target_context;
 	int exists;
+	int dsp_features;
 
-	/* If we only needed this DSP for fax detection purposes we can just drop it now */
-	if (session->endpoint->dtmf == AST_SIP_DTMF_INBAND || session->endpoint->dtmf == AST_SIP_DTMF_AUTO) {
-		ast_dsp_set_features(session->dsp, DSP_FEATURE_DIGIT_DETECT);
+	dsp_features = ast_dsp_get_features(session->dsp);
+	dsp_features &= ~DSP_FEATURE_FAX_DETECT;
+	if (dsp_features) {
+		ast_dsp_set_features(session->dsp, dsp_features);
 	} else {
 		ast_dsp_free(session->dsp);
 		session->dsp = NULL;
@@ -628,16 +630,19 @@ static struct ast_frame *chan_pjsip_cng_tone_detected(struct ast_sip_session *se
 
 	target_context = S_OR(ast_channel_macrocontext(session->channel), ast_channel_context(session->channel));
 
-	/* We need to unlock the channel here because ast_exists_extension has the
+	/*
+	 * We need to unlock the channel here because ast_exists_extension has the
 	 * potential to start and stop an autoservice on the channel. Such action
 	 * is prone to deadlock if the channel is locked.
+	 *
+	 * ast_async_goto() has its own restriction on not holding the channel lock.
 	 */
 	ast_channel_unlock(session->channel);
+	ast_frfree(f);
+	f = &ast_null_frame;
 	exists = ast_exists_extension(session->channel, target_context, "fax", 1,
 		S_COR(ast_channel_caller(session->channel)->id.number.valid,
 			ast_channel_caller(session->channel)->id.number.str, NULL));
-	ast_channel_lock(session->channel);
-
 	if (exists) {
 		ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n",
 			ast_channel_name(session->channel));
@@ -646,12 +651,11 @@ static struct ast_frame *chan_pjsip_cng_tone_detected(struct ast_sip_session *se
 			ast_log(LOG_ERROR, "Failed to async goto '%s' into fax extension in '%s'\n",
 				ast_channel_name(session->channel), target_context);
 		}
-		ast_frfree(f);
-		f = &ast_null_frame;
 	} else {
 		ast_log(LOG_NOTICE, "FAX CNG detected on '%s' but no fax extension in '%s'\n",
 			ast_channel_name(session->channel), target_context);
 	}
+	ast_channel_lock(session->channel);
 
 	return f;
 }
@@ -660,6 +664,7 @@ static struct ast_frame *chan_pjsip_cng_tone_detected(struct ast_sip_session *se
 static struct ast_frame *chan_pjsip_read(struct ast_channel *ast)
 {
 	struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
+	struct ast_sip_session *session;
 	struct chan_pjsip_pvt *pvt = channel->pvt;
 	struct ast_frame *f;
 	struct ast_sip_session_media *media = NULL;
@@ -697,22 +702,42 @@ static struct ast_frame *chan_pjsip_read(struct ast_channel *ast)
 		return f;
 	}
 
-	if (ast_format_cap_iscompatible_format(channel->session->endpoint->media.codecs, f->subclass.format) == AST_FORMAT_CMP_NOT_EQUAL) {
+	session = channel->session;
+
+	if (ast_format_cap_iscompatible_format(session->endpoint->media.codecs, f->subclass.format) == AST_FORMAT_CMP_NOT_EQUAL) {
 		ast_debug(1, "Oooh, got a frame with format of %s on channel '%s' when endpoint '%s' is not configured for it\n",
 			ast_format_get_name(f->subclass.format), ast_channel_name(ast),
-			ast_sorcery_object_get_id(channel->session->endpoint));
+			ast_sorcery_object_get_id(session->endpoint));
 
 		ast_frfree(f);
 		return &ast_null_frame;
 	}
 
-	if (channel->session->dsp) {
-		f = ast_dsp_process(ast, channel->session->dsp, f);
+	if (session->dsp) {
+		int dsp_features;
 
+		dsp_features = ast_dsp_get_features(session->dsp);
+		if ((dsp_features & DSP_FEATURE_FAX_DETECT)
+			&& session->endpoint->faxdetect_timeout
+			&& session->endpoint->faxdetect_timeout <= ast_channel_get_up_time(ast)) {
+			dsp_features &= ~DSP_FEATURE_FAX_DETECT;
+			if (dsp_features) {
+				ast_dsp_set_features(session->dsp, dsp_features);
+			} else {
+				ast_dsp_free(session->dsp);
+				session->dsp = NULL;
+			}
+			ast_debug(3, "Channel driver fax CNG detection timeout on %s\n",
+				ast_channel_name(ast));
+		}
+	}
+	if (session->dsp) {
+		f = ast_dsp_process(ast, session->dsp, f);
 		if (f && (f->frametype == AST_FRAME_DTMF)) {
 			if (f->subclass.integer == 'f') {
-				ast_debug(3, "Fax CNG detected on %s\n", ast_channel_name(ast));
-				f = chan_pjsip_cng_tone_detected(channel->session, f);
+				ast_debug(3, "Channel driver fax CNG detected on %s\n",
+					ast_channel_name(ast));
+				f = chan_pjsip_cng_tone_detected(session, f);
 			} else {
 				ast_debug(3, "* Detected inband DTMF '%c' on '%s'\n", f->subclass.integer,
 					ast_channel_name(ast));
@@ -1417,7 +1442,8 @@ static void transfer_redirect(struct ast_sip_session *session, const char *targe
 	pjsip_contact_hdr *contact;
 	pj_str_t tmp;
 
-	if (pjsip_inv_end_session(session->inv_session, 302, NULL, &packet) != PJ_SUCCESS) {
+	if (pjsip_inv_end_session(session->inv_session, 302, NULL, &packet) != PJ_SUCCESS
+		|| !packet) {
 		ast_log(LOG_WARNING, "Failed to redirect PJSIP session for channel %s\n",
 			ast_channel_name(session->channel));
 		message = AST_TRANSFER_FAILED;
@@ -2182,7 +2208,8 @@ static int chan_pjsip_incoming_request(struct ast_sip_session *session, struct p
 	ast_sip_session_add_datastore(session, datastore);
 
 	if (!(session->channel = chan_pjsip_new(session, AST_STATE_RING, session->exten, NULL, NULL, NULL, NULL))) {
-		if (pjsip_inv_end_session(session->inv_session, 503, NULL, &packet) == PJ_SUCCESS) {
+		if (pjsip_inv_end_session(session->inv_session, 503, NULL, &packet) == PJ_SUCCESS
+			&& packet) {
 			ast_sip_session_send_response(session, packet);
 		}
 
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 16a28fe..8cbc3a1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4200,19 +4200,6 @@ static enum sip_result __sip_reliable_xmit(struct sip_pvt *p, uint32_t seqno, in
 		p->pendinginvite = seqno;
 	}
 
-	/* If the transport is something reliable (TCP or TLS) then don't really send this reliably */
-	/* I removed the code from retrans_pkt that does the same thing so it doesn't get loaded into the scheduler */
-	/*! \todo According to the RFC some packets need to be retransmitted even if its TCP, so this needs to get revisited */
-	if (!(p->socket.type & AST_TRANSPORT_UDP)) {
-		xmitres = __sip_xmit(p, data);	/* Send packet */
-		if (xmitres == XMIT_ERROR) {	/* Serious network trouble, no need to try again */
-			append_history(p, "XmitErr", "%s", fatal ? "(Critical)" : "(Non-critical)");
-			return AST_FAILURE;
-		} else {
-			return AST_SUCCESS;
-		}
-	}
-
 	pkt = ao2_alloc_options(sizeof(*pkt), sip_pkt_dtor, AO2_ALLOC_OPT_LOCK_NOLOCK);
 	if (!pkt) {
 		return AST_FAILURE;
@@ -4249,6 +4236,10 @@ static enum sip_result __sip_reliable_xmit(struct sip_pvt *p, uint32_t seqno, in
 	pkt->time_sent = ast_tvnow(); /* time packet was sent */
 	pkt->retrans_stop_time = 64 * (pkt->timer_t1 ? pkt->timer_t1 : DEFAULT_TIMER_T1); /* time in ms after pkt->time_sent to stop retransmission */
 
+	if (!(p->socket.type & AST_TRANSPORT_UDP)) {
+		pkt->retrans_stop = 1;
+	}
+
 	/* Schedule retransmission */
 	ao2_t_ref(pkt, +1, "Schedule packet retransmission");
 	pkt->retransid = ast_sched_add_variable(sched, siptimer_a, retrans_pkt, pkt, 1);
@@ -5878,6 +5869,38 @@ static void copy_socket_data(struct sip_socket *to_sock, const struct sip_socket
 	*to_sock = *from_sock;
 }
 
+/*! Cleanup the RTP and SRTP portions of a dialog
+ *
+ * \note This procedure excludes vsrtp as it is initialized differently.
+ */
+static void dialog_clean_rtp(struct sip_pvt *p)
+{
+	if (p->rtp) {
+		ast_rtp_instance_destroy(p->rtp);
+		p->rtp = NULL;
+	}
+
+	if (p->vrtp) {
+		ast_rtp_instance_destroy(p->vrtp);
+		p->vrtp = NULL;
+	}
+
+	if (p->trtp) {
+		ast_rtp_instance_destroy(p->trtp);
+		p->trtp = NULL;
+	}
+
+	if (p->srtp) {
+		ast_sdp_srtp_destroy(p->srtp);
+		p->srtp = NULL;
+	}
+
+	if (p->tsrtp) {
+		ast_sdp_srtp_destroy(p->tsrtp);
+		p->tsrtp = NULL;
+	}
+}
+
 /*! \brief Initialize DTLS-SRTP support on an RTP instance */
 static int dialog_initialize_dtls_srtp(const struct sip_pvt *dialog, struct ast_rtp_instance *rtp, struct ast_sdp_srtp **srtp)
 {
@@ -5925,6 +5948,9 @@ static int dialog_initialize_rtp(struct sip_pvt *dialog)
 		return 0;
 	}
 
+	/* Make sure previous RTP instances/FD's do not leak */
+	dialog_clean_rtp(dialog);
+
 	ast_sockaddr_copy(&bindaddr_tmp, &bindaddr);
 	if (!(dialog->rtp = ast_rtp_instance_new(dialog->engine, sched, &bindaddr_tmp, NULL))) {
 		return -1;
@@ -6601,18 +6627,10 @@ static void sip_pvt_dtor(void *vdoomed)
 		ast_free(p->notify);
 		p->notify = NULL;
 	}
-	if (p->rtp) {
-		ast_rtp_instance_destroy(p->rtp);
-		p->rtp = NULL;
-	}
-	if (p->vrtp) {
-		ast_rtp_instance_destroy(p->vrtp);
-		p->vrtp = NULL;
-	}
-	if (p->trtp) {
-		ast_rtp_instance_destroy(p->trtp);
-		p->trtp = NULL;
-	}
+
+	/* Free RTP and SRTP instances */
+	dialog_clean_rtp(p);
+
 	if (p->udptl) {
 		ast_udptl_destroy(p->udptl);
 		p->udptl = NULL;
@@ -6645,21 +6663,11 @@ static void sip_pvt_dtor(void *vdoomed)
 
 	destroy_msg_headers(p);
 
-	if (p->srtp) {
-		ast_sdp_srtp_destroy(p->srtp);
-		p->srtp = NULL;
-	}
-
 	if (p->vsrtp) {
 		ast_sdp_srtp_destroy(p->vsrtp);
 		p->vsrtp = NULL;
 	}
 
-	if (p->tsrtp) {
-		ast_sdp_srtp_destroy(p->tsrtp);
-		p->tsrtp = NULL;
-	}
-
 	if (p->directmediaacl) {
 		p->directmediaacl = ast_free_acl_list(p->directmediaacl);
 	}
@@ -7665,7 +7673,8 @@ static int interpret_t38_parameters(struct sip_pvt *p, const struct ast_control_
 			ast_udptl_set_local_max_ifp(p->udptl, p->t38.our_parms.max_ifp);
 			change_t38_state(p, T38_ENABLED);
 			transmit_response_with_t38_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL);
-		} else if (p->t38.state != T38_ENABLED) {
+		} else if ((p->t38.state != T38_ENABLED) || ((p->t38.state == T38_ENABLED) &&
+				(parameters->request_response == AST_T38_REQUEST_NEGOTIATE))) {
 			p->t38.our_parms = *parameters;
 			ast_udptl_set_local_max_ifp(p->udptl, p->t38.our_parms.max_ifp);
 			change_t38_state(p, T38_LOCAL_REINVITE);
@@ -8604,29 +8613,31 @@ static struct ast_frame *sip_read(struct ast_channel *ast)
 	if (faxdetected && ast_test_flag(&p->flags[1], SIP_PAGE2_FAX_DETECT_CNG)) {
 		if (strcmp(ast_channel_exten(ast), "fax")) {
 			const char *target_context = S_OR(ast_channel_macrocontext(ast), ast_channel_context(ast));
-			/* We need to unlock 'ast' here because
+			/*
+			 * We need to unlock 'ast' here because
 			 * ast_exists_extension has the potential to start and
 			 * stop an autoservice on the channel. Such action is
 			 * prone to deadlock if the channel is locked.
+			 *
+			 * ast_async_goto() has its own restriction on not holding
+			 * the channel lock.
 			 */
 			sip_pvt_unlock(p);
 			ast_channel_unlock(ast);
+			ast_frfree(fr);
+			fr = &ast_null_frame;
 			if (ast_exists_extension(ast, target_context, "fax", 1,
 				S_COR(ast_channel_caller(ast)->id.number.valid, ast_channel_caller(ast)->id.number.str, NULL))) {
-				ast_channel_lock(ast);
-				sip_pvt_lock(p);
 				ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n", ast_channel_name(ast));
 				pbx_builtin_setvar_helper(ast, "FAXEXTEN", ast_channel_exten(ast));
 				if (ast_async_goto(ast, target_context, "fax", 1)) {
 					ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", ast_channel_name(ast), target_context);
 				}
-				ast_frfree(fr);
-				fr = &ast_null_frame;
 			} else {
-				ast_channel_lock(ast);
-				sip_pvt_lock(p);
 				ast_log(LOG_NOTICE, "FAX CNG detected but no fax extension\n");
 			}
+			ast_channel_lock(ast);
+			sip_pvt_lock(p);
 		}
 	}
 
@@ -11332,25 +11343,7 @@ static int process_sdp_a_audio(const char *a, struct sip_pvt *p, struct ast_rtp_
 				ast_rtp_codecs_payloads_unset(newaudiortp, NULL, codec);
 			}
 
-			if (ast_format_cmp(format, ast_format_siren7) == AST_FORMAT_CMP_EQUAL) {
-				if (sscanf(fmtp_string, "bitrate=%30u", &bit_rate) == 1) {
-					if (bit_rate != 32000) {
-						ast_log(LOG_WARNING, "Got Siren7 offer at %u bps, but only 32000 bps supported; ignoring.\n", bit_rate);
-						ast_rtp_codecs_payloads_unset(newaudiortp, NULL, codec);
-					} else {
-						found = TRUE;
-					}
-				}
-			} else if (ast_format_cmp(format, ast_format_siren14) == AST_FORMAT_CMP_EQUAL) {
-				if (sscanf(fmtp_string, "bitrate=%30u", &bit_rate) == 1) {
-					if (bit_rate != 48000) {
-						ast_log(LOG_WARNING, "Got Siren14 offer at %u bps, but only 48000 bps supported; ignoring.\n", bit_rate);
-						ast_rtp_codecs_payloads_unset(newaudiortp, NULL, codec);
-					} else {
-						found = TRUE;
-					}
-				}
-			} else if (ast_format_cmp(format, ast_format_g719) == AST_FORMAT_CMP_EQUAL) {
+			if (ast_format_cmp(format, ast_format_g719) == AST_FORMAT_CMP_EQUAL) {
 				if (sscanf(fmtp_string, "bitrate=%30u", &bit_rate) == 1) {
 					if (bit_rate != 64000) {
 						ast_log(LOG_WARNING, "Got G.719 offer at %u bps, but only 64000 bps supported; ignoring.\n", bit_rate);
@@ -13009,12 +13002,6 @@ static void add_codec_to_sdp(const struct sip_pvt *p,
 	} else if (ast_format_cmp(format, ast_format_g723) == AST_FORMAT_CMP_EQUAL) {
 		/* Indicate that we don't support VAD (G.723.1 annex A) */
 		ast_str_append(a_buf, 0, "a=fmtp:%d annexa=no\r\n", rtp_code);
-	} else if (ast_format_cmp(format, ast_format_siren7) == AST_FORMAT_CMP_EQUAL) {
-		/* Indicate that we only expect 32Kbps */
-		ast_str_append(a_buf, 0, "a=fmtp:%d bitrate=32000\r\n", rtp_code);
-	} else if (ast_format_cmp(format, ast_format_siren14) == AST_FORMAT_CMP_EQUAL) {
-		/* Indicate that we only expect 48Kbps */
-		ast_str_append(a_buf, 0, "a=fmtp:%d bitrate=48000\r\n", rtp_code);
 	} else if (ast_format_cmp(format, ast_format_g719) == AST_FORMAT_CMP_EQUAL) {
 		/* Indicate that we only expect 64Kbps */
 		ast_str_append(a_buf, 0, "a=fmtp:%d bitrate=64000\r\n", rtp_code);
@@ -17209,10 +17196,8 @@ static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct
 	struct sip_peer *peer = sip_find_peer(peer_name, NULL, TRUE, FINDALLDEVICES, FALSE, 0);
 
 	if (stasis_subscription_final_message(sub, msg)) {
-		if (peer) {
-			/* configuration reloaded */
-			return;
-		}
+		/* peer can be non-NULL during reload. */
+		ao2_cleanup(peer);
 		ast_free(peer_name);
 		return;
 	}
@@ -18366,7 +18351,7 @@ static enum sip_get_dest_result get_destination(struct sip_pvt *p, struct sip_re
 static int get_sip_pvt_from_replaces(const char *callid, const char *totag,
 		const char *fromtag, struct sip_pvt **out_pvt, struct ast_channel **out_chan)
 {
-	struct sip_pvt *sip_pvt_ptr;
+	RAII_VAR(struct sip_pvt *, sip_pvt_ptr, NULL, ao2_cleanup);
 	struct sip_pvt tmp_dialog = {
 		.callid = callid,
 	};
@@ -18441,6 +18426,9 @@ static int get_sip_pvt_from_replaces(const char *callid, const char *totag,
 		}
 	}
 
+	/* If we're here sip_pvt_ptr has been copied to *out_pvt, prevent RAII_VAR cleanup */
+	sip_pvt_ptr = NULL;
+
 	return 0;
 }
 
@@ -21300,15 +21288,13 @@ static char *sip_unregister(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
 }
 
 /*! \brief Callback for show_chanstats */
-static int show_chanstats_cb(void *__cur, void *__arg, int flags)
+static int show_chanstats_cb(struct sip_pvt *cur, struct __show_chan_arg *arg)
 {
 #define FORMAT2 "%-15.15s  %-11.11s  %-8.8s %-10.10s  %-10.10s (     %%) %-6.6s %-10.10s  %-10.10s (     %%) %-6.6s\n"
 #define FORMAT  "%-15.15s  %-11.11s  %-8.8s %-10.10u%-1.1s %-10.10u (%5.2f%%) %-6.4lf %-10.10u%-1.1s %-10.10u (%5.2f%%) %-6.4lf\n"
-	struct sip_pvt *cur = __cur;
 	struct ast_rtp_instance_stats stats;
 	char durbuf[10];
 	struct ast_channel *c;
-	struct __show_chan_arg *arg = __arg;
 	int fd = arg->fd;
 
 	sip_pvt_lock(cur);
@@ -21368,6 +21354,8 @@ static int show_chanstats_cb(void *__cur, void *__arg, int flags)
 static char *sip_show_channelstats(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	struct __show_chan_arg arg = { .fd = a->fd, .numchans = 0 };
+	struct sip_pvt *cur;
+	struct ao2_iterator i;
 
 	switch (cmd) {
 	case CLI_INIT:
@@ -21385,8 +21373,14 @@ static char *sip_show_channelstats(struct ast_cli_entry *e, int cmd, struct ast_
 		return CLI_SHOWUSAGE;
 
 	ast_cli(a->fd, FORMAT2, "Peer", "Call ID", "Duration", "Recv: Pack", "Lost", "Jitter", "Send: Pack", "Lost", "Jitter");
+
 	/* iterate on the container and invoke the callback on each item */
-	ao2_t_callback(dialogs, OBJ_NODATA, show_chanstats_cb, &arg, "callback to sip show chanstats");
+	i = ao2_iterator_init(dialogs, 0);
+	for (; (cur = ao2_iterator_next(&i)); ao2_ref(cur, -1)) {
+		show_chanstats_cb(cur, &arg);
+	}
+	ao2_iterator_destroy(&i);
+
 	ast_cli(a->fd, "%d active SIP channel%s\n", arg.numchans, (arg.numchans != 1) ? "s" : "");
 	return CLI_SUCCESS;
 }
@@ -21702,10 +21696,8 @@ static const struct cfsubscription_types *find_subscription_type(enum subscripti
 #define FORMAT  "%-15.15s  %-15.15s  %-15.15s  %-15.15s  %-3.3s %-3.3s  %-15.15s %-10.10s %-10.10s\n"
 
 /*! \brief callback for show channel|subscription */
-static int show_channels_cb(void *__cur, void *__arg, int flags)
+static int show_channels_cb(struct sip_pvt *cur, struct __show_chan_arg *arg)
 {
-	struct sip_pvt *cur = __cur;
-	struct __show_chan_arg *arg = __arg;
 	const struct ast_sockaddr *dst;
 
 	sip_pvt_lock(cur);
@@ -21757,7 +21749,8 @@ static int show_channels_cb(void *__cur, void *__arg, int flags)
 static char *sip_show_channels(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	struct __show_chan_arg arg = { .fd = a->fd, .numchans = 0 };
-
+	struct sip_pvt *cur;
+	struct ao2_iterator i;
 
 	if (cmd == CLI_INIT) {
 		e->command = "sip show {channels|subscriptions}";
@@ -21779,7 +21772,11 @@ static char *sip_show_channels(struct ast_cli_entry *e, int cmd, struct ast_cli_
 		ast_cli(arg.fd, FORMAT3, "Peer", "User", "Call ID", "Extension", "Last state", "Type", "Mailbox", "Expiry");
 
 	/* iterate on the container and invoke the callback on each item */
-	ao2_t_callback(dialogs, OBJ_NODATA, show_channels_cb, &arg, "callback to show channels");
+	i = ao2_iterator_init(dialogs, 0);
+	for (; (cur = ao2_iterator_next(&i)); ao2_ref(cur, -1)) {
+		show_channels_cb(cur, &arg);
+	}
+	ao2_iterator_destroy(&i);
 
 	/* print summary information */
 	ast_cli(arg.fd, "%d active SIP %s%s\n", arg.numchans,
@@ -24603,6 +24600,7 @@ static void handle_response(struct sip_pvt *p, int resp, const char *rest, struc
 	char *c_copy = ast_strdupa(c);
 	/* Skip the Cseq and its subsequent spaces */
 	const char *msg = ast_skip_blanks(ast_skip_nonblanks(c_copy));
+	int ack_res = FALSE;
 
 	if (!msg)
 		msg = "";
@@ -24631,28 +24629,24 @@ static void handle_response(struct sip_pvt *p, int resp, const char *rest, struc
 			ast_channel_hangupcause_set(owner, hangup_sip2cause(resp));
 	}
 
-	if (p->socket.type == AST_TRANSPORT_UDP) {
-		int ack_res = FALSE;
-
-		/* Acknowledge whatever it is destined for */
-		if ((resp >= 100) && (resp <= 199)) {
-			/* NON-INVITE messages do not ack a 1XX response. RFC 3261 section 17.1.2.2 */
-			if (sipmethod == SIP_INVITE) {
-				ack_res = __sip_semi_ack(p, seqno, 0, sipmethod);
-			}
-		} else {
-			ack_res = __sip_ack(p, seqno, 0, sipmethod);
+	/* Acknowledge whatever it is destined for */
+	if ((resp >= 100) && (resp <= 199)) {
+		/* NON-INVITE messages do not ack a 1XX response. RFC 3261 section 17.1.2.2 */
+		if (sipmethod == SIP_INVITE) {
+			ack_res = __sip_semi_ack(p, seqno, 0, sipmethod);
 		}
+	} else {
+		ack_res = __sip_ack(p, seqno, 0, sipmethod);
+	}
 
-		if (ack_res == FALSE) {
-			/* RFC 3261 13.2.2.4 and 17.1.1.2 - We must re-send ACKs to re-transmitted final responses */
-			if (sipmethod == SIP_INVITE && resp >= 200) {
-				transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, resp < 300 ? TRUE: FALSE);
-			}
-
-			append_history(p, "Ignore", "Ignoring this retransmit\n");
-			return;
+	if (ack_res == FALSE) {
+		/* RFC 3261 13.2.2.4 and 17.1.1.2 - We must re-send ACKs to re-transmitted final responses */
+		if (sipmethod == SIP_INVITE && resp >= 200) {
+			transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, resp < 300 ? TRUE: FALSE);
 		}
+
+		append_history(p, "Ignore", "Ignoring this retransmit\n");
+		return;
 	}
 
 	/* If this is a NOTIFY for a subscription clear the flag that indicates that we have a NOTIFY pending */
@@ -31054,6 +31048,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
 			return NULL;
 		}
 		if (!(peer->endpoint = ast_endpoint_create("SIP", name))) {
+			ao2_t_ref(peer, -1, "failed to allocate endpoint, drop peer");
 			return NULL;
 		}
 		if (!(peer->caps = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) {
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index c48f0f5..37281bb 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -567,8 +567,10 @@ static const unsigned char packet_send_stream_based_tone_off[] =
 	{ 0x16, 0x05, 0x1c, 0x00, 0x00 };
 
 static const unsigned char packet_send_mute[] = { 0x16, 0x05, 0x04, 0x00, 0x00 };
+#ifdef NOT_USED
 static const unsigned char packet_send_CloseAudioStreamRX[] = { 0x16, 0x05, 0x31, 0x00, 0xff };
 static const unsigned char packet_send_CloseAudioStreamTX[] = { 0x16, 0x05, 0x31, 0xff, 0x00 };
+#endif
 static const unsigned char packet_send_stream_based_tone_on[] =
 	{ 0x16, 0x06, 0x1b, 0x00, 0x00, 0x05 };
 static const unsigned char packet_send_stream_based_tone_single_freq[] =
diff --git a/channels/sip/config_parser.c b/channels/sip/config_parser.c
index 5049542..0feb246 100644
--- a/channels/sip/config_parser.c
+++ b/channels/sip/config_parser.c
@@ -274,6 +274,7 @@ int sip_parse_register_line(struct sip_registry *reg, int default_expiry, const
 	return 0;
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(sip_parse_register_line_test)
 {
 	int res = AST_TEST_PASS;
@@ -643,6 +644,7 @@ alloc_fail:
 	ast_test_status_update(test, "Out of memory. \n");
 	return res;
 }
+#endif
 
 int sip_parse_host(char *line, int lineno, char **hostname, int *portnum, enum ast_transport *transport)
 {
@@ -708,6 +710,7 @@ int sip_parse_host(char *line, int lineno, char **hostname, int *portnum, enum a
 	return 0;
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(sip_parse_host_line_test)
 {
 	int res = AST_TEST_PASS;
@@ -787,6 +790,7 @@ AST_TEST_DEFINE(sip_parse_host_line_test)
 	return res;
 
 }
+#endif
 
 /*! \brief Parse the comma-separated nat= option values */
 void sip_parse_nat_option(const char *value, struct ast_flags *mask, struct ast_flags *flags)
@@ -834,6 +838,7 @@ void sip_parse_nat_option(const char *value, struct ast_flags *mask, struct ast_
 	}
 }
 
+#ifdef TEST_FRAMEWORK
 #define TEST_FORCE_RPORT      1 << 0
 #define TEST_COMEDIA          1 << 1
 #define TEST_AUTO_FORCE_RPORT 1 << 2
@@ -904,6 +909,8 @@ AST_TEST_DEFINE(sip_parse_nat_test)
 
 	return res;
 }
+#endif
+
 /*! \brief SIP test registration */
 void sip_config_parser_register_tests(void)
 {
diff --git a/channels/sip/reqresp_parser.c b/channels/sip/reqresp_parser.c
index 31832a3..ecfb79d 100644
--- a/channels/sip/reqresp_parser.c
+++ b/channels/sip/reqresp_parser.c
@@ -258,7 +258,7 @@ int parse_uri_full(char *uri, const char *scheme, char **user, char **pass,
 	return error;
 }
 
-
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(sip_parse_uri_full_test)
 {
 	int res = AST_TEST_PASS;
@@ -514,7 +514,7 @@ AST_TEST_DEFINE(sip_parse_uri_full_test)
 
 	return res;
 }
-
+#endif
 
 int parse_uri(char *uri, const char *scheme, char **user, char **pass,
 	      char **hostport, char **transport) {
@@ -530,6 +530,7 @@ int parse_uri(char *uri, const char *scheme, char **user, char **pass,
 	return ret;
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(sip_parse_uri_test)
 {
 	int res = AST_TEST_PASS;
@@ -687,6 +688,7 @@ AST_TEST_DEFINE(sip_parse_uri_test)
 
 	return res;
 }
+#endif
 
 /*! \brief  Get caller id name from SIP headers, copy into output buffer
  *
@@ -817,6 +819,7 @@ const char *get_calleridname(const char *input, char *output, size_t outputsize)
 	return input;
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(get_calleridname_test)
 {
 	int res = AST_TEST_PASS;
@@ -899,6 +902,7 @@ AST_TEST_DEFINE(get_calleridname_test)
 
 	return res;
 }
+#endif
 
 int get_name_and_number(const char *hdr, char **name, char **number)
 {
@@ -940,6 +944,7 @@ int get_name_and_number(const char *hdr, char **name, char **number)
 	return 0;
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(get_name_and_number_test)
 {
 	int res = AST_TEST_PASS;
@@ -1044,6 +1049,7 @@ AST_TEST_DEFINE(get_name_and_number_test)
 
 	return res;
 }
+#endif
 
 int get_in_brackets_const(const char *src,const char **start,int *length)
 {
@@ -1176,6 +1182,7 @@ char *get_in_brackets(char *tmp)
 	return out;
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(get_in_brackets_test)
 {
 	int res = AST_TEST_PASS;
@@ -1252,7 +1259,7 @@ AST_TEST_DEFINE(get_in_brackets_test)
 
 	return res;
 }
-
+#endif
 
 int parse_name_andor_addr(char *uri, const char *scheme, char **name,
 			  char **user, char **pass, char **hostport,
@@ -1298,6 +1305,7 @@ int parse_name_andor_addr(char *uri, const char *scheme, char **name,
 	return parse_uri_full(uri, scheme, user, pass, hostport, params, headers, residue2);
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(parse_name_andor_addr_test)
 {
 	int res = AST_TEST_PASS;
@@ -1427,6 +1435,7 @@ AST_TEST_DEFINE(parse_name_andor_addr_test)
 
 	return res;
 }
+#endif
 
 int get_comma(char *in, char **out)
 {
@@ -1523,6 +1532,7 @@ int parse_contact_header(char *contactheader, struct contactliststruct *contactl
 	return last;
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(parse_contact_header_test)
 {
 	int res = AST_TEST_PASS;
@@ -1668,6 +1678,7 @@ AST_TEST_DEFINE(parse_contact_header_test)
 
 	return res;
 }
+#endif
 
 /*!
  * \brief Parse supported header in incoming packet
@@ -1755,6 +1766,7 @@ unsigned int parse_sip_options(const char *options, char *unsupported, size_t un
 	return profile;
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(sip_parse_options_test)
 {
 	int res = AST_TEST_PASS;
@@ -1892,6 +1904,7 @@ AST_TEST_DEFINE(sip_parse_options_test)
 
 	return res;
 }
+#endif
 
 /*! \brief helper routine for sip_uri_cmp to compare URI parameters
  *
@@ -2246,6 +2259,7 @@ int sip_uri_cmp(const char *input1, const char *input2)
 #define URI_CMP_MATCH 0
 #define URI_CMP_NOMATCH 1
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(sip_uri_cmp_test)
 {
 	static const struct {
@@ -2362,6 +2376,7 @@ AST_TEST_DEFINE(sip_uri_cmp_test)
 
 	return test_res;
 }
+#endif
 
 void free_via(struct sip_via *v)
 {
@@ -2448,6 +2463,7 @@ struct sip_via *parse_via(const char *header)
 	return v;
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(parse_via_test)
 {
 	int res = AST_TEST_PASS;
@@ -2625,6 +2641,7 @@ AST_TEST_DEFINE(parse_via_test)
 	}
 	return res;
 }
+#endif
 
 void sip_request_parser_register_tests(void)
 {
diff --git a/configs/basic-pbx/modules.conf b/configs/basic-pbx/modules.conf
index 3561537..7b60125 100644
--- a/configs/basic-pbx/modules.conf
+++ b/configs/basic-pbx/modules.conf
@@ -60,11 +60,9 @@ load = func_strings.so
 ; Core/PBX
 
 load = pbx_config.so
-load = pbx_functions.so
 
 ; Resources
 
-load = res_hep_pjsip.so
 load = res_musiconhold.so
 load = res_pjproject.so
 load = res_pjsip_acl.so
@@ -78,7 +76,6 @@ load = res_pjsip_endpoint_identifier_ip.so
 load = res_pjsip_endpoint_identifier_user.so
 load = res_pjsip_exten_state.so
 load = res_pjsip_header_funcs.so
-load = res_pjsip_log_forwarder.so
 load = res_pjsip_logger.so
 load = res_pjsip_messaging.so
 load = res_pjsip_multihomed.so
@@ -91,7 +88,6 @@ load = res_pjsip_outbound_authenticator_digest.so
 load = res_pjsip_outbound_publish.so
 load = res_pjsip_outbound_registration.so
 load = res_pjsip_path.so
-load = res_pjsip_phoneprov_provider.so
 load = res_pjsip_pidf_body_generator.so
 load = res_pjsip_pidf_digium_body_supplement.so
 load = res_pjsip_pidf_eyebeam_body_supplement.so
diff --git a/configs/samples/chan_dahdi.conf.sample b/configs/samples/chan_dahdi.conf.sample
index a5daede..6dd365f 100644
--- a/configs/samples/chan_dahdi.conf.sample
+++ b/configs/samples/chan_dahdi.conf.sample
@@ -1119,6 +1119,15 @@ pickupgroup=1
 ;faxdetect=outgoing
 ;faxdetect=no
 ;
+; When 'faxdetect' is enabled, one could use 'faxdetect_timeout' to disable fax
+; detection after the specified number of seconds into a call.  Be aware that
+; outgoing analog channels may consider the channel is answered immediately
+; when dialing completes.  Analog does not have a reliable method of detecting
+; when the far end answers.  Zero disables the timeout.
+; Default is 0 to disable the timeout.
+;
+;faxdetect_timeout=30
+;
 ; When 'faxdetect' is used, one could use 'faxbuffers' to configure the DAHDI
 ; transmit buffer policy.  The default is *OFF*.  When this configuration
 ; option is used, the faxbuffer policy will be used for the life of the call
diff --git a/configs/samples/hep.conf.sample b/configs/samples/hep.conf.sample
index 6e409d1..e1cd52e 100644
--- a/configs/samples/hep.conf.sample
+++ b/configs/samples/hep.conf.sample
@@ -4,7 +4,7 @@
 
 ; All settings are currently set in the general section.
 [general]
-enabled = yes                      ; Enable/disable forwarding of packets to a
+enabled = no                       ; Enable/disable forwarding of packets to a
                                    ; HEP server. Default is "yes".
 capture_address = 192.168.1.1:9061 ; The address of the HEP capture server.
 capture_password = foo             ; If specified, the authorization passsword
diff --git a/configs/samples/pjsip.conf.sample b/configs/samples/pjsip.conf.sample
index 3e007e4..0f279c3 100644
--- a/configs/samples/pjsip.conf.sample
+++ b/configs/samples/pjsip.conf.sample
@@ -670,7 +670,7 @@
                         ; usage of media encryption for this endpoint (default:
                         ; "no")
 ;media_encryption_optimistic=no ; Use encryption if possible but don't fail the call
-								; if not possible.
+                                ; if not possible.
 ;g726_non_standard=no   ; When set to "yes" and an endpoint negotiates g.726
                         ; audio then g.726 for AAL2 packing order is used contrary
                         ; to what is recommended in RFC3551. Note, 'g726aal2' also
@@ -691,6 +691,10 @@
 ;t38_udptl_maxdatagram=0        ; T 38 UDPTL maximum datagram size (default:
                                 ; "0")
 ;fax_detect=no  ; Whether CNG tone detection is enabled (default: "no")
+;fax_detect_timeout=30  ; How many seconds into a call before fax_detect is
+                        ; disabled for the call.
+                        ; Zero disables the timeout.
+                        ; (default: "0")
 ;t38_udptl_nat=no       ; Whether NAT support is enabled on UDPTL sessions
                         ; (default: "no")
 ;t38_udptl_ipv6=no      ; Whether IPv6 is used for UDPTL Sessions (default:
@@ -746,7 +750,7 @@
 ;srtp_tag_32=no ; Determines whether 32 byte tags should be used instead of 80
                 ; byte tags (default: "no")
 ;set_var=       ; Variable set on a channel involving the endpoint. For multiple
-		; channel variables specify multiple 'set_var'(s)
+                ; channel variables specify multiple 'set_var'(s)
 ;rtp_keepalive= ; Interval, in seconds, between comfort noise RTP packets if
                 ; RTP is not flowing. This setting is useful for ensuring that
                 ; holes in NATs and firewalls are kept open throughout a call.
@@ -788,7 +792,7 @@
                 ; (default: "")
 ;ca_list_path=  ; Path to directory containing certificates to read TLS ONLY.
                 ; PJProject version 2.4 or higher is required for this option to
-				; be used.
+                ; be used.
                 ; (default: "")
 ;cert_file=     ; Certificate file for endpoint TLS ONLY
                 ; Will read .crt or .pem file but only uses cert,
@@ -874,8 +878,8 @@
 ;disable_tcp_switch=yes ; Disable automatic switching from UDP to TCP transports
                         ; if outgoing request is too large.
                         ; See RFC 3261 section 18.1.1.
-						; Disabling this option has been known to cause interoperability
-						; issues, so disable at your own risk.
+                        ; Disabling this option has been known to cause interoperability
+                        ; issues, so disable at your own risk.
                         ; (default: "yes")
 ;type=  ; Must be of type system (default: "")
 
@@ -905,10 +909,10 @@
 ;contact_expiration_check_interval=30
                         ; The interval (in seconds) to check for expired contacts.
 ;disable_multi_domain=no
-			; Disable Multi Domain support.
-			; If disabled it can improve realtime performace by reducing
-			; number of database requsts
-			; (default: "no")
+            ; Disable Multi Domain support.
+            ; If disabled it can improve realtime performace by reducing
+            ; number of database requsts
+            ; (default: "no")
 ;endpoint_identifier_order=ip,username,anonymous
             ; The order by which endpoint identifiers are given priority.
             ; Currently, "ip", "username", "auth_username" and "anonymous" are valid
diff --git a/configure b/configure
index 7c0864b..1f6c888 100755
--- a/configure
+++ b/configure
@@ -1116,10 +1116,6 @@ PBX_DAHDI
 DAHDI_DIR
 DAHDI_INCLUDE
 DAHDI_LIB
-PBX_OPENSSL_ECDH_AUTO
-OPENSSL_ECDH_AUTO_DIR
-OPENSSL_ECDH_AUTO_INCLUDE
-OPENSSL_ECDH_AUTO_LIB
 PBX_OPENSSL_EC
 OPENSSL_EC_DIR
 OPENSSL_EC_INCLUDE
@@ -1179,7 +1175,7 @@ NOISY_BUILD
 PTHREAD_CFLAGS
 PTHREAD_LIBS
 PTHREAD_CC
-acx_pthread_config
+ax_pthread_config
 MD5
 SOXMIX
 PBX_FLEX
@@ -2086,7 +2082,8 @@ Optional Packages:
   --with-uriparser=PATH   use uriparser library files in PATH
   --with-kqueue=PATH      use kqueue support files in PATH
   --with-ldap=PATH        use OpenLDAP files in PATH
-  --with-libcurl=DIR      look for the curl library in DIR
+  --with-libcurl=PREFIX   look for the curl library in PREFIX/lib and headers
+                          in PREFIX/include
   --with-libedit=PATH     use NetBSD Editline library files in PATH, use
                           'internal' Editline otherwise
   --with-libxml2=PATH     use LibXML2 files in PATH
@@ -7913,6 +7910,76 @@ if test "${MD5}" = "digest" ; then
    MD5="${MD5} -a md5"
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
 
 
 
@@ -7922,22 +7989,26 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-acx_pthread_ok=no
+ax_pthread_ok=no
 
 # We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
+# requires special compiler flags (e.g. on Tru64 or Sequent).
 # It gets checked for in the link test anyway.
 
 # First of all, check if the user has set any of the PTHREAD_LIBS,
 # etcetera environment variables, and if threads linking works using
 # them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-        save_CFLAGS="$CFLAGS"
+if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
+        ax_pthread_save_CC="$CC"
+        ax_pthread_save_CFLAGS="$CFLAGS"
+        ax_pthread_save_LIBS="$LIBS"
+        if test "x$PTHREAD_CC" != "x"; then :
+  CC="$PTHREAD_CC"
+fi
         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        save_LIBS="$LIBS"
         LIBS="$PTHREAD_LIBS $LIBS"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
+$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -7957,18 +8028,19 @@ return pthread_join ();
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  acx_pthread_ok=yes
+  ax_pthread_ok=yes
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
-        if test x"$acx_pthread_ok" = xno; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+$as_echo "$ax_pthread_ok" >&6; }
+        if test "x$ax_pthread_ok" = "xno"; then
                 PTHREAD_LIBS=""
                 PTHREAD_CFLAGS=""
         fi
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
+        CC="$ax_pthread_save_CC"
+        CFLAGS="$ax_pthread_save_CFLAGS"
+        LIBS="$ax_pthread_save_LIBS"
 fi
 
 # We must check for the threads library under a number of different
@@ -7981,7 +8053,7 @@ fi
 # which indicates that we try without any flags at all, and "pthread-config"
 # which is a program returning the flags for the Pth emulation library.
 
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
 
 # The ordering *is* (sometimes) important.  Some notes on the
 # individual items follow:
@@ -7990,59 +8062,269 @@ acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -m
 # none: in case threads are in libc; should be tried before -Kthread and
 #       other compiler flags to prevent continual compiler warnings
 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
+#           (Note: HP C rejects this with "bad form for `-t' option")
+# -pthreads: Solaris/gcc (Note: HP C also rejects)
 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-#      doesn't hurt to check since this sometimes defines pthreads too;
-#      also defines -D_REENTRANT)
-#      ... -mt is also the pthreads flag for HP/aCC
+#      doesn't hurt to check since this sometimes defines pthreads and
+#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
+#      is present but should not be used directly; and before -mthreads,
+#      because the compiler interprets this as "-mt" + "-hreads")
+# -mthreads: Mingw32/gcc, Lynx/gcc
 # pthread: Linux, etcetera
 # --thread-safe: KAI C++
 # pthread-config: use pthread-config program (for GNU Pth library)
 
-case "${host_cpu}-${host_os}" in
-        *solaris*)
+case $host_os in
+
+        freebsd*)
+
+        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+
+        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
+        ;;
+
+        hpux*)
+
+        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
+        # multi-threading and also sets -lpthread."
+
+        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
+        ;;
+
+        openedition*)
+
+        # IBM z/OS requires a feature-test macro to be defined in order to
+        # enable POSIX threads at all, so give the user a hint if this is
+        # not set. (We don't define these ourselves, as they can affect
+        # other portions of the system API in unpredictable ways.)
+
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
+             AX_PTHREAD_ZOS_MISSING
+#            endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
+$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
+fi
+rm -f conftest*
+
+        ;;
+
+        solaris*)
 
         # On Solaris (at least, for some versions), libc contains stubbed
         # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
-        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
-        # a function called by this macro, so we could check for that, but
-        # who knows whether they'll stub that too in a future libc.)  So,
-        # we'll just look for -pthreads and -lpthread first:
+        # tests will erroneously succeed. (N.B.: The stubs are missing
+        # pthread_cleanup_push, or rather a function called by this macro,
+        # so we could check for that, but who knows whether they'll stub
+        # that too in a future libc.)  So we'll check first for the
+        # standard Solaris way of linking pthreads (-mt -lpthread).
+
+        ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
+        ;;
+esac
+
+# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
+
+if test "x$GCC" = "xyes"; then :
+  ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
+fi
+
+# The presence of a feature test macro requesting re-entrant function
+# definitions is, on some systems, a strong hint that pthreads support is
+# correctly enabled
+
+case $host_os in
+        darwin* | hpux* | linux* | osf* | solaris*)
+        ax_pthread_check_macro="_REENTRANT"
+        ;;
 
-        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+        aix*)
+        ax_pthread_check_macro="_THREAD_SAFE"
+        ;;
+
+        *)
+        ax_pthread_check_macro="--"
         ;;
 esac
+if test "x$ax_pthread_check_macro" = "x--"; then :
+  ax_pthread_check_cond=0
+else
+  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
+fi
+
+# Are we compiling with Clang?
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
+$as_echo_n "checking whether $CC is Clang... " >&6; }
+if ${ax_cv_PTHREAD_CLANG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ax_cv_PTHREAD_CLANG=no
+     # Note that Autoconf sets GCC=yes for Clang as well as GCC
+     if test "x$GCC" = "xyes"; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
+#            if defined(__clang__) && defined(__llvm__)
+             AX_PTHREAD_CC_IS_CLANG
+#            endif
 
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
+  ax_cv_PTHREAD_CLANG=yes
+fi
+rm -f conftest*
 
-        case $flag in
+     fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
+$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
+ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
+
+ax_pthread_clang_warning=no
+
+# Clang needs special handling, because older versions handle the -pthread
+# option in a rather... idiosyncratic way
+
+if test "x$ax_pthread_clang" = "xyes"; then
+
+        # Clang takes -pthread; it has never supported any other flag
+
+        # (Note 1: This will need to be revisited if a system that Clang
+        # supports has POSIX threads in a separate library.  This tends not
+        # to be the way of modern systems, but it's conceivable.)
+
+        # (Note 2: On some systems, notably Darwin, -pthread is not needed
+        # to get POSIX threads support; the API is always present and
+        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
+        # -pthread does define _REENTRANT, and while the Darwin headers
+        # ignore this macro, third-party headers might not.)
+
+        PTHREAD_CFLAGS="-pthread"
+        PTHREAD_LIBS=
+
+        ax_pthread_ok=yes
+
+        # However, older versions of Clang make a point of warning the user
+        # that, in an invocation where only linking and no compilation is
+        # taking place, the -pthread option has no effect ("argument unused
+        # during compilation").  They expect -pthread to be passed in only
+        # when source code is being compiled.
+        #
+        # Problem is, this is at odds with the way Automake and most other
+        # C build frameworks function, which is that the same flags used in
+        # compilation (CFLAGS) are also used in linking.  Many systems
+        # supported by AX_PTHREAD require exactly this for POSIX threads
+        # support, and in fact it is often not straightforward to specify a
+        # flag that is used only in the compilation phase and not in
+        # linking.  Such a scenario is extremely rare in practice.
+        #
+        # Even though use of the -pthread flag in linking would only print
+        # a warning, this can be a nuisance for well-run software projects
+        # that build with -Werror.  So if the active version of Clang has
+        # this misfeature, we search for an option to squash it.
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
+$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
+if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
+             # Create an alternate version of $ac_link that compiles and
+             # links in two steps (.c -> .o, .o -> exe) instead of one
+             # (.c -> exe), because the warning occurs only in the second
+             # step
+             ax_pthread_save_ac_link="$ac_link"
+             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
+             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
+             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
+             ax_pthread_save_CFLAGS="$CFLAGS"
+             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
+                if test "x$ax_pthread_try" = "xunknown"; then :
+  break
+fi
+                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
+                ac_link="$ax_pthread_save_ac_link"
+                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_link="$ax_pthread_2step_ac_link"
+                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+             done
+             ac_link="$ax_pthread_save_ac_link"
+             CFLAGS="$ax_pthread_save_CFLAGS"
+             if test "x$ax_pthread_try" = "x"; then :
+  ax_pthread_try=no
+fi
+             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
+$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
+
+        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
+                no | unknown) ;;
+                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
+        esac
+
+fi # $ax_pthread_clang = yes
+
+if test "x$ax_pthread_ok" = "xno"; then
+for ax_pthread_try_flag in $ax_pthread_flags; do
+
+        case $ax_pthread_try_flag in
                 none)
                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
                 ;;
 
+                -mt,pthread)
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
+$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
+                PTHREAD_CFLAGS="-mt"
+                PTHREAD_LIBS="-lpthread"
+                ;;
+
                 -*)
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
-$as_echo_n "checking whether pthreads work with $flag... " >&6; }
-                PTHREAD_CFLAGS="$flag"
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
+$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
+                PTHREAD_CFLAGS="$ax_pthread_try_flag"
                 ;;
 
-		pthread-config)
-		# Extract the first word of "pthread-config", so it can be a program name with args.
+                pthread-config)
+                # Extract the first word of "pthread-config", so it can be a program name with args.
 set dummy pthread-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_acx_pthread_config+:} false; then :
+if ${ac_cv_prog_ax_pthread_config+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$acx_pthread_config"; then
-  ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
+  if test -n "$ax_pthread_config"; then
+  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -8051,7 +8333,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_acx_pthread_config="yes"
+    ac_cv_prog_ax_pthread_config="yes"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -8059,35 +8341,37 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
+  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
 fi
 fi
-acx_pthread_config=$ac_cv_prog_acx_pthread_config
-if test -n "$acx_pthread_config"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
-$as_echo "$acx_pthread_config" >&6; }
+ax_pthread_config=$ac_cv_prog_ax_pthread_config
+if test -n "$ax_pthread_config"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
+$as_echo "$ax_pthread_config" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-		if test x"$acx_pthread_config" = xno; then continue; fi
-		PTHREAD_CFLAGS="`pthread-config --cflags`"
-		PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-		;;
+                if test "x$ax_pthread_config" = "xno"; then :
+  continue
+fi
+                PTHREAD_CFLAGS="`pthread-config --cflags`"
+                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+                ;;
 
                 *)
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
-$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
-                PTHREAD_LIBS="-l$flag"
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
+$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
+                PTHREAD_LIBS="-l$ax_pthread_try_flag"
                 ;;
         esac
 
-        save_LIBS="$LIBS"
-        save_CFLAGS="$CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
+        ax_pthread_save_CFLAGS="$CFLAGS"
+        ax_pthread_save_LIBS="$LIBS"
         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
 
         # Check for various functions.  We must include pthread.h,
         # since some functions may be macros.  (On the Sequent, we
@@ -8098,33 +8382,42 @@ $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
         # pthread_cleanup_push because it is one of the few pthread
         # functions on Solaris that doesn't have a non-functional libc stub.
         # We try pthread_create on general principles.
+
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <pthread.h>
+#                       if $ax_pthread_check_cond
+#                        error "$ax_pthread_check_macro must be defined"
+#                       endif
+                        static void routine(void *a) { a = 0; }
+                        static void *start_routine(void *a) { return a; }
 int
 main ()
 {
-pthread_t th; pthread_join(th, 0);
-                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
-                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+pthread_t th; pthread_attr_t attr;
+                        pthread_create(&th, 0, start_routine, 0);
+                        pthread_join(th, 0);
+                        pthread_attr_init(&attr);
+                        pthread_cleanup_push(routine, 0);
+                        pthread_cleanup_pop(0) /* ; */
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  acx_pthread_ok=yes
+  ax_pthread_ok=yes
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
+        CFLAGS="$ax_pthread_save_CFLAGS"
+        LIBS="$ax_pthread_save_LIBS"
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
-        if test "x$acx_pthread_ok" = xyes; then
-                break;
-        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+$as_echo "$ax_pthread_ok" >&6; }
+        if test "x$ax_pthread_ok" = "xyes"; then :
+  break
+fi
 
         PTHREAD_LIBS=""
         PTHREAD_CFLAGS=""
@@ -8132,63 +8425,127 @@ done
 fi
 
 # Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        save_CFLAGS="$CFLAGS"
+if test "x$ax_pthread_ok" = "xyes"; then
+        ax_pthread_save_CFLAGS="$CFLAGS"
+        ax_pthread_save_LIBS="$LIBS"
         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
 
         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
 $as_echo_n "checking for joinable pthread attribute... " >&6; }
-	attr_name=unknown
-	for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
-	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
+             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <pthread.h>
 int
 main ()
 {
-int attr=$attr; return attr;
+int attr = $ax_pthread_attr; return attr /* ; */
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  attr_name=$attr; break
+  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-	done
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
-$as_echo "$attr_name" >&6; }
-        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+             done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
+$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
+        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
+               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
+               test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
 
 cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $attr_name
+#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
 _ACEOF
 
-        fi
+               ax_pthread_joinable_attr_defined=yes
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
-        flag=no
-        case "${host_cpu}-${host_os}" in
-            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
-            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-        esac
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
-$as_echo "${flag}" >&6; }
-        if test "x$flag" != xno; then
-            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-        fi
+fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
+$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
+if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ax_cv_PTHREAD_SPECIAL_FLAGS=no
+             case $host_os in
+             solaris*)
+             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
+             ;;
+             esac
 
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
+$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
+        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
+               test "x$ax_pthread_special_flags_added" != "xyes"; then :
+  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
+               ax_pthread_special_flags_added=yes
+fi
 
-        # More AIX lossage: must compile with xlc_r or cc_r
-	if test x"$GCC" != xyes; then
-          for ac_prog in xlc_r cc_r
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+int i = PTHREAD_PRIO_INHERIT;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ax_cv_PTHREAD_PRIO_INHERIT=yes
+else
+  ax_cv_PTHREAD_PRIO_INHERIT=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
+               test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
+
+$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
+
+               ax_pthread_prio_inherit_defined=yes
+
+fi
+
+        CFLAGS="$ax_pthread_save_CFLAGS"
+        LIBS="$ax_pthread_save_LIBS"
+
+        # More AIX lossage: compile with *_r variant
+        if test "x$GCC" != "xyes"; then
+            case $host_os in
+                aix*)
+                case "x/$CC" in #(
+  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
+    #handle absolute path differently from PATH based program lookup
+                     case "x$CC" in #(
+  x/*) :
+    if as_fn_executable_p ${CC}_r; then :
+  PTHREAD_CC="${CC}_r"
+fi ;; #(
+  *) :
+    for ac_prog in ${CC}_r
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -8229,27 +8586,31 @@ fi
 
   test -n "$PTHREAD_CC" && break
 done
-test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
-
-        else
-          PTHREAD_CC=$CC
-	fi
-else
-        PTHREAD_CC="$CC"
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+ ;;
+esac ;; #(
+  *) :
+     ;;
+esac
+                ;;
+            esac
+        fi
 fi
 
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
 
 
 
 
 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
+if test "x$ax_pthread_ok" = "xyes"; then
 
 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
 
         :
 else
-        acx_pthread_ok=no
+        ax_pthread_ok=no
 
 fi
 ac_ext=c
@@ -8778,18 +9139,6 @@ PBX_OPENSSL_EC=0
 
 
 
-OPENSSL_ECDH_AUTO_DESCRIP="OpenSSL Auto ECDH Support"
-OPENSSL_ECDH_AUTO_OPTION=crypto
-OPENSSL_ECDH_AUTO_DIR=${CRYPTO_DIR}
-
-PBX_OPENSSL_ECDH_AUTO=0
-
-
-
-
-
-
-
     DAHDI_DESCRIP="DAHDI"
     DAHDI_OPTION="dahdi"
     PBX_DAHDI=0
@@ -9451,6 +9800,10 @@ fi
 
 
 
+
+
+
+
 # Check whether --with-libcurl was given.
 if test "${with_libcurl+set}" = set; then :
   withval=$with_libcurl; _libcurl_with=$withval
@@ -9538,7 +9891,6 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path__libcurl_config" && ac_cv_path__libcurl_config=""$withval/bin""
   ;;
 esac
 fi
@@ -9688,10 +10040,11 @@ int x;
 curl_easy_setopt(NULL,CURLOPT_URL,NULL);
 x=CURL_ERROR_SIZE;
 x=CURLOPT_WRITEFUNCTION;
-x=CURLOPT_FILE;
+x=CURLOPT_WRITEDATA;
 x=CURLOPT_ERRORBUFFER;
 x=CURLOPT_STDERR;
 x=CURLOPT_VERBOSE;
+if (x) {;}
 
   ;
   return 0;
@@ -9758,17 +10111,23 @@ _ACEOF
 
               # We don't have --protocols, so just assume that all
               # protocols are available
-              _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
+              _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
 
               if test x$libcurl_feature_SSL = xyes ; then
                  _libcurl_protocols="$_libcurl_protocols HTTPS"
 
                  # FTPS wasn't standards-compliant until version
-                 # 7.11.0
+                 # 7.11.0 (0x070b00 == 461568)
                  if test $_libcurl_version -ge 461568; then
                     _libcurl_protocols="$_libcurl_protocols FTPS"
                  fi
               fi
+
+              # RTSP, IMAP, POP3 and SMTP were added in
+              # 7.20.0 (0x071400 == 463872)
+              if test $_libcurl_version -ge 463872; then
+                 _libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP"
+              fi
            fi
 
            for _libcurl_protocol in $_libcurl_protocols ; do
@@ -15164,39 +15523,6 @@ _ACEOF
 
 rm -f conftest*
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if ${ac_cv_type_signal+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <signal.h>
-
-int
-main ()
-{
-return *(signal (0, 0)) (0) == 1;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_type_signal=int
-else
-  ac_cv_type_signal=void
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
-
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
 if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
@@ -17537,6 +17863,74 @@ CFLAGS="$saved_CFLAGS"
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute noreturn' support" >&5
+$as_echo_n "checking for compiler 'attribute noreturn' support... " >&6; }
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+
+
+if test "xnoreturn" = "x"
+then
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ void __attribute__((noreturn)) *test(void *muffin, ...) {return (void *) 0;}
+int
+main ()
+{
+
+  ;
+  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; }
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATTRIBUTE_noreturn 1
+_ACEOF
+
+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
+else
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ void __attribute__((noreturn)) *test(void *muffin, ...) ;
+int
+main ()
+{
+
+  ;
+  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; }
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATTRIBUTE_noreturn 1
+_ACEOF
+
+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
+fi
+
+
+CFLAGS="$saved_CFLAGS"
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fsanitize=address support" >&5
 $as_echo_n "checking for -fsanitize=address support... " >&6; }
 saved_sanitize_CFLAGS="${CFLAGS}"
@@ -17789,19 +18183,13 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -march=native support" >&5
 $as_echo_n "checking for -march=native support... " >&6; }
 if $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
-	if test "${CONFIG_CFLAGS}" = ""; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-		AST_NATIVE_ARCH=1
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: user CFLAGS present" >&5
-$as_echo "user CFLAGS present" >&6; }
-		AST_NATIVE_ARCH=
-	fi
+	AST_NATIVE_ARCH=1
 else
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-	AST_NATIVE_ARCH=
+	AST_NATIVE_ARCH=0
 fi
 
 
@@ -31258,53 +31646,6 @@ fi
 if test "$PBX_OPENSSL" = "1";
 then
 
-    if test "x${PBX_OPENSSL_ECDH_AUTO}" != "x1" -a "${USE_OPENSSL_ECDH_AUTO}" != "no"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_ecdh_auto declared in openssl/ssl.h" >&5
-$as_echo_n "checking for SSL_CTX_set_ecdh_auto declared in openssl/ssl.h... " >&6; }
-        saved_cppflags="${CPPFLAGS}"
-        if test "x${OPENSSL_ECDH_AUTO_DIR}" != "x"; then
-            OPENSSL_ECDH_AUTO_INCLUDE="-I${OPENSSL_ECDH_AUTO_DIR}/include"
-        fi
-        CPPFLAGS="${CPPFLAGS} ${OPENSSL_ECDH_AUTO_INCLUDE}"
-
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- #include <openssl/ssl.h>
-int
-main ()
-{
-#if !defined(SSL_CTX_set_ecdh_auto)
-                                    (void) SSL_CTX_set_ecdh_auto;
-                                #endif
-
-  ;
-  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_OPENSSL_ECDH_AUTO=1
-
-$as_echo "#define HAVE_OPENSSL_ECDH_AUTO 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
-
-fi
-
-if test "$PBX_OPENSSL" = "1";
-then
-
     if test "x${PBX_SSL_OP_NO_TLSV1_1}" != "x1"; then
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_OP_NO_TLSv1_1 in openssl/ssl.h" >&5
 $as_echo_n "checking for SSL_OP_NO_TLSv1_1 in openssl/ssl.h... " >&6; }
diff --git a/configure.ac b/configure.ac
index ba74c0e..637059c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -352,7 +352,7 @@ if test "${MD5}" = "digest" ; then
    MD5="${MD5} -a md5"
 fi
 
-ACX_PTHREAD
+AX_PTHREAD
 
 AC_LANG(C)
 
@@ -415,7 +415,6 @@ AST_EXT_LIB_SETUP([CRYPT], [password and data encryption], [crypt])
 AST_EXT_LIB_SETUP([CRYPTO], [OpenSSL Cryptography], [crypto])
 AST_EXT_LIB_SETUP_OPTIONAL([OPENSSL_SRTP], [OpenSSL SRTP Extension Support], [CRYPTO], [crypto])
 AST_EXT_LIB_SETUP_OPTIONAL([OPENSSL_EC], [OpenSSL Elliptic Curve Support], [CRYPTO], [crypto])
-AST_EXT_LIB_SETUP_OPTIONAL([OPENSSL_ECDH_AUTO], [OpenSSL Auto ECDH Support], [CRYPTO], [crypto])
 AST_EXT_LIB_SETUP([DAHDI], [DAHDI], [dahdi])
 AST_EXT_LIB_SETUP([FFMPEG], [Ffmpeg and avcodec], [avcodec])
 AST_EXT_LIB_SETUP([GSM], [External GSM], [gsm], [, use 'internal' GSM otherwise])
@@ -683,7 +682,6 @@ AC_PROG_GCC_TRADITIONAL
 AC_FUNC_MEMCMP
 AC_FUNC_MMAP
 AC_FUNC_SELECT_ARGTYPES
-AC_TYPE_SIGNAL
 AC_FUNC_STAT
 AC_FUNC_STRCOLL
 AC_FUNC_STRFTIME
@@ -1074,6 +1072,7 @@ AST_GCC_ATTRIBUTE(warn_unused_result)
 AST_GCC_ATTRIBUTE(may_alias)
 AST_GCC_ATTRIBUTE(constructor)
 AST_GCC_ATTRIBUTE(destructor)
+AST_GCC_ATTRIBUTE(noreturn,noreturn)
 
 AC_MSG_CHECKING(for -fsanitize=address support)
 saved_sanitize_CFLAGS="${CFLAGS}"
@@ -1214,16 +1213,11 @@ AC_SUBST(AST_SHADOW_WARNINGS)
 
 AC_MSG_CHECKING(for -march=native support)
 if $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
-	if test "${CONFIG_CFLAGS}" = ""; then
-		AC_MSG_RESULT(yes)
-		AST_NATIVE_ARCH=1
-	else
-		AC_MSG_RESULT(user CFLAGS present)
-		AST_NATIVE_ARCH=
-	fi
+	AC_MSG_RESULT(yes)
+	AST_NATIVE_ARCH=1
 else
 	AC_MSG_RESULT(no)
-	AST_NATIVE_ARCH=
+	AST_NATIVE_ARCH=0
 fi
 AC_SUBST(AST_NATIVE_ARCH)
 
@@ -2399,11 +2393,6 @@ fi
 
 if test "$PBX_OPENSSL" = "1";
 then
-        AST_C_DECLARE_CHECK([OPENSSL_ECDH_AUTO], [SSL_CTX_set_ecdh_auto], [openssl/ssl.h])
-fi
-
-if test "$PBX_OPENSSL" = "1";
-then
         AST_C_DEFINE_CHECK([SSL_OP_NO_TLSV1_1], [SSL_OP_NO_TLSv1_1], [openssl/ssl.h])
         AST_C_DEFINE_CHECK([SSL_OP_NO_TLSV1_2], [SSL_OP_NO_TLSv1_2], [openssl/ssl.h])
 fi
diff --git a/contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py b/contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py
new file mode 100644
index 0000000..91774c4
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py
@@ -0,0 +1,23 @@
+"""add fax_detect_timeout option
+
+Revision ID: 4a6c67fa9b7a
+Revises: 9deac0ae4717
+Create Date: 2016-07-18 18:20:44.249491
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '4a6c67fa9b7a'
+down_revision = '9deac0ae4717'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+    op.add_column('ps_endpoints', sa.Column('fax_detect_timeout', sa.Integer))
+
+
+def downgrade():
+    op.drop_column('ps_endpoints', 'fax_detect_timeout')
+
diff --git a/contrib/ast-db-manage/config/versions/9deac0ae4717_pjsip_add_subscribe_context.py b/contrib/ast-db-manage/config/versions/9deac0ae4717_pjsip_add_subscribe_context.py
new file mode 100644
index 0000000..2358fdd
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/9deac0ae4717_pjsip_add_subscribe_context.py
@@ -0,0 +1,21 @@
+"""pjsip_add_subscribe_context
+
+Revision ID: 9deac0ae4717
+Revises: ef7efc2d3964
+Create Date: 2016-07-04 12:11:28.117788
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '9deac0ae4717'
+down_revision = 'ef7efc2d3964'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+    op.add_column('ps_endpoints', sa.Column('subscribe_context', sa.String(40)))
+
+def downgrade():
+    op.drop_column('ps_endpoints', 'subscribe_context')
diff --git a/contrib/ast-db-manage/config/versions/ef7efc2d3964_ps_contacts_add_endpoint_and_modify_.py b/contrib/ast-db-manage/config/versions/ef7efc2d3964_ps_contacts_add_endpoint_and_modify_.py
new file mode 100644
index 0000000..43d4028
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/ef7efc2d3964_ps_contacts_add_endpoint_and_modify_.py
@@ -0,0 +1,33 @@
+"""ps_contacts add endpoint and modify expiration_time to bigint
+
+Revision ID: ef7efc2d3964
+Revises: a845e4d8ade8
+Create Date: 2016-06-02 18:18:46.231920
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = 'ef7efc2d3964'
+down_revision = 'a845e4d8ade8'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+    context = op.get_context()
+
+    op.add_column('ps_contacts', sa.Column('endpoint', sa.String(40)))
+
+    if context.bind.dialect.name != 'postgresql':
+        op.alter_column('ps_contacts', 'expiration_time', type_=sa.BigInteger)
+    else:
+        op.execute('ALTER TABLE ps_contacts ALTER COLUMN expiration_time TYPE BIGINT USING expiration_time::bigint')
+
+    op.create_index('ps_contacts_qualifyfreq_exp', 'ps_contacts', ['qualify_frequency', 'expiration_time'])
+    op.create_index('ps_aors_qualifyfreq_contact', 'ps_aors', ['qualify_frequency', 'contact'])
+def downgrade():
+    op.drop_index('ps_aors_qualifyfreq_contact')
+    op.drop_index('ps_contacts_qualifyfreq_exp')
+    op.drop_column('ps_contacts', 'endpoint')
+    op.alter_column('ps_contacts', 'expiration_time', type_=sa.String(40))
diff --git a/contrib/realtime/mssql/mssql_config.sql b/contrib/realtime/mssql/mssql_config.sql
index 9d493ca..0ea71f7 100644
--- a/contrib/realtime/mssql/mssql_config.sql
+++ b/contrib/realtime/mssql/mssql_config.sql
@@ -1434,6 +1434,48 @@ UPDATE alembic_version SET version_num='a845e4d8ade8' WHERE alembic_version.vers
 
 GO
 
+-- Running upgrade a845e4d8ade8 -> ef7efc2d3964
+
+ALTER TABLE ps_contacts ADD endpoint VARCHAR(40) NULL;
+
+GO
+
+ALTER TABLE ps_contacts ALTER COLUMN expiration_time BIGINT;
+
+GO
+
+CREATE INDEX ps_contacts_qualifyfreq_exp ON ps_contacts (qualify_frequency, expiration_time);
+
+GO
+
+CREATE INDEX ps_aors_qualifyfreq_contact ON ps_aors (qualify_frequency, contact);
+
+GO
+
+UPDATE alembic_version SET version_num='ef7efc2d3964' WHERE alembic_version.version_num = 'a845e4d8ade8';
+
+GO
+
+-- Running upgrade ef7efc2d3964 -> 9deac0ae4717
+
+ALTER TABLE ps_endpoints ADD subscribe_context VARCHAR(40) NULL;
+
+GO
+
+UPDATE alembic_version SET version_num='9deac0ae4717' WHERE alembic_version.version_num = 'ef7efc2d3964';
+
+GO
+
+-- Running upgrade 9deac0ae4717 -> 4a6c67fa9b7a
+
+ALTER TABLE ps_endpoints ADD fax_detect_timeout INTEGER NULL;
+
+GO
+
+UPDATE alembic_version SET version_num='4a6c67fa9b7a' WHERE alembic_version.version_num = '9deac0ae4717';
+
+GO
+
 COMMIT;
 
 GO
diff --git a/contrib/realtime/mysql/mysql_config.sql b/contrib/realtime/mysql/mysql_config.sql
index 3e50b11..2799afa 100644
--- a/contrib/realtime/mysql/mysql_config.sql
+++ b/contrib/realtime/mysql/mysql_config.sql
@@ -897,3 +897,27 @@ ALTER TABLE ps_contacts ADD COLUMN call_id VARCHAR(255);
 
 UPDATE alembic_version SET version_num='a845e4d8ade8' WHERE alembic_version.version_num = 'bca7113d796f';
 
+-- Running upgrade a845e4d8ade8 -> ef7efc2d3964
+
+ALTER TABLE ps_contacts ADD COLUMN endpoint VARCHAR(40);
+
+ALTER TABLE ps_contacts MODIFY expiration_time BIGINT NULL;
+
+CREATE INDEX ps_contacts_qualifyfreq_exp ON ps_contacts (qualify_frequency, expiration_time);
+
+CREATE INDEX ps_aors_qualifyfreq_contact ON ps_aors (qualify_frequency, contact);
+
+UPDATE alembic_version SET version_num='ef7efc2d3964' WHERE alembic_version.version_num = 'a845e4d8ade8';
+
+-- Running upgrade ef7efc2d3964 -> 9deac0ae4717
+
+ALTER TABLE ps_endpoints ADD COLUMN subscribe_context VARCHAR(40);
+
+UPDATE alembic_version SET version_num='9deac0ae4717' WHERE alembic_version.version_num = 'ef7efc2d3964';
+
+-- Running upgrade 9deac0ae4717 -> 4a6c67fa9b7a
+
+ALTER TABLE ps_endpoints ADD COLUMN fax_detect_timeout INTEGER;
+
+UPDATE alembic_version SET version_num='4a6c67fa9b7a' WHERE alembic_version.version_num = '9deac0ae4717';
+
diff --git a/contrib/realtime/oracle/oracle_config.sql b/contrib/realtime/oracle/oracle_config.sql
index ad53e91..e4096cb 100644
--- a/contrib/realtime/oracle/oracle_config.sql
+++ b/contrib/realtime/oracle/oracle_config.sql
@@ -1432,3 +1432,45 @@ UPDATE alembic_version SET version_num='a845e4d8ade8' WHERE alembic_version.vers
 
 /
 
+-- Running upgrade a845e4d8ade8 -> ef7efc2d3964
+
+ALTER TABLE ps_contacts ADD endpoint VARCHAR2(40 CHAR)
+
+/
+
+ALTER TABLE ps_contacts MODIFY expiration_time NUMBER(19)
+
+/
+
+CREATE INDEX ps_contacts_qualifyfreq_exp ON ps_contacts (qualify_frequency, expiration_time)
+
+/
+
+CREATE INDEX ps_aors_qualifyfreq_contact ON ps_aors (qualify_frequency, contact)
+
+/
+
+UPDATE alembic_version SET version_num='ef7efc2d3964' WHERE alembic_version.version_num = 'a845e4d8ade8'
+
+/
+
+-- Running upgrade ef7efc2d3964 -> 9deac0ae4717
+
+ALTER TABLE ps_endpoints ADD subscribe_context VARCHAR2(40 CHAR)
+
+/
+
+UPDATE alembic_version SET version_num='9deac0ae4717' WHERE alembic_version.version_num = 'ef7efc2d3964'
+
+/
+
+-- Running upgrade 9deac0ae4717 -> 4a6c67fa9b7a
+
+ALTER TABLE ps_endpoints ADD fax_detect_timeout INTEGER
+
+/
+
+UPDATE alembic_version SET version_num='4a6c67fa9b7a' WHERE alembic_version.version_num = '9deac0ae4717'
+
+/
+
diff --git a/contrib/realtime/postgresql/postgresql_config.sql b/contrib/realtime/postgresql/postgresql_config.sql
index 8df2fb9..c381ee1 100644
--- a/contrib/realtime/postgresql/postgresql_config.sql
+++ b/contrib/realtime/postgresql/postgresql_config.sql
@@ -967,5 +967,29 @@ ALTER TABLE ps_contacts ADD COLUMN call_id VARCHAR(255);
 
 UPDATE alembic_version SET version_num='a845e4d8ade8' WHERE alembic_version.version_num = 'bca7113d796f';
 
+-- Running upgrade a845e4d8ade8 -> ef7efc2d3964
+
+ALTER TABLE ps_contacts ADD COLUMN endpoint VARCHAR(40);
+
+ALTER TABLE ps_contacts ALTER COLUMN expiration_time TYPE BIGINT USING expiration_time::bigint;
+
+CREATE INDEX ps_contacts_qualifyfreq_exp ON ps_contacts (qualify_frequency, expiration_time);
+
+CREATE INDEX ps_aors_qualifyfreq_contact ON ps_aors (qualify_frequency, contact);
+
+UPDATE alembic_version SET version_num='ef7efc2d3964' WHERE alembic_version.version_num = 'a845e4d8ade8';
+
+-- Running upgrade ef7efc2d3964 -> 9deac0ae4717
+
+ALTER TABLE ps_endpoints ADD COLUMN subscribe_context VARCHAR(40);
+
+UPDATE alembic_version SET version_num='9deac0ae4717' WHERE alembic_version.version_num = 'ef7efc2d3964';
+
+-- Running upgrade 9deac0ae4717 -> 4a6c67fa9b7a
+
+ALTER TABLE ps_endpoints ADD COLUMN fax_detect_timeout INTEGER;
+
+UPDATE alembic_version SET version_num='4a6c67fa9b7a' WHERE alembic_version.version_num = '9deac0ae4717';
+
 COMMIT;
 
diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index bda28e9..fb24089 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -175,7 +175,9 @@ install_unpackaged() {
 			cd libsrtp
 			git pull
 		fi
-		./configure CFLAGS=-fPIC && make libsrtp.a && make uninstall && make install
+		git checkout "1_5_x_throttle"
+		./configure --disable-debug --disable-stdout --enable-openssl
+		make shared_library uninstall install
 		cd ..
 		echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf
 		/sbin/ldconfig
diff --git a/funcs/func_curl.c b/funcs/func_curl.c
index 61b0590..c7a1c6e 100644
--- a/funcs/func_curl.c
+++ b/funcs/func_curl.c
@@ -794,6 +794,7 @@ static struct ast_custom_function acf_curlopt = {
 	.write = acf_curlopt_write,
 };
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(vulnerable_url)
 {
 	const char *bad_urls [] = {
@@ -841,6 +842,7 @@ AST_TEST_DEFINE(vulnerable_url)
 
 	return res;
 }
+#endif
 
 static int unload_module(void)
 {
diff --git a/funcs/func_env.c b/funcs/func_env.c
index 3c260a2..072714f 100644
--- a/funcs/func_env.c
+++ b/funcs/func_env.c
@@ -624,7 +624,7 @@ static int file_read(struct ast_channel *chan, const char *cmd, char *data, stru
 				ast_log(LOG_ERROR, "Cannot seek to offset %" PRId64 ": %s\n", i, strerror(errno));
 			}
 			end = fread(fbuf, 1, sizeof(fbuf), ff);
-			for (pos = (end < sizeof(fbuf) ? fbuf + end - 1 : fbuf + sizeof(fbuf) - 1); pos > fbuf - 1; pos--) {
+			for (pos = (end < sizeof(fbuf) ? fbuf + end - 1 : fbuf + sizeof(fbuf) - 1); pos >= fbuf; pos--) {
 				LINE_COUNTER(pos, format, count);
 
 				if (length < 0 && count * -1 == length) {
@@ -1024,7 +1024,7 @@ static int file_write(struct ast_channel *chan, const char *cmd, char *data, con
 						fclose(ff);
 						return -1;
 					}
-					for (pos = fbuf + sizeof(fbuf) - 1; pos > fbuf - 1; pos--) {
+					for (pos = fbuf + sizeof(fbuf) - 1; pos >= fbuf; pos--) {
 						LINE_COUNTER(pos, newline_format, count);
 
 						if (length < 0 && count * -1 == length) {
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index e831d6f..5e53dbc 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -103,6 +103,9 @@
 /* Define to 1 if your GCC C compiler supports the 'may_alias' attribute. */
 #undef HAVE_ATTRIBUTE_may_alias
 
+/* Define to 1 if your GCC C compiler supports the 'noreturn' attribute. */
+#undef HAVE_ATTRIBUTE_noreturn
+
 /* Define to 1 if your GCC C compiler supports the 'pure' attribute. */
 #undef HAVE_ATTRIBUTE_pure
 
@@ -548,9 +551,6 @@
 /* Define to 1 if CRYPTO has the OpenSSL Elliptic Curve Support feature. */
 #undef HAVE_OPENSSL_EC
 
-/* Define if your system has SSL_CTX_set_ecdh_auto declared. */
-#undef HAVE_OPENSSL_ECDH_AUTO
-
 /* Define to 1 if CRYPTO has the OpenSSL SRTP Extension Support feature. */
 #undef HAVE_OPENSSL_SRTP
 
@@ -708,6 +708,9 @@
    */
 #undef HAVE_PTHREAD_MUTEX_RECURSIVE_NP
 
+/* Have PTHREAD_PRIO_INHERIT. */
+#undef HAVE_PTHREAD_PRIO_INHERIT
+
 /* Define if your system has the PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
    headers. */
 #undef HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
@@ -1211,9 +1214,21 @@
 /* Defined if libcurl supports HTTPS */
 #undef LIBCURL_PROTOCOL_HTTPS
 
+/* Defined if libcurl supports IMAP */
+#undef LIBCURL_PROTOCOL_IMAP
+
 /* Defined if libcurl supports LDAP */
 #undef LIBCURL_PROTOCOL_LDAP
 
+/* Defined if libcurl supports POP3 */
+#undef LIBCURL_PROTOCOL_POP3
+
+/* Defined if libcurl supports RTSP */
+#undef LIBCURL_PROTOCOL_RTSP
+
+/* Defined if libcurl supports SMTP */
+#undef LIBCURL_PROTOCOL_SMTP
+
 /* Defined if libcurl supports TELNET */
 #undef LIBCURL_PROTOCOL_TELNET
 
@@ -1252,9 +1267,6 @@
 /* Define if your system needs braces around PTHREAD_ONCE_INIT */
 #undef PTHREAD_ONCE_INIT_NEEDS_BRACES
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
 /* Define to the type of arg 1 for `select'. */
 #undef SELECT_TYPE_ARG1
 
diff --git a/include/asterisk/compiler.h b/include/asterisk/compiler.h
index 77b5de4..6ceaa5f 100644
--- a/include/asterisk/compiler.h
+++ b/include/asterisk/compiler.h
@@ -77,6 +77,12 @@
 #define attribute_may_alias
 #endif
 
+#ifdef HAVE_ATTRIBUTE_noreturn
+#define attribute_noreturn __attribute__((noreturn))
+#else
+#define attribute_noreturn
+#endif
+
 /* Some older version of GNU gcc (3.3.5 on OpenBSD 4.3 for example) dont like 'NULL' as sentinel */
 #define SENTINEL ((char *)NULL)
 
diff --git a/include/asterisk/event_defs.h b/include/asterisk/event_defs.h
index 80a8d7d..2d5c75a 100644
--- a/include/asterisk/event_defs.h
+++ b/include/asterisk/event_defs.h
@@ -58,8 +58,10 @@ enum ast_event_type {
 	AST_EVENT_ACL_CHANGE          = 0x0b,
 	/*! Send out a ping for debugging distributed events */
 	AST_EVENT_PING                = 0x0c,
+	/*! A cluster discovery message */
+	AST_EVENT_CLUSTER_DISCOVERY   = 0x0d,
 	/*! Number of event types.  This should be the last event type + 1 */
-	AST_EVENT_TOTAL               = 0x0d,
+	AST_EVENT_TOTAL               = 0x0e,
 };
 
 /*! \brief Event Information Element types */
@@ -302,8 +304,15 @@ enum ast_event_ie_type {
 	 * Payload type: UINT
 	 */
 	AST_EVENT_IE_CACHABLE            = 0x003d,
+
+	/*!
+	 * \brief Cluster node ID
+	 * Used by: Corosync
+	 * Payload type: UINT
+	 */
+	AST_EVENT_IE_NODE_ID             = 0x003e,
 	/*! \brief Must be the last IE value +1 */
-	AST_EVENT_IE_TOTAL               = 0x003e,
+	AST_EVENT_IE_TOTAL               = 0x003f,
 };
 
 /*!
diff --git a/include/asterisk/format_cache.h b/include/asterisk/format_cache.h
index 9f4e06a..ff03bb4 100644
--- a/include/asterisk/format_cache.h
+++ b/include/asterisk/format_cache.h
@@ -224,6 +224,14 @@ extern struct ast_format *ast_format_t140_red;
 extern struct ast_format *ast_format_none;
 
 /*!
+ * \brief Built-in SILK format.
+ */
+extern struct ast_format *ast_format_silk8;
+extern struct ast_format *ast_format_silk12;
+extern struct ast_format *ast_format_silk16;
+extern struct ast_format *ast_format_silk24;
+
+/*!
  * \brief Initialize format cache support within the core.
  *
  * \retval 0 success
diff --git a/include/asterisk/res_fax.h b/include/asterisk/res_fax.h
index 2304da7..5119bfa 100644
--- a/include/asterisk/res_fax.h
+++ b/include/asterisk/res_fax.h
@@ -179,11 +179,11 @@ struct ast_fax_session_details {
 	unsigned int t38timeout;
 	/*! the id of the t.38 gateway framehook for this channel */
 	int gateway_id;
-	/*! the timeout for this gateway in seconds */
+	/*! The timeout for this gateway in ms */
 	int gateway_timeout;
 	/*! the id of the faxdetect framehook for this channel */
 	int faxdetect_id;
-	/*! The timeout for this fax detect in seconds */
+	/*! The timeout for this fax detect in ms */
 	int faxdetect_timeout;
 	/*! flags used for fax detection */
 	int faxdetect_flags;
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index 68c6b71..b94546b 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -256,6 +256,8 @@ struct ast_sip_contact {
 	int via_port;
 	/*! Content of the Call-ID header in REGISTER request */
 	AST_STRING_FIELD_EXTENDED(call_id);
+	/*! The name of the endpoint that added the contact */
+	AST_STRING_FIELD_EXTENDED(endpoint_name);
 };
 
 #define CONTACT_STATUS "contact_status"
@@ -502,6 +504,8 @@ struct ast_sip_endpoint_subscription_configuration {
 	unsigned int minexpiry;
 	/*! Message waiting configuration */
 	struct ast_sip_mwi_configuration mwi;
+	/* Context for SUBSCRIBE requests */
+	char context[AST_MAX_CONTEXT];
 };
 
 /*!
@@ -741,10 +745,12 @@ struct ast_sip_endpoint {
 	unsigned int usereqphone;
 	/*! Do we send messages for connected line updates for unanswered incoming calls immediately to this endpoint? */
 	unsigned int rpid_immediate;
-	/* Access control list */
+	/*! Access control list */
 	struct ast_acl_list *acl;
-	/* Restrict what IPs are allowed in the Contact header (for registration) */
+	/*! Restrict what IPs are allowed in the Contact header (for registration) */
 	struct ast_acl_list *contact_acl;
+	/*! The number of seconds into call to disable fax detection.  (0 = disabled) */
+	unsigned int faxdetect_timeout;
 };
 
 /*!
@@ -987,6 +993,16 @@ void ast_sip_unregister_endpoint_identifier(struct ast_sip_endpoint_identifier *
 void *ast_sip_endpoint_alloc(const char *name);
 
 /*!
+ * \brief Change state of a persistent endpoint.
+ *
+ * \param endpoint The SIP endpoint name to change state.
+ * \param state The new state
+ * \retval 0 Success
+ * \retval -1 Endpoint not found
+ */
+int ast_sip_persistent_endpoint_update_state(const char *endpoint_name, enum ast_endpoint_state state);
+
+/*!
  * \brief Get a pointer to the PJSIP endpoint.
  *
  * This is useful when modules have specific information they need
diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h
index e4c54a1..7e65e6d 100644
--- a/include/asterisk/res_pjsip_session.h
+++ b/include/asterisk/res_pjsip_session.h
@@ -137,7 +137,7 @@ struct ast_sip_session {
 	struct ast_party_id id;
 	/*! Requested capabilities */
 	struct ast_format_cap *req_caps;
-	/*! Optional DSP, used only for inband DTMF detection if configured */
+	/*! Optional DSP, used only for inband DTMF/Fax-CNG detection if configured */
 	struct ast_dsp *dsp;
 	/*! Whether the termination of the session should be deferred */
 	unsigned int defer_terminate:1;
diff --git a/include/asterisk/stasis_system.h b/include/asterisk/stasis_system.h
index 8c6e60f..274c02e 100644
--- a/include/asterisk/stasis_system.h
+++ b/include/asterisk/stasis_system.h
@@ -122,6 +122,12 @@ struct stasis_message_type *ast_cc_failure_type(void);
 struct stasis_message_type *ast_cc_monitorfailed_type(void);
 
 /*!
+ * \brief A \ref stasis_message_type for Cluster discovery
+ * \since 13.11.0
+ */
+struct stasis_message_type *ast_cluster_discovery_type(void);
+
+/*!
  * \brief Initialize the stasis system topic and message types
  * \retval 0 on success
  * \retval -1 on failure
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index c7a4737..c311e9c 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -843,9 +843,14 @@ struct ast_http_digest {
  */
 int ast_parse_digest(const char *digest, struct ast_http_digest *d, int request, int pedantic);
 
+#ifdef DO_CRASH
+#define DO_CRASH_NORETURN attribute_noreturn
+#else
+#define DO_CRASH_NORETURN
+#endif
 
 #ifdef AST_DEVMODE
-void __ast_assert_failed(int condition, const char *condition_str, const char *file, int line, const char *function);
+void DO_CRASH_NORETURN __ast_assert_failed(int condition, const char *condition_str, const char *file, int line, const char *function);
 #define ast_assert(a) _ast_assert(a, # a, __FILE__, __LINE__, __PRETTY_FUNCTION__)
 static void force_inline _ast_assert(int condition, const char *condition_str, const char *file, int line, const char *function)
 {
@@ -864,7 +869,7 @@ static void force_inline _ast_assert(int condition, const char *condition_str, c
  *
  * \return Nothing
  */
-void ast_do_crash(void);
+void DO_CRASH_NORETURN ast_do_crash(void);
 
 #include "asterisk/strings.h"
 
diff --git a/main/ast_expr2.c b/main/ast_expr2.c
index 781abd9..a3c715a 100644
--- a/main/ast_expr2.c
+++ b/main/ast_expr2.c
@@ -3672,6 +3672,8 @@ op_tildetilde (struct val *a, struct val *b)
 	vs = malloc(strlen(a->u.s)+strlen(b->u.s)+1);
 	if (vs == NULL) {
 		ast_log(LOG_WARNING, "malloc() failed\n");
+		free_value(a);
+		free_value(b);
 		return NULL;
 	}
 
diff --git a/main/ast_expr2.y b/main/ast_expr2.y
index 913bc26..4f60877 100644
--- a/main/ast_expr2.y
+++ b/main/ast_expr2.y
@@ -1665,6 +1665,8 @@ op_tildetilde (struct val *a, struct val *b)
 	vs = malloc(strlen(a->u.s)+strlen(b->u.s)+1);
 	if (vs == NULL) {
 		ast_log(LOG_WARNING, "malloc() failed\n");
+		free_value(a);
+		free_value(b);
 		return NULL;
 	}
 
diff --git a/main/astobj2_hash.c b/main/astobj2_hash.c
index 1cd6ee2..341ff79 100644
--- a/main/astobj2_hash.c
+++ b/main/astobj2_hash.c
@@ -298,7 +298,7 @@ static enum ao2_container_insert hash_ao2_insert_node(struct ao2_container_hash
 					break;
 				case AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE:
 					SWAP(cur->common.obj, node->common.obj);
-					ao2_t_ref(node, -1, "Discard the new node.");
+					__ao2_ref(node, -1);
 					return AO2_CONTAINER_INSERT_NODE_OBJ_REPLACED;
 				}
 			}
@@ -331,7 +331,7 @@ static enum ao2_container_insert hash_ao2_insert_node(struct ao2_container_hash
 					break;
 				case AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE:
 					SWAP(cur->common.obj, node->common.obj);
-					ao2_t_ref(node, -1, "Discard the new node.");
+					__ao2_ref(node, -1);
 					return AO2_CONTAINER_INSERT_NODE_OBJ_REPLACED;
 				}
 			}
diff --git a/main/astobj2_rbtree.c b/main/astobj2_rbtree.c
index d8195d4..a8d5e3a 100644
--- a/main/astobj2_rbtree.c
+++ b/main/astobj2_rbtree.c
@@ -1267,7 +1267,7 @@ static enum ao2_container_insert rb_ao2_insert_node(struct ao2_container_rbtree
 		break;
 	case AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE:
 		SWAP(cur->common.obj, node->common.obj);
-		ao2_t_ref(node, -1, "Don't need the new node.");
+		__ao2_ref(node, -1);
 		return AO2_CONTAINER_INSERT_NODE_OBJ_REPLACED;
 	}
 
diff --git a/main/bridge_channel.c b/main/bridge_channel.c
index 543988d..2fafdf9 100644
--- a/main/bridge_channel.c
+++ b/main/bridge_channel.c
@@ -1543,8 +1543,13 @@ static void testsuite_notify_feature_success(struct ast_channel *chan, const cha
 {
 #ifdef TEST_FRAMEWORK
 	char *feature = "unknown";
-	struct ast_featuremap_config *featuremap = ast_get_chan_featuremap_config(chan);
-	struct ast_features_xfer_config *xfer = ast_get_chan_features_xfer_config(chan);
+	struct ast_featuremap_config *featuremap;
+	struct ast_features_xfer_config *xfer;
+
+	ast_channel_lock(chan);
+	featuremap = ast_get_chan_featuremap_config(chan);
+	xfer = ast_get_chan_features_xfer_config(chan);
+	ast_channel_unlock(chan);
 
 	if (featuremap) {
 		if (!strcmp(dtmf, featuremap->blindxfer)) {
diff --git a/main/channel.c b/main/channel.c
index 327ec64..73f795f 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2692,10 +2692,28 @@ void ast_hangup(struct ast_channel *chan)
 	ast_channel_unref(chan);
 }
 
+/*!
+ * \internal
+ * \brief Set channel answered time if not already set.
+ * \since 13.11.0
+ *
+ * \param chan Channel to set answered time.
+ *
+ * \return Nothing
+ */
+static void set_channel_answer_time(struct ast_channel *chan)
+{
+	if (ast_tvzero(ast_channel_answertime(chan))) {
+		struct timeval answertime;
+
+		answertime = ast_tvnow();
+		ast_channel_answertime_set(chan, &answertime);
+	}
+}
+
 int ast_raw_answer(struct ast_channel *chan)
 {
 	int res = 0;
-	struct timeval answertime;
 
 	ast_channel_lock(chan);
 
@@ -2711,8 +2729,11 @@ int ast_raw_answer(struct ast_channel *chan)
 		return -1;
 	}
 
-	answertime = ast_tvnow();
-	ast_channel_answertime_set(chan, &answertime);
+	/*
+	 * Mark when incoming channel answered so we can know how
+	 * long the channel has been up.
+	 */
+	set_channel_answer_time(chan);
 
 	ast_channel_unlock(chan);
 
@@ -3911,6 +3932,12 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
 					ast_frfree(f);
 					f = &ast_null_frame;
 				} else {
+					/*
+					 * Mark when outgoing channel answered so we can know how
+					 * long the channel has been up.
+					 */
+					set_channel_answer_time(chan);
+
 					ast_setstate(chan, AST_STATE_UP);
 				}
 			} else if (f->subclass.integer == AST_CONTROL_READ_ACTION) {
diff --git a/main/codec_builtin.c b/main/codec_builtin.c
index d3f6517..1d329bc 100644
--- a/main/codec_builtin.c
+++ b/main/codec_builtin.c
@@ -772,6 +772,65 @@ static struct ast_codec t140 = {
 	.type = AST_MEDIA_TYPE_TEXT,
 };
 
+static int silk_samples(struct ast_frame *frame)
+{
+	/* XXX This is likely not at all what's intended from this callback. However,
+	 * since SILK is variable bit rate, I have no idea how to take a frame of data
+	 * and determine the number of samples present. Instead, we base this on the
+	 * sample rate of the codec and the expected number of samples to receive in 20ms.
+	 * In testing, this has worked just fine.
+	 */
+	return ast_format_get_sample_rate(frame->subclass.format) / 50;
+}
+
+static struct ast_codec silk8 = {
+	.name = "silk",
+	.description = "SILK Codec (8 KHz)",
+	.type = AST_MEDIA_TYPE_AUDIO,
+	.sample_rate = 8000,
+	.minimum_ms = 20,
+	.maximum_ms = 100,
+	.default_ms = 20,
+	.minimum_bytes = 160,
+	.samples_count = silk_samples
+};
+
+static struct ast_codec silk12 = {
+	.name = "silk",
+	.description = "SILK Codec (12 KHz)",
+	.type = AST_MEDIA_TYPE_AUDIO,
+	.sample_rate = 12000,
+	.minimum_ms = 20,
+	.maximum_ms = 100,
+	.default_ms = 20,
+	.minimum_bytes = 240,
+	.samples_count = silk_samples
+};
+
+static struct ast_codec silk16 = {
+	.name = "silk",
+	.description = "SILK Codec (16 KHz)",
+	.type = AST_MEDIA_TYPE_AUDIO,
+	.sample_rate = 16000,
+	.minimum_ms = 20,
+	.maximum_ms = 100,
+	.default_ms = 20,
+	.minimum_bytes = 320,
+	.samples_count = silk_samples
+};
+
+static struct ast_codec silk24 = {
+	.name = "silk",
+	.description = "SILK Codec (24 KHz)",
+	.type = AST_MEDIA_TYPE_AUDIO,
+	.sample_rate = 24000,
+	.minimum_ms = 20,
+	.maximum_ms = 100,
+	.default_ms = 20,
+	.minimum_bytes = 480,
+	.samples_count = silk_samples
+};
+
 #define CODEC_REGISTER_AND_CACHE(codec) \
 	({ \
 		int __res_ ## __LINE__ = 0; \
@@ -843,6 +902,10 @@ int ast_codec_builtin_init(void)
 	res |= CODEC_REGISTER_AND_CACHE(t140red);
 	res |= CODEC_REGISTER_AND_CACHE(t140);
 	res |= CODEC_REGISTER_AND_CACHE(none);
+	res |= CODEC_REGISTER_AND_CACHE_NAMED("silk8", silk8);
+	res |= CODEC_REGISTER_AND_CACHE_NAMED("silk12", silk12);
+	res |= CODEC_REGISTER_AND_CACHE_NAMED("silk16", silk16);
+	res |= CODEC_REGISTER_AND_CACHE_NAMED("silk24", silk24);
 
 	return res;
 }
diff --git a/main/dsp.c b/main/dsp.c
index 0874163..18f2a22 100644
--- a/main/dsp.c
+++ b/main/dsp.c
@@ -171,8 +171,7 @@ enum gsamp_thresh {
  */
 
 #define DTMF_THRESHOLD		8.0e7
-#define FAX_THRESHOLD		8.0e7
-#define FAX_2ND_HARMONIC	2.0     /* 4dB */
+#define TONE_THRESHOLD		7.8e7
 
 #define DEF_DTMF_NORMAL_TWIST		6.31	 /* 8.0dB */
 #define DEF_RELAX_DTMF_NORMAL_TWIST	6.31	 /* 8.0dB */
@@ -187,8 +186,6 @@ enum gsamp_thresh {
 
 #define DTMF_RELATIVE_PEAK_ROW	6.3     /* 8dB */
 #define DTMF_RELATIVE_PEAK_COL	6.3     /* 8dB */
-#define DTMF_2ND_HARMONIC_ROW       (relax ? 1.7 : 2.5)     /* 4dB normal */
-#define DTMF_2ND_HARMONIC_COL	63.1    /* 18dB */
 #define DTMF_TO_TOTAL_ENERGY	42.0
 
 #define BELL_MF_THRESHOLD	1.6e9
@@ -583,7 +580,8 @@ static int tone_detect(struct ast_dsp *dsp, tone_detect_state_t *s, int16_t *amp
 
 		ast_debug(10, "tone %d, Ew=%.2E, Et=%.2E, s/n=%10.2f\n", s->freq, tone_energy, s->energy, tone_energy / (s->energy - tone_energy));
 		hit = 0;
-		if (tone_energy > s->energy * s->threshold) {
+		if (TONE_THRESHOLD <= tone_energy
+			&& tone_energy > s->energy * s->threshold) {
 			ast_debug(10, "Hit! count=%d\n", s->hit_count);
 			hit = 1;
 		}
diff --git a/main/features.c b/main/features.c
index b96cbd6..43ec5e1 100644
--- a/main/features.c
+++ b/main/features.c
@@ -64,7 +64,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/cli.h"
 #include "asterisk/manager.h"
 #include "asterisk/utils.h"
-#include "asterisk/adsi.h"
 #include "asterisk/devicestate.h"
 #include "asterisk/audiohook.h"
 #include "asterisk/global_datastores.h"
@@ -767,8 +766,8 @@ static int action_bridge(struct mansession *s, const struct message *m)
 		astman_send_error(s, m, buf);
 		return 0;
 	}
-	xfer_cfg_a = ast_get_chan_features_xfer_config(chana);
 	ast_channel_lock(chana);
+	xfer_cfg_a = ast_get_chan_features_xfer_config(chana);
 	chana_exten = ast_strdupa(ast_channel_exten(chana));
 	chana_context = ast_strdupa(ast_channel_context(chana));
 	chana_priority = ast_channel_priority(chana);
@@ -783,8 +782,8 @@ static int action_bridge(struct mansession *s, const struct message *m)
 		astman_send_error(s, m, buf);
 		return 0;
 	}
-	xfer_cfg_b = ast_get_chan_features_xfer_config(chanb);
 	ast_channel_lock(chanb);
+	xfer_cfg_b = ast_get_chan_features_xfer_config(chanb);
 	chanb_exten = ast_strdupa(ast_channel_exten(chanb));
 	chanb_context = ast_strdupa(ast_channel_context(chanb));
 	chanb_priority = ast_channel_priority(chanb);
@@ -1098,7 +1097,9 @@ static int bridge_exec(struct ast_channel *chan, const char *data)
 		goto done;
 	}
 
+	ast_channel_lock(current_dest_chan);
 	xfer_cfg = ast_get_chan_features_xfer_config(current_dest_chan);
+	ast_channel_unlock(current_dest_chan);
 	bridge_add_failed = ast_bridge_add_channel(bridge, current_dest_chan, peer_features,
 		ast_test_flag(&opts, BRIDGE_OPT_PLAYTONE),
 		xfer_cfg ? xfer_cfg->xfersound : NULL);
diff --git a/main/format_cache.c b/main/format_cache.c
index 6638a78..74ebfe8 100644
--- a/main/format_cache.c
+++ b/main/format_cache.c
@@ -232,6 +232,14 @@ struct ast_format *ast_format_t140_red;
  */
 struct ast_format *ast_format_none;
 
+/*!
+ * \brief Built-in "silk" format
+ */
+struct ast_format *ast_format_silk8;
+struct ast_format *ast_format_silk12;
+struct ast_format *ast_format_silk16;
+struct ast_format *ast_format_silk24;
+
 /*! \brief Number of buckets to use for the media format cache (should be prime for performance reasons) */
 #define CACHE_BUCKETS 53
 
@@ -331,6 +339,10 @@ static void format_cache_shutdown(void)
 	ao2_replace(ast_format_t140_red, NULL);
 	ao2_replace(ast_format_t140, NULL);
 	ao2_replace(ast_format_none, NULL);
+	ao2_replace(ast_format_silk8, NULL);
+	ao2_replace(ast_format_silk12, NULL);
+	ao2_replace(ast_format_silk16, NULL);
+	ao2_replace(ast_format_silk24, NULL);
 }
 
 int ast_format_cache_init(void)
@@ -426,6 +438,14 @@ static void set_cached_format(const char *name, struct ast_format *format)
 		ao2_replace(ast_format_t140, format);
 	} else if (!strcmp(name, "none")) {
 		ao2_replace(ast_format_none, format);
+	} else if (!strcmp(name, "silk8")) {
+		ao2_replace(ast_format_silk8, format);
+	} else if (!strcmp(name, "silk12")) {
+		ao2_replace(ast_format_silk12, format);
+	} else if (!strcmp(name, "silk16")) {
+		ao2_replace(ast_format_silk16, format);
+	} else if (!strcmp(name, "silk24")) {
+		ao2_replace(ast_format_silk24, format);
 	}
 }
 
diff --git a/main/pbx.c b/main/pbx.c
index 6b0069c..5bafee3 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -4682,6 +4682,13 @@ static struct ast_context *find_context_locked(const char *context)
 	return c;
 }
 
+/*! \brief Free an ast_include and associated data. */
+static void include_free(struct ast_include *include)
+{
+	ast_destroy_timing(&(include->timing));
+	ast_free(include);
+}
+
 /*!
  * \brief Remove included contexts.
  * This function locks contexts list by &conlist, search for the right context
@@ -4729,8 +4736,7 @@ int ast_context_remove_include2(struct ast_context *con, const char *include, co
 			else
 				con->includes = i->next;
 			/* free include and return */
-			ast_destroy_timing(&(i->timing));
-			ast_free(i);
+			include_free(i);
 			ret = 0;
 			break;
 		}
@@ -6481,8 +6487,7 @@ int ast_context_add_include2(struct ast_context *con, const char *value,
 	/* ... go to last include and check if context is already included too... */
 	for (i = con->includes; i; i = i->next) {
 		if (!strcasecmp(i->name, new_include->name)) {
-			ast_destroy_timing(&(new_include->timing));
-			ast_free(new_include);
+			include_free(new_include);
 			ast_unlock_context(con);
 			errno = EEXIST;
 			return -1;
@@ -7706,7 +7711,7 @@ static void __ast_internal_context_destroy( struct ast_context *con)
 	for (tmpi = tmp->includes; tmpi; ) { /* Free includes */
 		struct ast_include *tmpil = tmpi;
 		tmpi = tmpi->next;
-		ast_free(tmpil);
+		include_free(tmpil);
 	}
 	for (ipi = tmp->ignorepats; ipi; ) { /* Free ignorepats */
 		struct ast_ignorepat *ipl = ipi;
@@ -7800,12 +7805,12 @@ void __ast_context_destroy(struct ast_context *list, struct ast_hashtab *context
 					if (pi) {
 						pi->next = i->next;
 						/* free include */
-						ast_free(i);
+						include_free(i);
 						continue; /* don't change pi */
 					} else {
 						tmp->includes = i->next;
 						/* free include */
-						ast_free(i);
+						include_free(i);
 						continue; /* don't change pi */
 					}
 				}
diff --git a/main/say.c b/main/say.c
index 51dc4e2..f19ed71 100644
--- a/main/say.c
+++ b/main/say.c
@@ -5201,13 +5201,14 @@ int ast_say_date_with_format_it(struct ast_channel *chan, time_t t, const char *
 			case 'I':
 			case 'l':
 				/* 12-Hour */
-				if (tm.tm_hour == 0)
+				if (tm.tm_hour == 0) {
 					ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg));
-				else if (tm.tm_hour > 12)
+				} else if (tm.tm_hour > 12) {
 					snprintf(nextmsg, sizeof(nextmsg), "digits/%d", tm.tm_hour - 12);
-				else
+				} else {
 					snprintf(nextmsg, sizeof(nextmsg), "digits/%d", tm.tm_hour);
-					res = wait_file(chan, ints, nextmsg, lang);
+				}
+				res = wait_file(chan, ints, nextmsg, lang);
 				break;
 			case 'H':
 			case 'k':
@@ -5227,11 +5228,12 @@ int ast_say_date_with_format_it(struct ast_channel *chan, time_t t, const char *
 			case 'P':
 			case 'p':
 				/* AM/PM */
-				if (tm.tm_hour > 11)
+				if (tm.tm_hour > 11) {
 					ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
-				else
+				} else {
 					ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
-					res = wait_file(chan, ints, nextmsg, lang);
+				}
+				res = wait_file(chan, ints, nextmsg, lang);
 				break;
 			case 'Q':
 				/* Shorthand for "Today", "Yesterday", or ABdY */
diff --git a/main/stasis_endpoints.c b/main/stasis_endpoints.c
index c31714b..8cc6050 100644
--- a/main/stasis_endpoints.c
+++ b/main/stasis_endpoints.c
@@ -253,6 +253,7 @@ static struct ast_json *contactstatus_to_json(struct stasis_message *msg, const
 	struct ast_endpoint_blob *obj = stasis_message_data(msg);
 	struct ast_json *json_endpoint;
 	struct ast_json *json_final;
+	const char *rtt;
 	const struct timeval *tv = stasis_message_timestamp(msg);
 
 	json_endpoint = ast_endpoint_snapshot_to_json(obj->snapshot, NULL);
@@ -260,15 +261,30 @@ static struct ast_json *contactstatus_to_json(struct stasis_message *msg, const
 		return NULL;
 	}
 
-	json_final = ast_json_pack("{s: s, s: o, s: o, s: { s: s, s: s, s: s, s: s } } ",
-		"type", "ContactStatusChange",
-		"timestamp", ast_json_timeval(*tv, NULL),
-		"endpoint", json_endpoint,
-		"contact_info",
-		"uri", ast_json_string_get(ast_json_object_get(obj->blob, "uri")),
-		"contact_status", ast_json_string_get(ast_json_object_get(obj->blob, "contact_status")),
-		"aor", ast_json_string_get(ast_json_object_get(obj->blob, "aor")),
-		"roundtrip_usec", ast_json_string_get(ast_json_object_get(obj->blob, "roundtrip_usec")));
+	/* The roundtrip time is optional. */
+	rtt = ast_json_string_get(ast_json_object_get(obj->blob, "roundtrip_usec"));
+	if (!ast_strlen_zero(rtt)) {
+		json_final = ast_json_pack("{s: s, s: o, s: o, s: { s: s, s: s, s: s, s: s } } ",
+			"type", "ContactStatusChange",
+			"timestamp", ast_json_timeval(*tv, NULL),
+			"endpoint", json_endpoint,
+			"contact_info",
+			"uri", ast_json_string_get(ast_json_object_get(obj->blob, "uri")),
+			"contact_status", ast_json_string_get(ast_json_object_get(obj->blob,
+				"contact_status")),
+			"aor", ast_json_string_get(ast_json_object_get(obj->blob, "aor")),
+			"roundtrip_usec", rtt);
+	} else {
+		json_final = ast_json_pack("{s: s, s: o, s: o, s: { s: s, s: s, s: s } } ",
+			"type", "ContactStatusChange",
+			"timestamp", ast_json_timeval(*tv, NULL),
+			"endpoint", json_endpoint,
+			"contact_info",
+			"uri", ast_json_string_get(ast_json_object_get(obj->blob, "uri")),
+			"contact_status", ast_json_string_get(ast_json_object_get(obj->blob,
+				"contact_status")),
+			"aor", ast_json_string_get(ast_json_object_get(obj->blob, "aor")));
+	}
 	if (!json_final) {
 		ast_json_unref(json_endpoint);
 	}
diff --git a/main/stasis_system.c b/main/stasis_system.c
index e232b8e..67970bd 100644
--- a/main/stasis_system.c
+++ b/main/stasis_system.c
@@ -115,6 +115,7 @@ STASIS_MESSAGE_TYPE_DEFN(ast_cc_failure_type,
 STASIS_MESSAGE_TYPE_DEFN(ast_cc_monitorfailed_type,
 	.to_ami = cc_monitorfailed_to_ami,
 	);
+STASIS_MESSAGE_TYPE_DEFN(ast_cluster_discovery_type);
 
 void ast_system_publish_registry(const char *channeltype, const char *username, const char *domain, const char *status, const char *cause)
 {
@@ -362,6 +363,7 @@ static void stasis_system_cleanup(void)
 	STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_recallcomplete_type);
 	STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_failure_type);
 	STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_monitorfailed_type);
+	STASIS_MESSAGE_TYPE_CLEANUP(ast_cluster_discovery_type);
 }
 
 /*! \brief Initialize the system level items for \ref stasis */
@@ -422,5 +424,9 @@ int ast_stasis_system_init(void)
 		return -1;
 	}
 
+	if (STASIS_MESSAGE_TYPE_INIT(ast_cluster_discovery_type) != 0) {
+		return -1;
+	}
+
 	return 0;
 }
diff --git a/main/stdtime/localtime.c b/main/stdtime/localtime.c
index 702edbe..9cdf614 100644
--- a/main/stdtime/localtime.c
+++ b/main/stdtime/localtime.c
@@ -1849,13 +1849,14 @@ void ast_get_dst_info(const time_t * const timep, int *dst_enabled, time_t *dst_
 		*dst_enabled = 0;
 		/* Find where I can get gmtoff */
 		i = 0;
-		while (sp->ttis[i].tt_isdst)
+		while (sp->ttis[i].tt_isdst) {
 			if (++i >= sp->typecnt) {
-			i = 0;
-			break;
+				i = 0;
+				break;
 			}
-			*gmt_off = sp->ttis[i].tt_gmtoff;
-			return;
+		}
+		*gmt_off = sp->ttis[i].tt_gmtoff;
+		return;
 	}
 
 	for (i = 1; i < sp->timecnt; ++i) {
diff --git a/main/threadpool.c b/main/threadpool.c
index 9cd33ab..6240b73 100644
--- a/main/threadpool.c
+++ b/main/threadpool.c
@@ -1384,10 +1384,12 @@ struct ast_taskprocessor *ast_threadpool_serializer_group(const char *name,
 		ao2_ref(ser, -1);
 		return NULL;
 	}
-	/* ser ref transferred to listener */
 
 	tps = ast_taskprocessor_create_with_listener(name, listener);
-	if (tps && shutdown_group) {
+	if (!tps) {
+		/* ser ref transferred to listener but not cleaned without tps */
+		ao2_ref(ser, -1);
+	} else if (shutdown_group) {
 		serializer_shutdown_group_inc(shutdown_group);
 	}
 
diff --git a/main/translate.c b/main/translate.c
index 6a39bac..73e03a8 100644
--- a/main/translate.c
+++ b/main/translate.c
@@ -494,7 +494,7 @@ struct ast_trans_pvt *ast_translator_build_path(struct ast_format *dst, struct a
 			AST_RWLIST_UNLOCK(&translators);
 			return NULL;
 		}
-		if ((t->dst_codec.sample_rate == ast_format_get_sample_rate(dst)) && (t->dst_codec.type == ast_format_get_type(dst)) && (!strcmp(t->dst_codec.name, ast_format_get_name(dst)))) {
+		if ((t->dst_codec.sample_rate == ast_format_get_sample_rate(dst)) && (t->dst_codec.type == ast_format_get_type(dst))) {
 			explicit_dst = dst;
 		}
 		if (!(cur = newpvt(t, explicit_dst))) {
diff --git a/main/utils.c b/main/utils.c
index 95eda11..bd74ee2 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -2425,7 +2425,7 @@ char *ast_utils_which(const char *binary, char *fullpath, size_t fullpath_size)
 	return NULL;
 }
 
-void ast_do_crash(void)
+void DO_CRASH_NORETURN ast_do_crash(void)
 {
 #if defined(DO_CRASH)
 	abort();
@@ -2438,7 +2438,7 @@ void ast_do_crash(void)
 }
 
 #if defined(AST_DEVMODE)
-void __ast_assert_failed(int condition, const char *condition_str, const char *file, int line, const char *function)
+void DO_CRASH_NORETURN __ast_assert_failed(int condition, const char *condition_str, const char *file, int line, const char *function)
 {
 	/*
 	 * Attempt to put it into the logger, but hope that at least
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c
index 2888d35..2d991a5 100644
--- a/res/res_config_odbc.c
+++ b/res/res_config_odbc.c
@@ -137,6 +137,7 @@ static SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data)
 
 	if (!ast_strlen_zero(cps->extra)) {
 		const char *newval = cps->extra;
+		ast_debug(1, "Parameter %d = '%s'\n", x, newval);
 		if (strchr(newval, ';') || strchr(newval, '^')) {
 			ENCODE_CHUNK(encodebuf, newval);
 			ast_string_field_set(cps, encoding[x], encodebuf);
diff --git a/res/res_corosync.c b/res/res_corosync.c
index 72da3f1..9ffffaa 100644
--- a/res/res_corosync.c
+++ b/res/res_corosync.c
@@ -47,11 +47,16 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
 #include "asterisk/app.h"
 #include "asterisk/stasis.h"
 #include "asterisk/stasis_message_router.h"
+#include "asterisk/stasis_system.h"
 
 AST_RWLOCK_DEFINE_STATIC(event_types_lock);
 
 static void publish_mwi_to_stasis(struct ast_event *event);
 static void publish_device_state_to_stasis(struct ast_event *event);
+static void publish_cluster_discovery_to_stasis(struct ast_event *event);
+
+/*! \brief All the nodes that we're aware of */
+static struct ao2_container *nodes;
 
 /*! \brief The internal topic used for message forwarding and pings */
 static struct stasis_topic *corosync_aggregate_topic;
@@ -65,6 +70,78 @@ static struct stasis_topic *corosync_topic(void)
 	return corosync_aggregate_topic;
 }
 
+struct corosync_node {
+	/*! The corosync ID */
+	int id;
+	/*! The Asterisk EID */
+	struct ast_eid eid;
+	/*! The IP address of the node */
+	struct ast_sockaddr addr;
+};
+
+static struct corosync_node *corosync_node_alloc(struct ast_event *event)
+{
+	struct corosync_node *node;
+
+	node = ao2_alloc_options(sizeof(*node), NULL, AO2_ALLOC_OPT_LOCK_NOLOCK);
+	if (!node) {
+		return NULL;
+	}
+
+	memcpy(&node->eid, (struct ast_eid *)ast_event_get_ie_raw(event, AST_EVENT_IE_EID), sizeof(node->eid));
+	node->id = ast_event_get_ie_uint(event, AST_EVENT_IE_NODE_ID);
+	ast_sockaddr_parse(&node->addr, ast_event_get_ie_str(event, AST_EVENT_IE_LOCAL_ADDR), PARSE_PORT_IGNORE);
+
+	return node;
+}
+
+static int corosync_node_hash_fn(const void *obj, const int flags)
+{
+	const struct corosync_node *node;
+	const int *id;
+
+	switch (flags & OBJ_SEARCH_MASK) {
+	case OBJ_SEARCH_KEY:
+		id = obj;
+		break;
+	case OBJ_SEARCH_OBJECT:
+		node = obj;
+		id = &node->id;
+		break;
+	default:
+		ast_assert(0);
+		return 0;
+	}
+	return *id;
+}
+
+static int corosync_node_cmp_fn(void *obj, void *arg, int flags)
+{
+	struct corosync_node *left = obj;
+	struct corosync_node *right = arg;
+	const int *id = arg;
+	int cmp;
+
+	switch (flags & OBJ_SEARCH_MASK) {
+	case OBJ_SEARCH_OBJECT:
+		id = &right->id;
+		/* Fall through */
+	case OBJ_SEARCH_KEY:
+		cmp = (left->id == *id);
+		break;
+	case OBJ_SEARCH_PARTIAL_KEY:
+		cmp = (left->id == right->id);
+		break;
+	default:
+		/* Sort can only work on something with a full or partial key. */
+		ast_assert(0);
+		cmp = 1;
+		break;
+	}
+	return cmp ? CMP_MATCH : 0;
+}
+
+
 /*! \brief A payload wrapper around a corosync ping event */
 struct corosync_ping_payload {
 	/*! The corosync ping event being passed over \ref stasis */
@@ -167,6 +244,12 @@ static struct {
 	                     .topic_fn = corosync_topic,
 	                     .message_type_fn = corosync_ping_message_type,
 	                     .publish_to_stasis = publish_corosync_ping_to_stasis, },
+	[AST_EVENT_CLUSTER_DISCOVERY] = { .name = "cluster_discovery",
+	                                  .publish_default = 1,
+	                                  .subscribe_default = 1,
+	                                  .topic_fn = ast_system_topic,
+	                                  .message_type_fn = ast_cluster_discovery_type,
+	                                  .publish_to_stasis = publish_cluster_discovery_to_stasis, },
 };
 
 static struct {
@@ -197,6 +280,97 @@ static corosync_cfg_callbacks_t cfg_callbacks = {
 	.corosync_cfg_shutdown_callback = cfg_shutdown_cb,
 };
 
+/*! \brief Publish cluster discovery to \ref stasis */
+static void publish_cluster_discovery_to_stasis_full(struct corosync_node *node, int joined)
+{
+	struct ast_json *json;
+	struct ast_json_payload *payload;
+	struct stasis_message *message;
+	char eid[18];
+	const char *addr;
+
+	ast_eid_to_str(eid, sizeof(eid), &node->eid);
+	addr = ast_sockaddr_stringify_addr(&node->addr);
+
+	ast_log(AST_LOG_NOTICE, "Node %u (%s) at %s %s the cluster\n",
+		node->id,
+		eid,
+		addr,
+		joined ? "joined" : "left");
+
+	json = ast_json_pack("{s: s, s: i, s: s, s: i}",
+		"address", addr,
+		"node_id", node->id,
+		"eid", eid,
+		"joined", joined);
+	if (!json) {
+		return;
+	}
+
+	payload = ast_json_payload_create(json);
+	if (!payload) {
+		ast_json_unref(json);
+		return;
+	}
+
+	message = stasis_message_create(ast_cluster_discovery_type(), payload);
+	if (!message) {
+		ast_json_unref(json);
+		ao2_ref(payload, -1);
+		return;
+	}
+
+	stasis_publish(ast_system_topic(), message);
+	ast_json_unref(json);
+	ao2_ref(payload, -1);
+	ao2_ref(message, -1);
+}
+
+static void send_cluster_notify(void);
+
+/*! \brief Publish a received cluster discovery \ref ast_event to \ref stasis */
+static void publish_cluster_discovery_to_stasis(struct ast_event *event)
+{
+	struct corosync_node *node;
+	int id = ast_event_get_ie_uint(event, AST_EVENT_IE_NODE_ID);
+	struct ast_eid *event_eid;
+
+	ast_assert(ast_event_get_type(event) == AST_EVENT_CLUSTER_DISCOVERY);
+
+	event_eid = (struct ast_eid *)ast_event_get_ie_raw(event, AST_EVENT_IE_EID);
+	if (!ast_eid_cmp(&ast_eid_default, event_eid)) {
+		/* Don't feed events back in that originated locally. */
+		return;
+	}
+
+	ao2_lock(nodes);
+	node = ao2_find(nodes, &id, OBJ_SEARCH_KEY | OBJ_NOLOCK);
+	if (node) {
+		/* We already know about this node */
+		ao2_unlock(nodes);
+		ao2_ref(node, -1);
+		return;
+	}
+
+	node = corosync_node_alloc(event);
+	if (!node) {
+		ao2_unlock(nodes);
+		return;
+	}
+	ao2_link_flags(nodes, node, OBJ_NOLOCK);
+	ao2_unlock(nodes);
+
+	publish_cluster_discovery_to_stasis_full(node, 1);
+
+	ao2_ref(node, -1);
+
+	/*
+	 * When we get news that someone else has joined, we need to let them
+	 * know we exist as well.
+	 */
+	send_cluster_notify();
+}
+
 /*! \brief Publish a received MWI \ref ast_event to \ref stasis */
 static void publish_mwi_to_stasis(struct ast_event *event)
 {
@@ -228,7 +402,7 @@ static void publish_mwi_to_stasis(struct ast_event *event)
 
 	if (ast_publish_mwi_state_full(mailbox, context, (int)new_msgs,
 	                               (int)old_msgs, NULL, event_eid)) {
-		char eid[16];
+		char eid[18];
 		ast_eid_to_str(eid, sizeof(eid), event_eid);
 		ast_log(LOG_WARNING, "Failed to publish MWI message for %s@%s from %s\n",
 			mailbox, context, eid);
@@ -255,7 +429,7 @@ static void publish_device_state_to_stasis(struct ast_event *event)
 	}
 
 	if (ast_publish_device_state_full(device, state, cachable, event_eid)) {
-		char eid[16];
+		char eid[18];
 		ast_eid_to_str(eid, sizeof(eid), event_eid);
 		ast_log(LOG_WARNING, "Failed to publish device state message for %s from %s\n",
 			device, eid);
@@ -342,10 +516,27 @@ static void cpg_deliver_cb(cpg_handle_t handle, const struct cpg_name *group_nam
 	publish_handler(event);
 }
 
-static void publish_to_corosync(struct stasis_message *message)
+static void publish_event_to_corosync(struct ast_event *event)
 {
 	cs_error_t cs_err;
 	struct iovec iov;
+
+	iov.iov_base = (void *)event;
+	iov.iov_len = ast_event_get_size(event);
+
+	ast_debug(5, "Publishing event %s (%u) to corosync\n",
+		ast_event_get_type_name(event), ast_event_get_type(event));
+
+	/* The stasis subscription will only exist if we are configured to publish
+	 * these events, so just send away. */
+	if ((cs_err = cpg_mcast_joined(cpg_handle, CPG_TYPE_FIFO, &iov, 1)) != CS_OK) {
+		ast_log(LOG_WARNING, "CPG mcast failed (%u) for event %s (%u)\n",
+			cs_err, ast_event_get_type_name(event), ast_event_get_type(event));
+	}
+}
+
+static void publish_to_corosync(struct stasis_message *message)
+{
 	struct ast_event *event;
 
 	event = stasis_message_to_event(message);
@@ -368,17 +559,7 @@ static void publish_to_corosync(struct stasis_message *message)
 		ast_log(LOG_NOTICE, "Sending event PING from this server with EID: '%s'\n", buf);
 	}
 
-	iov.iov_base = (void *)event;
-	iov.iov_len = ast_event_get_size(event);
-
-	ast_debug(5, "Publishing event %s (%u) to corosync\n",
-		ast_event_get_type_name(event), ast_event_get_type(event));
-
-	/* The stasis subscription will only exist if we are configured to publish
-	 * these events, so just send away. */
-	if ((cs_err = cpg_mcast_joined(cpg_handle, CPG_TYPE_FIFO, &iov, 1)) != CS_OK) {
-		ast_log(LOG_WARNING, "CPG mcast failed (%u)\n", cs_err);
-	}
+	publish_event_to_corosync(event);
 }
 
 static void stasis_message_cb(void *data, struct stasis_subscription *sub, struct stasis_message *message)
@@ -410,9 +591,22 @@ static void cpg_confchg_cb(cpg_handle_t handle, const struct cpg_name *group_nam
 {
 	unsigned int i;
 
+
+	for (i = 0; i < left_list_entries; i++) {
+		const struct cpg_address *cpg_node = &left_list[i];
+		struct corosync_node* node;
+
+		node = ao2_find(nodes, &cpg_node->nodeid, OBJ_UNLINK | OBJ_SEARCH_KEY);
+		if (!node) {
+			continue;
+		}
+
+		publish_cluster_discovery_to_stasis_full(node, 0);
+		ao2_ref(node, -1);
+	}
+
 	/* If any new nodes have joined, dump our cache of events we are publishing
 	 * that originated from this server. */
-
 	if (!joined_list_entries) {
 		return;
 	}
@@ -442,6 +636,45 @@ static void cpg_confchg_cb(cpg_handle_t handle, const struct cpg_name *group_nam
 	}
 }
 
+/*! \brief Informs the cluster of our EID and our IP addresses */
+static void send_cluster_notify(void)
+{
+	struct ast_event *event;
+	unsigned int node_id;
+	cs_error_t cs_err;
+	corosync_cfg_node_address_t corosync_addr;
+	int num_addrs = 0;
+	struct sockaddr *sa;
+	size_t sa_len;
+	char buf[128];
+	int res;
+
+	if ((cs_err = corosync_cfg_local_get(cfg_handle, &node_id)) != CS_OK) {
+		ast_log(LOG_WARNING, "Failed to extract Corosync node ID for this node. Not informing cluster of existance.\n");
+		return;
+	}
+
+	if (((cs_err = corosync_cfg_get_node_addrs(cfg_handle, node_id, 1, &num_addrs, &corosync_addr)) != CS_OK) || (num_addrs < 1)) {
+		ast_log(LOG_WARNING, "Failed to get local Corosync address. Not informing cluster of existance.\n");
+		return;
+	}
+
+	sa = (struct sockaddr *)corosync_addr.address;
+	sa_len = (size_t)corosync_addr.address_length;
+	if ((res = getnameinfo(sa, sa_len, buf, sizeof(buf), NULL, 0, NI_NUMERICHOST))) {
+		ast_log(LOG_WARNING, "Failed to determine name of local Corosync address: %s (%d). Not informing cluster of existance.\n",
+			gai_strerror(res), res);
+		return;
+	}
+
+	event = ast_event_new(AST_EVENT_CLUSTER_DISCOVERY,
+				    AST_EVENT_IE_NODE_ID, AST_EVENT_IE_PLTYPE_UINT, node_id,
+				    AST_EVENT_IE_LOCAL_ADDR, AST_EVENT_IE_PLTYPE_STR, buf,
+				    AST_EVENT_IE_END);
+	publish_event_to_corosync(event);
+	ast_free(event);
+}
+
 static void *dispatch_thread_handler(void *data)
 {
 	cs_error_t cs_err;
@@ -463,6 +696,7 @@ static void *dispatch_thread_handler(void *data)
 
 	pfd[2].fd = dispatch_thread.alert_pipe[0];
 
+	send_cluster_notify();
 	while (!dispatch_thread.stop) {
 		int res;
 
@@ -530,6 +764,7 @@ static void *dispatch_thread_handler(void *data)
 			}
 
 			ast_log(LOG_NOTICE, "Corosync recovery complete.\n");
+			send_cluster_notify();
 		}
 	}
 
@@ -858,6 +1093,9 @@ static void cleanup_module(void)
 		ast_log(LOG_ERROR, "Failed to finalize cfg (%d)\n", (int) cs_err);
 	}
 	cfg_handle = 0;
+
+	ao2_cleanup(nodes);
+	nodes = NULL;
 }
 
 static int load_module(void)
@@ -865,6 +1103,11 @@ static int load_module(void)
 	cs_error_t cs_err;
 	struct cpg_name name;
 
+	nodes = ao2_container_alloc(23, corosync_node_hash_fn, corosync_node_cmp_fn);
+	if (!nodes) {
+		goto failed;
+	}
+
 	corosync_aggregate_topic = stasis_topic_create("corosync_aggregate_topic");
 	if (!corosync_aggregate_topic) {
 		ast_log(AST_LOG_ERROR, "Failed to create stasis topic for corosync\n");
diff --git a/res/res_fax.c b/res/res_fax.c
index ad6e238..86260d1 100644
--- a/res/res_fax.c
+++ b/res/res_fax.c
@@ -468,8 +468,6 @@ struct fax_gateway {
 struct fax_detect {
 	/*! \brief the start of our timeout counter */
 	struct timeval timeout_start;
-	/*! \brief faxdetect timeout */
-	int timeout;
 	/*! \brief DSP Processor */
 	struct ast_dsp *dsp;
 	/*! \brief original audio formats */
@@ -3539,13 +3537,13 @@ static void destroy_faxdetect(void *data)
 		ast_dsp_free(faxdetect->dsp);
 		faxdetect->dsp = NULL;
 	}
-	ao2_ref(faxdetect->details, -1);
+	ao2_cleanup(faxdetect->details);
 	ao2_cleanup(faxdetect->orig_format);
 }
 
 /*! \brief Create a new fax detect object.
  * \param chan the channel attaching to
- * \param timeout remove framehook in this time if set
+ * \param timeout in ms to remove framehook in this time if not zero
  * \param flags required options
  * \return NULL or a fax gateway object
  */
@@ -3652,8 +3650,9 @@ static struct ast_frame *fax_detect_framehook(struct ast_channel *chan, struct a
 		return f;
 	}
 
-	if ((!ast_tvzero(faxdetect->timeout_start) &&
-	    (ast_tvdiff_ms(ast_tvnow(), faxdetect->timeout_start) > faxdetect->timeout))) {
+	if (!ast_tvzero(faxdetect->timeout_start)
+		&& ast_tvdiff_ms(ast_tvnow(), faxdetect->timeout_start) > details->faxdetect_timeout) {
+		ast_debug(1, "FAXOPT(faxdetect) timeout on %s\n", ast_channel_name(chan));
 		ast_framehook_detach(chan, details->faxdetect_id);
 		details->faxdetect_id = -1;
 		return f;
@@ -3701,30 +3700,36 @@ static struct ast_frame *fax_detect_framehook(struct ast_channel *chan, struct a
 	}
 
 	if (result) {
-		const char *target_context = S_OR(ast_channel_macrocontext(chan), ast_channel_context(chan));
+		const char *target_context;
+
 		switch (result) {
 		case 'f':
 		case 't':
+			target_context = S_OR(ast_channel_macrocontext(chan), ast_channel_context(chan));
+
 			ast_channel_unlock(chan);
+			ast_frfree(f);
+			f = &ast_null_frame;
 			if (ast_exists_extension(chan, target_context, "fax", 1,
 			    S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
-				ast_channel_lock(chan);
 				ast_verb(2, "Redirecting '%s' to fax extension due to %s detection\n",
 					ast_channel_name(chan), (result == 'f') ? "CNG" : "T38");
 				pbx_builtin_setvar_helper(chan, "FAXEXTEN", ast_channel_exten(chan));
 				if (ast_async_goto(chan, target_context, "fax", 1)) {
 					ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", ast_channel_name(chan), target_context);
 				}
-				ast_frfree(f);
-				f = &ast_null_frame;
 			} else {
-				ast_channel_lock(chan);
 				ast_log(LOG_NOTICE, "FAX %s detected but no fax extension in context (%s)\n",
 					(result == 'f') ? "CNG" : "T38", target_context);
 			}
+			ast_channel_lock(chan);
+
+			ast_framehook_detach(chan, details->faxdetect_id);
+			details->faxdetect_id = -1;
+			break;
+		default:
+			break;
 		}
-		ast_framehook_detach(chan, details->faxdetect_id);
-		details->faxdetect_id = -1;
 	}
 
 	return f;
@@ -3732,7 +3737,7 @@ static struct ast_frame *fax_detect_framehook(struct ast_channel *chan, struct a
 
 /*! \brief Attach a faxdetect framehook object to a channel.
  * \param chan the channel to attach to
- * \param timeout remove framehook in this time if set
+ * \param timeout in ms to remove framehook in this time if not zero
  * \return the faxdetect structure or NULL on error
  * \param flags required options
  * \retval -1 error
@@ -4480,8 +4485,14 @@ static int acf_faxopt_write(struct ast_channel *chan, const char *cmd, char *dat
 				details->gateway_timeout = 0;
 				if (timeout) {
 					unsigned int gwtimeout;
-					if (sscanf(timeout, "%u", &gwtimeout) == 1) {
-						details->gateway_timeout = gwtimeout * 1000;
+
+					if (sscanf(timeout, "%30u", &gwtimeout) == 1) {
+						if (gwtimeout >= 0) {
+							details->gateway_timeout = gwtimeout * 1000;
+						} else {
+							ast_log(LOG_WARNING, "%s(%s) timeout cannot be negative.  Ignoring timeout\n",
+								cmd, data);
+						}
 					} else {
 						ast_log(LOG_WARNING, "Unsupported timeout '%s' passed to FAXOPT(%s).\n", timeout, data);
 					}
@@ -4516,11 +4527,18 @@ static int acf_faxopt_write(struct ast_channel *chan, const char *cmd, char *dat
 
 		if (ast_true(val) || !strcasecmp(val, "t38") || !strcasecmp(val, "cng")) {
 			if (details->faxdetect_id < 0) {
-				if (timeout && (sscanf(timeout, "%u", &fdtimeout) == 1)) {
-					if (fdtimeout > 0) {
-						fdtimeout = fdtimeout * 1000;
+				if (timeout) {
+					if (sscanf(timeout, "%30u", &fdtimeout) == 1) {
+						if (fdtimeout >= 0) {
+							fdtimeout *= 1000;
+						} else {
+							ast_log(LOG_WARNING, "%s(%s) timeout cannot be negative.  Ignoring timeout\n",
+								cmd, data);
+							fdtimeout = 0;
+						}
 					} else {
-						ast_log(LOG_WARNING, "Timeout cannot be negative ignoring timeout\n");
+						ast_log(LOG_WARNING, "Unsupported timeout '%s' passed to FAXOPT(%s).\n",
+							timeout, data);
 					}
 				}
 
diff --git a/res/res_format_attr_silk.c b/res/res_format_attr_silk.c
index dcbbe4c..d52ec74 100644
--- a/res/res_format_attr_silk.c
+++ b/res/res_format_attr_silk.c
@@ -40,7 +40,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
  * \note The only attribute that affects compatibility here is the sample rate.
  */
 struct silk_attr {
-	unsigned int samplerate;
 	unsigned int maxbitrate;
 	unsigned int dtx;
 	unsigned int fec;
@@ -54,10 +53,15 @@ static void silk_destroy(struct ast_format *format)
 	ast_free(attr);
 }
 
+static void attr_init(struct silk_attr *attr)
+{
+	memset(attr, 0, sizeof(*attr));
+}
+
 static int silk_clone(const struct ast_format *src, struct ast_format *dst)
 {
 	struct silk_attr *original = ast_format_get_attribute_data(src);
-	struct silk_attr *attr = ast_calloc(1, sizeof(*attr));
+	struct silk_attr *attr = ast_malloc(sizeof(*attr));
 
 	if (!attr) {
 		return -1;
@@ -65,6 +69,8 @@ static int silk_clone(const struct ast_format *src, struct ast_format *dst)
 
 	if (original) {
 		*attr = *original;
+	} else {
+		attr_init(attr);
 	}
 
 	ast_format_set_attribute_data(dst, attr);
@@ -109,17 +115,17 @@ static void silk_generate_sdp_fmtp(const struct ast_format *format, unsigned int
 		ast_str_append(str, 0, "a=fmtp:%u maxaveragebitrate=%u\r\n", payload, attr->maxbitrate);
 	}
 
-	ast_str_append(str, 0, "a=fmtp:%u usedtx=%u\r\n", payload, attr->dtx);
-	ast_str_append(str, 0, "a=fmtp:%u useinbandfec=%u\r\n", payload, attr->fec);
+	if (attr->dtx) {
+		ast_str_append(str, 0, "a=fmtp:%u usedtx=%u\r\n", payload, attr->dtx);
+	}
+	if (attr->fec) {
+		ast_str_append(str, 0, "a=fmtp:%u useinbandfec=%u\r\n", payload, attr->fec);
+	}
 }
 
 static enum ast_format_cmp_res silk_cmp(const struct ast_format *format1, const struct ast_format *format2)
 {
-	struct silk_attr *attr1 = ast_format_get_attribute_data(format1);
-	struct silk_attr *attr2 = ast_format_get_attribute_data(format2);
-
-	if (((!attr1 || !attr1->samplerate) && (!attr2 || !attr2->samplerate)) ||
-		(attr1->samplerate == attr2->samplerate)) {
+	if (ast_format_get_sample_rate(format1) == ast_format_get_sample_rate(format2)) {
 		return AST_FORMAT_CMP_EQUAL;
 	}
 
@@ -130,13 +136,10 @@ static struct ast_format *silk_getjoint(const struct ast_format *format1, const
 {
 	struct silk_attr *attr1 = ast_format_get_attribute_data(format1);
 	struct silk_attr *attr2 = ast_format_get_attribute_data(format2);
-	unsigned int samplerate;
 	struct ast_format *jointformat;
 	struct silk_attr *attr_res;
 
-	samplerate = attr1->samplerate & attr2->samplerate;
-	/* sample rate is the only attribute that has any bearing on if joint capabilities exist or not */
-	if (samplerate) {
+	if (ast_format_get_sample_rate(format1) != ast_format_get_sample_rate(format2)) {
 		return NULL;
 	}
 
@@ -145,22 +148,25 @@ static struct ast_format *silk_getjoint(const struct ast_format *format1, const
 		return NULL;
 	}
 	attr_res = ast_format_get_attribute_data(jointformat);
-	attr_res->samplerate = samplerate;
 
-	/* Take the lowest max bitrate */
-	attr_res->maxbitrate = MIN(attr1->maxbitrate, attr2->maxbitrate);
+	if (!attr1 || !attr2) {
+		attr_init(attr_res);
+	} else {
+		/* Take the lowest max bitrate */
+		attr_res->maxbitrate = MIN(attr1->maxbitrate, attr2->maxbitrate);
 
-	/* Only do dtx if both sides want it. DTX is a trade off between
-	 * computational complexity and bandwidth. */
-	attr_res->dtx = attr1->dtx && attr2->dtx ? 1 : 0;
+		/* Only do dtx if both sides want it. DTX is a trade off between
+		 * computational complexity and bandwidth. */
+		attr_res->dtx = attr1->dtx && attr2->dtx ? 1 : 0;
 
-	/* Only do FEC if both sides want it.  If a peer specifically requests not
-	 * to receive with FEC, it may be a waste of bandwidth. */
-	attr_res->fec = attr1->fec && attr2->fec ? 1 : 0;
+		/* Only do FEC if both sides want it.  If a peer specifically requests not
+		 * to receive with FEC, it may be a waste of bandwidth. */
+		attr_res->fec = attr1->fec && attr2->fec ? 1 : 0;
 
-	/* Use the maximum packetloss percentage between the two attributes. This affects how
-	 * much redundancy is used in the FEC. */
-	attr_res->packetloss_percentage = MAX(attr1->packetloss_percentage, attr2->packetloss_percentage);
+		/* Use the maximum packetloss percentage between the two attributes. This affects how
+		 * much redundancy is used in the FEC. */
+		attr_res->packetloss_percentage = MAX(attr1->packetloss_percentage, attr2->packetloss_percentage);
+	}
 
 	return jointformat;
 }
@@ -183,9 +189,7 @@ static struct ast_format *silk_set(const struct ast_format *format, const char *
 	}
 	attr = ast_format_get_attribute_data(cloned);
 
-	if (!strcasecmp(name, "sample_rate")) {
-		attr->samplerate = val;
-	} else if (!strcasecmp(name, "max_bitrate")) {
+	if (!strcasecmp(name, "max_bitrate")) {
 		attr->maxbitrate = val;
 	} else if (!strcasecmp(name, "dtx")) {
 		attr->dtx = val;
@@ -205,9 +209,7 @@ static const void *silk_get(const struct ast_format *format, const char *name)
 	struct silk_attr *attr = ast_format_get_attribute_data(format);
 	unsigned int *val;
 
-	if (!strcasecmp(name, "sample_rate")) {
-		val = &attr->samplerate;
-	} else if (!strcasecmp(name, "max_bitrate")) {
+	if (!strcasecmp(name, "max_bitrate")) {
 		val = &attr->maxbitrate;
 	} else if (!strcasecmp(name, "dtx")) {
 		val = &attr->dtx;
diff --git a/res/res_format_attr_siren14.c b/res/res_format_attr_siren14.c
new file mode 100644
index 0000000..dea13ae
--- /dev/null
+++ b/res/res_format_attr_siren14.c
@@ -0,0 +1,94 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2016, Digium, Inc.
+ *
+ * Joshua Colp <jcolp at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*!
+ * \file
+ * \brief Siren14 format attribute interface
+ *
+ * \author Joshua Colp <jcolp at digium.com>
+ */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/module.h"
+#include "asterisk/format.h"
+
+/* Destroy is a required callback and must exist */
+static void siren14_destroy(struct ast_format *format)
+{
+}
+
+/* Clone is a required callback and must exist */
+static int siren14_clone(const struct ast_format *src, struct ast_format *dst)
+{
+	return 0;
+}
+
+static struct ast_format *siren14_parse_sdp_fmtp(const struct ast_format *format, const char *attributes)
+{
+	unsigned int val;
+
+	if (sscanf(attributes, "bitrate=%30u", &val) == 1) {
+		if (val != 48000) {
+			ast_log(LOG_WARNING, "Got siren14 offer at %u bps, but only 48000 bps supported; ignoring.\n", val);
+			return NULL;
+		}
+	}
+
+	/* We aren't modifying the format and once passed back it won't be touched, so use what we were given */
+	return ao2_bump((struct ast_format *)format);
+}
+
+static void siren14_generate_sdp_fmtp(const struct ast_format *format, unsigned int payload, struct ast_str **str)
+{
+	ast_str_append(str, 0, "a=fmtp:%u bitrate=48000\r\n", payload);
+}
+
+static struct ast_format_interface siren14_interface = {
+	.format_destroy = siren14_destroy,
+	.format_clone = siren14_clone,
+	.format_parse_sdp_fmtp = siren14_parse_sdp_fmtp,
+	.format_generate_sdp_fmtp = siren14_generate_sdp_fmtp,
+};
+
+static int load_module(void)
+{
+	if (ast_format_interface_register("siren14", &siren14_interface)) {
+		return AST_MODULE_LOAD_DECLINE;
+	}
+
+	return AST_MODULE_LOAD_SUCCESS;
+}
+
+static int unload_module(void)
+{
+	return 0;
+}
+
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Siren14 Format Attribute Module",
+	.support_level = AST_MODULE_SUPPORT_CORE,
+	.load = load_module,
+	.unload = unload_module,
+	.load_pri = AST_MODPRI_CHANNEL_DEPEND,
+);
diff --git a/res/res_format_attr_siren7.c b/res/res_format_attr_siren7.c
new file mode 100644
index 0000000..840de48
--- /dev/null
+++ b/res/res_format_attr_siren7.c
@@ -0,0 +1,94 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2016, Digium, Inc.
+ *
+ * Joshua Colp <jcolp at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*!
+ * \file
+ * \brief Siren7 format attribute interface
+ *
+ * \author Joshua Colp <jcolp at digium.com>
+ */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/module.h"
+#include "asterisk/format.h"
+
+/* Destroy is a required callback and must exist */
+static void siren7_destroy(struct ast_format *format)
+{
+}
+
+/* Clone is a required callback and must exist */
+static int siren7_clone(const struct ast_format *src, struct ast_format *dst)
+{
+	return 0;
+}
+
+static struct ast_format *siren7_parse_sdp_fmtp(const struct ast_format *format, const char *attributes)
+{
+	unsigned int val;
+
+	if (sscanf(attributes, "bitrate=%30u", &val) == 1) {
+		if (val != 32000) {
+			ast_log(LOG_WARNING, "Got Siren7 offer at %u bps, but only 32000 bps supported; ignoring.\n", val);
+			return NULL;
+		}
+	}
+
+	/* We aren't modifying the format and once passed back it won't be touched, so use what we were given */
+	return ao2_bump((struct ast_format *)format);
+}
+
+static void siren7_generate_sdp_fmtp(const struct ast_format *format, unsigned int payload, struct ast_str **str)
+{
+	ast_str_append(str, 0, "a=fmtp:%u bitrate=32000\r\n", payload);
+}
+
+static struct ast_format_interface siren7_interface = {
+	.format_destroy = siren7_destroy,
+	.format_clone = siren7_clone,
+	.format_parse_sdp_fmtp = siren7_parse_sdp_fmtp,
+	.format_generate_sdp_fmtp = siren7_generate_sdp_fmtp,
+};
+
+static int load_module(void)
+{
+	if (ast_format_interface_register("siren7", &siren7_interface)) {
+		return AST_MODULE_LOAD_DECLINE;
+	}
+
+	return AST_MODULE_LOAD_SUCCESS;
+}
+
+static int unload_module(void)
+{
+	return 0;
+}
+
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Siren7 Format Attribute Module",
+	.support_level = AST_MODULE_SUPPORT_CORE,
+	.load = load_module,
+	.unload = unload_module,
+	.load_pri = AST_MODPRI_CHANNEL_DEPEND,
+);
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index bbaf778..3870e9f 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -24,6 +24,7 @@
 #include <pjsip/sip_transaction.h>
 #include <pj/timer.h>
 #include <pjlib.h>
+#include <pjmedia/errno.h>
 
 #include "asterisk/res_pjsip.h"
 #include "res_pjsip/include/res_pjsip_private.h"
@@ -216,10 +217,9 @@
 							<enum name="info">
 								<para>DTMF is sent as SIP INFO packets.</para>
 							</enum>
-                                                        <enum name="auto">
-                                                                <para>DTMF is sent as RFC 4733 if the other side supports it or as INBAND if not.</para>
-                                                        </enum>
-
+							<enum name="auto">
+								<para>DTMF is sent as RFC 4733 if the other side supports it or as INBAND if not.</para>
+							</enum>
 						</enumlist>
 					</description>
 				</configOption>
@@ -509,15 +509,15 @@
 				<configOption name="g726_non_standard" default="no">
 					<synopsis>Force g.726 to use AAL2 packing order when negotiating g.726 audio</synopsis>
 					<description><para>
-                                                When set to "yes" and an endpoint negotiates g.726 audio then use g.726 for AAL2
-                                                packing order instead of what is recommended by RFC3551. Since this essentially
-                                                replaces the underlying 'g726' codec with 'g726aal2' then 'g726aal2' needs to be
-                                                specified in the endpoint's allowed codec list.
+						When set to "yes" and an endpoint negotiates g.726 audio then use g.726 for AAL2
+						packing order instead of what is recommended by RFC3551. Since this essentially
+						replaces the underlying 'g726' codec with 'g726aal2' then 'g726aal2' needs to be
+						specified in the endpoint's allowed codec list.
 					</para></description>
 				</configOption>
 				<configOption name="inband_progress" default="no">
 					<synopsis>Determines whether chan_pjsip will indicate ringing using inband
-					    progress.</synopsis>
+						progress.</synopsis>
 					<description><para>
 						If set to <literal>yes</literal>, chan_pjsip will send a 183 Session Progress
 						when told to indicate ringing and will immediately start sending ringing
@@ -599,6 +599,14 @@
 						detected.
 					</para></description>
 				</configOption>
+				<configOption name="fax_detect_timeout">
+					<synopsis>How long into a call before fax_detect is disabled for the call</synopsis>
+					<description><para>
+						The option determines how many seconds into a call before the
+						fax_detect option is disabled for the call.  Setting the value
+						to zero disables the timeout.
+					</para></description>
+				</configOption>
 				<configOption name="t38_udptl_nat" default="no">
 					<synopsis>Whether NAT support is enabled on UDPTL sessions</synopsis>
 					<description><para>
@@ -802,7 +810,7 @@
 				<configOption name="set_var">
 					<synopsis>Variable set on a channel involving the endpoint.</synopsis>
 					<description><para>
-					        When a new channel is created using the endpoint set the specified
+						When a new channel is created using the endpoint set the specified
 						variable(s) on that channel. For multiple channel variables specify
 						multiple 'set_var'(s).
 					</para></description>
@@ -896,6 +904,15 @@
 						mask with a slash ('/')
 					</para></description>
 				</configOption>
+				<configOption name="subscribe_context">
+					<synopsis>Context for incoming MESSAGE requests.</synopsis>
+					<description><para>
+						If specified, incoming SUBSCRIBE requests will be searched for the matching
+						extension in the indicated context.
+						If no <replaceable>subscribe_context</replaceable> is specified,
+						then the <replaceable>context</replaceable> setting is used.
+					</para></description>
+				</configOption>
 			</configObject>
 			<configObject name="auth">
 				<synopsis>Authentication type</synopsis>
@@ -1166,6 +1183,12 @@
 						REGISTER requests and is not intended to be configured manually.
 					</para></description>
 				</configOption>
+				<configOption name="endpoint">
+					<synopsis>Endpoint name</synopsis>
+					<description><para>
+						The name of the endpoint this contact belongs to
+					</para></description>
+				</configOption>
 				<configOption name="reg_server">
 					<synopsis>Asterisk Server name</synopsis>
 					<description><para>
@@ -1428,9 +1451,9 @@
 					<synopsis>Value used in User-Agent header for SIP requests and Server header for SIP responses.</synopsis>
 				</configOption>
 				<configOption name="regcontext" default="">
-                                        <synopsis>When set, Asterisk will dynamically create and destroy a NoOp priority 1 extension for a given
-					peer who registers or unregisters with us.</synopsis>
-                                </configOption>
+					<synopsis>When set, Asterisk will dynamically create and destroy a NoOp priority 1 extension for a given
+						peer who registers or unregisters with us.</synopsis>
+				</configOption>
 				<configOption name="default_outbound_endpoint" default="default_outbound_endpoint">
 					<synopsis>Endpoint to use when sending an outbound request to a URI without a specified endpoint.</synopsis>
 				</configOption>
@@ -1439,15 +1462,15 @@
 				</configOption>
 				<configOption name="debug" default="no">
 					<synopsis>Enable/Disable SIP debug logging.  Valid options include yes|no or
-                                        a host address</synopsis>
+						a host address</synopsis>
 				</configOption>
 				<configOption name="endpoint_identifier_order" default="ip,username,anonymous">
 					<synopsis>The order by which endpoint identifiers are processed and checked.
-                                        Identifier names are usually derived from and can be found in the endpoint
-                                        identifier module itself (res_pjsip_endpoint_identifier_*).
-                                        You can use the CLI command "pjsip show identifiers" to see the
-                                        identifiers currently available.</synopsis>
-                    <description>
+						Identifier names are usually derived from and can be found in the endpoint
+						identifier module itself (res_pjsip_endpoint_identifier_*).
+						You can use the CLI command "pjsip show identifiers" to see the
+						identifiers currently available.</synopsis>
+					<description>
 						<note><para>
 						One of the identifiers is "auth_username" which matches on the username in
 						an Authentication header.  This method has some security considerations because an
@@ -1461,17 +1484,17 @@
 						how many unmatched requests are received from a single ip address before a security
 						event is generated using the unidentified_request parameters.
 						</para></note>
-                    </description>
+					</description>
 				</configOption>
 				<configOption name="default_from_user" default="asterisk">
 					<synopsis>When Asterisk generates an outgoing SIP request, the From header username will be
-                                        set to this value if there is no better option (such as CallerID) to be
-                                        used.</synopsis>
+						set to this value if there is no better option (such as CallerID) to be
+						used.</synopsis>
 				</configOption>
 				<configOption name="default_realm" default="asterisk">
 					<synopsis>When Asterisk generates an challenge, the digest will be
-                                        set to this value if there is no better option (such as auth/realm) to be
-                                        used.</synopsis>
+						set to this value if there is no better option (such as auth/realm) to be
+						used.</synopsis>
 				</configOption>
 			</configObject>
 		</configFile>
@@ -1951,6 +1974,9 @@
 				<parameter name="ActiveChannels">
 					<para>The number of active channels associated with this endpoint.</para>
 				</parameter>
+				<parameter name="SubscribeContext">
+					<para><xi:include xpointer="xpointer(/docs/configInfo[@name='res_pjsip']/configFile[@name='pjsip.conf']/configObject[@name='endpoint']/configOption[@name='subscribe_context']/synopsis/node())"/></para>
+				</parameter>
 			</syntax>
 		</managerEventInstance>
 	</managerEvent>
@@ -2033,7 +2059,7 @@
 			Provides a listing of all endpoints.  For each endpoint an <literal>EndpointList</literal> event
 			is raised that contains relevant attributes and status information.  Once all
 			endpoints have been listed an <literal>EndpointListComplete</literal> event is issued.
-                        </para>
+			</para>
 		</description>
 		<responses>
 			<list-elements>
@@ -2069,7 +2095,7 @@
 			<literal>IdentifyDetail</literal>.  Some events may be listed multiple times if multiple objects are
 			associated (for instance AoRs).  Once all detail events have been raised a final
 			<literal>EndpointDetailComplete</literal> event is issued.
-                        </para>
+			</para>
 		</description>
 		<responses>
 			<list-elements>
@@ -4099,6 +4125,7 @@ long ast_sip_threadpool_queue_size(void)
 	return ast_threadpool_queue_size(sip_threadpool);
 }
 
+#ifdef TEST_FRAMEWORK
 AST_TEST_DEFINE(xml_sanitization_end_null)
 {
 	char sanitized[8];
@@ -4149,6 +4176,7 @@ AST_TEST_DEFINE(xml_sanitization_exceeds_buffer)
 
 	return AST_TEST_PASS;
 }
+#endif
 
 /*!
  * \internal
@@ -4252,6 +4280,19 @@ error:
 	return AST_MODULE_LOAD_DECLINE;
 }
 
+/*
+ * This is a place holder function to ensure that pjmedia_strerr() is at
+ * least directly referenced by this module to ensure that the loader
+ * linker will link to the function.  If a module only indirectly
+ * references a function from another module, such as a callback parameter
+ * to a function, the loader linker has been known to miss the link.
+ */
+void never_called_res_pjsip(void);
+void never_called_res_pjsip(void)
+{
+	pjmedia_strerror(0, NULL, 0);
+}
+
 static int load_module(void)
 {
 	struct ast_threadpool_options options;
@@ -4267,6 +4308,12 @@ static int load_module(void)
 		goto error;
 	}
 
+	/* Register PJMEDIA error codes for SDP parsing errors */
+	if (pj_register_strerror(PJMEDIA_ERRNO_START, PJ_ERRNO_SPACE_SIZE, pjmedia_strerror)
+		!= PJ_SUCCESS) {
+		ast_log(LOG_WARNING, "Failed to register pjmedia error codes.  Codes will not be decoded.\n");
+	}
+
 	if (ast_sip_initialize_system()) {
 		ast_log(LOG_ERROR, "Failed to initialize SIP 'system' configuration section. Aborting load\n");
 		goto error;
diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index b920897..60b4507 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -562,12 +562,13 @@ static int transport_apply(const struct ast_sorcery *sorcery, void *obj)
 		}
 	} else if (transport->type == AST_TRANSPORT_TCP) {
 		pjsip_tcp_transport_cfg cfg;
-		int option = 1;
+		static int option = 1;
 
 		pjsip_tcp_transport_cfg_default(&cfg, temp_state->state->host.addr.sa_family);
 		cfg.bind_addr = temp_state->state->host;
 		cfg.async_cnt = transport->async_operations;
 		set_qos(transport, &cfg.qos_params);
+		/* sockopt_params.options is copied to each newly connected socket */
 		cfg.sockopt_params.options[0].level = pj_SOL_TCP();
 		cfg.sockopt_params.options[0].optname = pj_TCP_NODELAY();
 		cfg.sockopt_params.options[0].optval = &option;
diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c
index f02a72c..9c08cce 100644
--- a/res/res_pjsip/location.c
+++ b/res/res_pjsip/location.c
@@ -122,6 +122,7 @@ static void *contact_alloc(const char *name)
 		return NULL;
 	}
 
+	ast_string_field_init_extended(contact, endpoint_name);
 	ast_string_field_init_extended(contact, reg_server);
 	ast_string_field_init_extended(contact, via_addr);
 	ast_string_field_init_extended(contact, call_id);
@@ -357,6 +358,10 @@ int ast_sip_location_add_contact_nolock(struct ast_sip_aor *aor, const char *uri
 
 	contact->endpoint = ao2_bump(endpoint);
 
+	if (endpoint) {
+		ast_string_field_set(contact, endpoint_name, ast_sorcery_object_get_id(endpoint));
+	}
+
 	return ast_sorcery_create(ast_sip_get_sorcery(), contact);
 }
 
@@ -1141,6 +1146,7 @@ int ast_sip_initialize_sorcery_location(void)
 	ast_sorcery_object_field_register(sorcery, "contact", "authenticate_qualify", "no", OPT_YESNO_T, 1, FLDSET(struct ast_sip_contact, authenticate_qualify));
 	ast_sorcery_object_field_register(sorcery, "contact", "outbound_proxy", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_contact, outbound_proxy));
 	ast_sorcery_object_field_register(sorcery, "contact", "user_agent", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_contact, user_agent));
+	ast_sorcery_object_field_register(sorcery, "contact", "endpoint", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_contact, endpoint_name));
 	ast_sorcery_object_field_register(sorcery, "contact", "reg_server", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_contact, reg_server));
 	ast_sorcery_object_field_register(sorcery, "contact", "via_addr", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_contact, via_addr));
 	ast_sorcery_object_field_register(sorcery, "contact", "via_port", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_contact, via_port));
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 4c70682..9075b95 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -58,6 +58,53 @@ static int persistent_endpoint_cmp(void *obj, void *arg, int flags)
 	return !strcmp(ast_endpoint_get_resource(persistent1->endpoint), id) ? CMP_MATCH | CMP_STOP : 0;
 }
 
+/*! \brief Internal function for changing the state of an endpoint */
+static void endpoint_update_state(struct ast_endpoint *endpoint, enum ast_endpoint_state state)
+{
+	struct ast_json *blob;
+	char *regcontext;
+
+	/* If there was no state change, don't publish anything. */
+	if (ast_endpoint_get_state(endpoint) == state) {
+		return;
+	}
+
+	regcontext = ast_sip_get_regcontext();
+
+	if (state == AST_ENDPOINT_ONLINE) {
+		ast_endpoint_set_state(endpoint, AST_ENDPOINT_ONLINE);
+		blob = ast_json_pack("{s: s}", "peer_status", "Reachable");
+
+		if (!ast_strlen_zero(regcontext)) {
+			if (!ast_exists_extension(NULL, regcontext, ast_endpoint_get_resource(endpoint), 1, NULL)) {
+				ast_add_extension(regcontext, 1, ast_endpoint_get_resource(endpoint), 1, NULL, NULL,
+					"Noop", ast_strdup(ast_endpoint_get_resource(endpoint)), ast_free_ptr, "SIP");
+			}
+		}
+
+		ast_verb(2, "Endpoint %s is now Reachable\n", ast_endpoint_get_resource(endpoint));
+	} else {
+		ast_endpoint_set_state(endpoint, AST_ENDPOINT_OFFLINE);
+		blob = ast_json_pack("{s: s}", "peer_status", "Unreachable");
+
+		if (!ast_strlen_zero(regcontext)) {
+			struct pbx_find_info q = { .stacklen = 0 };
+
+			if (pbx_find_extension(NULL, NULL, &q, regcontext, ast_endpoint_get_resource(endpoint), 1, NULL, "", E_MATCH)) {
+				ast_context_remove_extension(regcontext, ast_endpoint_get_resource(endpoint), 1, NULL);
+			}
+		}
+
+		ast_verb(2, "Endpoint %s is now Unreachable\n", ast_endpoint_get_resource(endpoint));
+	}
+
+	ast_free(regcontext);
+
+	ast_endpoint_blob_publish(endpoint, ast_endpoint_state_type(), blob);
+	ast_json_unref(blob);
+	ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "PJSIP/%s", ast_endpoint_get_resource(endpoint));
+}
+
 static void endpoint_publish_contact_status(struct ast_endpoint *endpoint, struct ast_sip_contact_status *contact)
 {
 	struct ast_json *blob;
@@ -99,28 +146,24 @@ static int persistent_endpoint_update_state(void *obj, void *arg, int flags)
 	struct ast_endpoint *endpoint = persistent->endpoint;
 	struct ast_sip_contact_status *status = arg;
 	struct ao2_container *contacts;
-	struct ast_json *blob;
-	struct ao2_iterator i;
+	struct ao2_iterator iter;
 	struct ast_sip_contact *contact;
 	enum ast_endpoint_state state = AST_ENDPOINT_OFFLINE;
-	char *regcontext;
-
-	if (status) {
-		/* If the status' aor isn't one of the endpoint's, we skip */
-		if (!strstr(persistent->aors, status->aor)) {
-			return 0;
-		}
 
-		endpoint_publish_contact_status(endpoint, status);
+	/* If the status' aor isn't one of the endpoint's, we skip */
+	if (!strstr(persistent->aors, status->aor)) {
+		return 0;
 	}
 
+	endpoint_publish_contact_status(endpoint, status);
+
 	/* Find all the contacts for this endpoint.  If ANY are available,
 	 * mark the endpoint as ONLINE.
 	 */
 	contacts = ast_sip_location_retrieve_contacts_from_aor_list(persistent->aors);
 	if (contacts) {
-		i = ao2_iterator_init(contacts, 0);
-		while (state == AST_ENDPOINT_OFFLINE && (contact = ao2_iterator_next(&i))) {
+		iter = ao2_iterator_init(contacts, 0);
+		while (state == AST_ENDPOINT_OFFLINE && (contact = ao2_iterator_next(&iter))) {
 			struct ast_sip_contact_status *contact_status;
 			const char *contact_id = ast_sorcery_object_get_id(contact);
 
@@ -133,49 +176,11 @@ static int persistent_endpoint_update_state(void *obj, void *arg, int flags)
 			ao2_cleanup(contact_status);
 			ao2_ref(contact, -1);
 		}
-		ao2_iterator_destroy(&i);
+		ao2_iterator_destroy(&iter);
 		ao2_ref(contacts, -1);
 	}
 
-	/* If there was no state change, don't publish anything. */
-	if (ast_endpoint_get_state(endpoint) == state) {
-		return 0;
-	}
-
-	regcontext = ast_sip_get_regcontext();
-
-	if (state == AST_ENDPOINT_ONLINE) {
-		ast_endpoint_set_state(endpoint, AST_ENDPOINT_ONLINE);
-		blob = ast_json_pack("{s: s}", "peer_status", "Reachable");
-
-		if (!ast_strlen_zero(regcontext)) {
-			if (!ast_exists_extension(NULL, regcontext, ast_endpoint_get_resource(endpoint), 1, NULL)) {
-				ast_add_extension(regcontext, 1, ast_endpoint_get_resource(endpoint), 1, NULL, NULL,
-					"Noop", ast_strdup(ast_endpoint_get_resource(endpoint)), ast_free_ptr, "SIP");
-			}
-		}
-
-		ast_verb(2, "Endpoint %s is now Reachable\n", ast_endpoint_get_resource(endpoint));
-	} else {
-		ast_endpoint_set_state(endpoint, AST_ENDPOINT_OFFLINE);
-		blob = ast_json_pack("{s: s}", "peer_status", "Unreachable");
-
-		if (!ast_strlen_zero(regcontext)) {
-			struct pbx_find_info q = { .stacklen = 0 };
-
-			if (pbx_find_extension(NULL, NULL, &q, regcontext, ast_endpoint_get_resource(endpoint), 1, NULL, "", E_MATCH)) {
-				ast_context_remove_extension(regcontext, ast_endpoint_get_resource(endpoint), 1, NULL);
-			}
-		}
-
-		ast_verb(2, "Endpoint %s is now Unreachable\n", ast_endpoint_get_resource(endpoint));
-	}
-
-	ast_free(regcontext);
-
-	ast_endpoint_blob_publish(endpoint, ast_endpoint_state_type(), blob);
-	ast_json_unref(blob);
-	ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "PJSIP/%s", ast_endpoint_get_resource(endpoint));
+	endpoint_update_state(endpoint, state);
 
 	return 0;
 }
@@ -200,7 +205,7 @@ static void persistent_endpoint_contact_created_observer(const void *object)
 	}
 	contact_status->status = CREATED;
 
-	ast_verb(2, "Contact %s/%s has been created\n",contact->aor, contact->uri);
+	ast_verb(2, "Contact %s/%s has been created\n", contact->aor, contact->uri);
 
 	ao2_callback(persistent_endpoints, OBJ_NODATA, persistent_endpoint_update_state, contact_status);
 	ao2_cleanup(contact_status);
@@ -214,7 +219,7 @@ static void persistent_endpoint_contact_deleted_observer(const void *object)
 
 	contact_status = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), CONTACT_STATUS, ast_sorcery_object_get_id(contact));
 	if (!contact_status) {
-		ast_log(LOG_ERROR, "Unable to create ast_sip_contact_status for contact %s/%s\n",
+		ast_log(LOG_ERROR, "Unable to find ast_sip_contact_status for contact %s/%s\n",
 			contact->aor, contact->uri);
 		return;
 	}
@@ -254,7 +259,8 @@ static void persistent_endpoint_contact_status_observer(const void *object)
 	}
 
 	if (contact_status->status != contact_status->last_status) {
-		ast_verb(3, "Contact %s/%s is now %s.  RTT: %.3f msec\n", contact_status->aor, contact_status->uri,
+		ast_verb(3, "Contact %s/%s is now %s.  RTT: %.3f msec\n",
+			contact_status->aor, contact_status->uri,
 			ast_sip_get_contact_status_label(contact_status->status),
 			contact_status->rtt / 1000.0);
 
@@ -265,19 +271,23 @@ static void persistent_endpoint_contact_status_observer(const void *object)
 
 		ast_test_suite_event_notify("AOR_CONTACT_UPDATE",
 			"Contact: %s\r\n"
-				"Status: %s",
+			"Status: %s",
 			ast_sorcery_object_get_id(contact_status),
 			ast_sip_get_contact_status_label(contact_status->status));
 
-		ao2_callback(persistent_endpoints, OBJ_NODATA, persistent_endpoint_update_state, contact_status);
+		ao2_callback(persistent_endpoints, OBJ_NODATA, persistent_endpoint_update_state,
+			contact_status);
 	} else {
 		ast_debug(3, "Contact %s/%s status didn't change: %s, RTT: %.3f msec\n",
-			contact_status->aor, contact_status->uri, ast_sip_get_contact_status_label(contact_status->status),
+			contact_status->aor, contact_status->uri,
+			ast_sip_get_contact_status_label(contact_status->status),
 			contact_status->rtt / 1000.0);
 	}
 
 	ast_statsd_log_full_va("PJSIP.contacts.%s.rtt", AST_STATSD_TIMER,
-		contact_status->status != AVAILABLE ? -1 : contact_status->rtt / 1000, 1.0, ast_sorcery_object_get_id(contact_status));
+		contact_status->status != AVAILABLE ? -1 : contact_status->rtt / 1000,
+		1.0,
+		ast_sorcery_object_get_id(contact_status));
 }
 
 /*! \brief Observer for contacts so state can be updated on respective endpoints */
@@ -1215,6 +1225,20 @@ static void persistent_endpoint_destroy(void *obj)
 	ast_free(persistent->aors);
 }
 
+int ast_sip_persistent_endpoint_update_state(const char *endpoint_name, enum ast_endpoint_state state)
+{
+	RAII_VAR(struct sip_persistent_endpoint *, persistent, NULL, ao2_cleanup);
+	SCOPED_AO2LOCK(lock, persistent_endpoints);
+
+	if (!(persistent = ao2_find(persistent_endpoints, endpoint_name, OBJ_KEY | OBJ_NOLOCK))) {
+		return -1;
+	}
+
+	endpoint_update_state(persistent->endpoint, state);
+
+	return 0;
+}
+
 /*! \brief Internal function which finds (or creates) persistent endpoint information */
 static struct ast_endpoint *persistent_endpoint_find_or_create(const struct ast_sip_endpoint *endpoint)
 {
@@ -1232,11 +1256,7 @@ static struct ast_endpoint *persistent_endpoint_find_or_create(const struct ast_
 
 		persistent->aors = ast_strdup(endpoint->aors);
 
-		if (ast_strlen_zero(persistent->aors)) {
-			ast_endpoint_set_state(persistent->endpoint, AST_ENDPOINT_UNKNOWN);
-		} else {
-			persistent_endpoint_update_state(persistent, NULL, 0);
-		}
+		ast_endpoint_set_state(persistent->endpoint, AST_ENDPOINT_OFFLINE);
 
 		ao2_link_flags(persistent_endpoints, persistent, OBJ_NOLOCK);
 	}
@@ -1717,6 +1737,22 @@ static struct ast_cli_entry cli_commands[] = {
 struct ast_sip_cli_formatter_entry *channel_formatter;
 struct ast_sip_cli_formatter_entry *endpoint_formatter;
 
+static int on_load_endpoint(void *obj, void *arg, int flags)
+{
+	return sip_endpoint_apply_handler(sip_sorcery, obj);
+}
+
+static void load_all_endpoints(void)
+{
+	struct ao2_container *endpoints;
+
+	endpoints = ast_sorcery_retrieve_by_fields(sip_sorcery, "endpoint", AST_RETRIEVE_FLAG_MULTIPLE | AST_RETRIEVE_FLAG_ALL, NULL);
+	if (endpoints) {
+		ao2_callback(endpoints, OBJ_NODATA, on_load_endpoint, NULL);
+		ao2_ref(endpoints, -1);
+	}
+}
+
 int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_module_info)
 {
 	if (ast_manager_register_xml(AMI_SHOW_ENDPOINTS, EVENT_FLAG_SYSTEM, ami_show_endpoints) ||
@@ -1816,6 +1852,7 @@ int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_mod
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "t38_udptl_ec", "none", t38udptl_ec_handler, t38udptl_ec_to_str, NULL, 0, 0);
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38_udptl_maxdatagram", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, media.t38.maxdatagram));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "fax_detect", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, faxdetect));
+	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "fax_detect_timeout", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, faxdetect_timeout));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38_udptl_nat", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.t38.nat));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38_udptl_ipv6", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, media.t38.ipv6));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "tone_zone", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, zone));
@@ -1858,6 +1895,7 @@ int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_mod
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "contact_deny", "", endpoint_acl_handler, NULL, NULL, 0, 0);
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "contact_permit", "", endpoint_acl_handler, NULL, NULL, 0, 0);
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "contact_acl", "", endpoint_acl_handler, contact_acl_to_str, NULL, 0, 0);
+	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "subscribe_context", "", OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct ast_sip_endpoint, subscription.context));
 
 	if (ast_sip_initialize_sorcery_transport()) {
 		ast_log(LOG_ERROR, "Failed to register SIP transport support with sorcery\n");
@@ -1918,6 +1956,8 @@ int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_mod
 
 	ast_sorcery_load(sip_sorcery);
 
+	load_all_endpoints();
+
 	return 0;
 }
 
diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c
index e8ed893..1618e75 100644
--- a/res/res_pjsip/pjsip_distributor.c
+++ b/res/res_pjsip/pjsip_distributor.c
@@ -571,9 +571,7 @@ static pj_bool_t endpoint_lookup(pjsip_rx_data *rdata)
 		}
 	}
 
-	if (!endpoint && !is_ack) {
-		char name[AST_UUID_STR_LEN] = "";
-		pjsip_uri *from = rdata->msg_info.from->uri;
+	if (!endpoint) {
 
 		/* always use an artificial endpoint - per discussion no reason
 		   to have "alwaysauthreject" as an option.  It is felt using it
@@ -581,6 +579,13 @@ static pj_bool_t endpoint_lookup(pjsip_rx_data *rdata)
 		   breaking old stuff and we really don't want to enable the discovery
 		   of SIP accounts */
 		endpoint = ast_sip_get_artificial_endpoint();
+	}
+
+	rdata->endpt_info.mod_data[endpoint_mod.id] = endpoint;
+
+	if ((endpoint == artificial_endpoint) && !is_ack) {
+		char name[AST_UUID_STR_LEN] = "";
+		pjsip_uri *from = rdata->msg_info.from->uri;
 
 		if (PJSIP_URI_SCHEME_IS_SIP(from) || PJSIP_URI_SCHEME_IS_SIPS(from)) {
 			pjsip_sip_uri *sip_from = pjsip_uri_get_uri(from);
@@ -614,7 +619,6 @@ static pj_bool_t endpoint_lookup(pjsip_rx_data *rdata)
 			ast_sip_report_invalid_endpoint(name, rdata);
 		}
 	}
-	rdata->endpt_info.mod_data[endpoint_mod.id] = endpoint;
 	return PJ_FALSE;
 }
 
diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c
index f00d8f4..6f7455d 100644
--- a/res/res_pjsip/pjsip_options.c
+++ b/res/res_pjsip/pjsip_options.c
@@ -371,7 +371,12 @@ static int qualify_contact(struct ast_sip_endpoint *endpoint, struct ast_sip_con
 	if (endpoint) {
 		endpoint_local = ao2_bump(endpoint);
 	} else {
-		endpoint_local = find_an_endpoint(contact);
+		if (!ast_strlen_zero(contact->endpoint_name)) {
+			endpoint_local = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", contact->endpoint_name);
+		}
+		if (!endpoint_local) {
+			endpoint_local = find_an_endpoint(contact);
+		}
 		if (!endpoint_local) {
 			ast_log(LOG_ERROR, "Unable to find an endpoint to qualify contact %s\n",
 				contact->uri);
@@ -1269,7 +1274,7 @@ static void aor_observer_deleted(const void *obj)
 
 	contacts = ast_sip_location_retrieve_aor_contacts(aor);
 	if (contacts) {
-		ao2_callback(contacts, OBJ_NODATA, unschedule_contact_cb, NULL);
+		ao2_callback(contacts, OBJ_NODATA | OBJ_MULTIPLE, unschedule_contact_cb, NULL);
 		ao2_ref(contacts, -1);
 	}
 }
@@ -1280,6 +1285,126 @@ static const struct ast_sorcery_observer observer_callbacks_options = {
 	.deleted = aor_observer_deleted
 };
 
+static int aor_update_endpoint_state(void *obj, void *arg, int flags)
+{
+	struct ast_sip_endpoint *endpoint = obj;
+	const char *endpoint_name = ast_sorcery_object_get_id(endpoint);
+	char *aor = arg;
+	char *endpoint_aor;
+	char *endpoint_aors;
+
+	if (ast_strlen_zero(aor) || ast_strlen_zero(endpoint->aors)) {
+		return 0;
+	}
+
+	endpoint_aors = ast_strdupa(endpoint->aors);
+	while ((endpoint_aor = ast_strip(strsep(&endpoint_aors, ",")))) {
+		if (!strcmp(aor, endpoint_aor)) {
+			if (ast_sip_persistent_endpoint_update_state(endpoint_name, AST_ENDPOINT_ONLINE) == -1) {
+				ast_log(LOG_WARNING, "Unable to find persistent endpoint '%s' for aor '%s'\n",
+					endpoint_name, aor);
+			}
+		}
+	}
+
+	return 0;
+}
+
+static int on_aor_update_endpoint_state(void *obj, void *arg, int flags)
+{
+	struct ast_sip_aor *aor = obj;
+	struct ao2_container *endpoints;
+	RAII_VAR(struct ast_variable *, var, NULL, ast_variables_destroy);
+	const char *aor_name = ast_sorcery_object_get_id(aor);
+	char *aor_like;
+
+	if (ast_strlen_zero(aor_name)) {
+		return -1;
+	}
+
+	if (aor->permanent_contacts && ((int)(aor->qualify_frequency * 1000)) <= 0) {
+		aor_like = ast_alloca(strlen(aor_name) + 3);
+		sprintf(aor_like, "%%%s%%", aor_name);
+		var = ast_variable_new("aors LIKE", aor_like, "");
+		if (!var) {
+			return -1;
+		}
+		endpoints = ast_sorcery_retrieve_by_fields(ast_sip_get_sorcery(),
+			"endpoint", AST_RETRIEVE_FLAG_MULTIPLE, var);
+
+		if (endpoints) {
+		    /*
+		     * Because aors are a string list, we have to use a pattern match but since a simple
+		     * pattern match could return an endpoint that has an aor of "aaabccc" when searching
+		     * for "abc", we still have to iterate over them to find an exact aor match.
+		     */
+		    ao2_callback(endpoints, 0, aor_update_endpoint_state, (char *)aor_name);
+		    ao2_ref(endpoints, -1);
+		}
+	}
+
+	return 0;
+}
+
+static int contact_update_endpoint_state(void *obj, void *arg, int flags)
+{
+	const struct ast_sip_contact *contact = obj;
+	struct timeval tv = ast_tvnow();
+
+	if (!ast_strlen_zero(contact->endpoint_name) && ((int)(contact->qualify_frequency * 1000)) <= 0 &&
+		contact->expiration_time.tv_sec > tv.tv_sec) {
+
+		if (ast_sip_persistent_endpoint_update_state(contact->endpoint_name, AST_ENDPOINT_ONLINE) == -1) {
+			ast_log(LOG_WARNING, "Unable to find persistent endpoint '%s' for contact '%s/%s'\n",
+				contact->endpoint_name, contact->aor, contact->uri);
+			return -1;
+		}
+	}
+
+	return 0;
+}
+
+static void update_all_unqualified_endpoints(void)
+{
+	struct ao2_container *aors;
+	struct ao2_container *contacts;
+	RAII_VAR(struct ast_variable *, var_aor, NULL, ast_variables_destroy);
+	RAII_VAR(struct ast_variable *, var_contact, NULL, ast_variables_destroy);
+	RAII_VAR(char *, time_now, NULL, ast_free);
+	struct timeval tv = ast_tvnow();
+
+	if (!(var_aor = ast_variable_new("contact !=", "", ""))) {
+		return;
+	}
+	if (!(var_aor->next = ast_variable_new("qualify_frequency <=", "0", ""))) {
+		return;
+	}
+
+	if (ast_asprintf(&time_now, "%ld", tv.tv_sec) == -1) {
+		return;
+	}
+	if (!(var_contact = ast_variable_new("expiration_time >", time_now, ""))) {
+		return;
+	}
+	if (!(var_contact->next = ast_variable_new("qualify_frequency <=", "0", ""))) {
+		return;
+	}
+
+	aors = ast_sorcery_retrieve_by_fields(ast_sip_get_sorcery(),
+		"aor", AST_RETRIEVE_FLAG_MULTIPLE, var_aor);
+	if (aors) {
+		ao2_callback(aors, OBJ_NODATA, on_aor_update_endpoint_state, NULL);
+		ao2_ref(aors, -1);
+	}
+
+	contacts = ast_sorcery_retrieve_by_fields(ast_sip_get_sorcery(),
+		"contact", AST_RETRIEVE_FLAG_MULTIPLE, var_contact);
+	if (contacts) {
+		ao2_callback(contacts, OBJ_NODATA, contact_update_endpoint_state, NULL);
+		ao2_ref(contacts, -1);
+	}
+}
+
 int ast_res_pjsip_init_options_handling(int reload)
 {
 	static const pj_str_t STR_OPTIONS = { "OPTIONS", 7 };
@@ -1321,6 +1446,7 @@ int ast_res_pjsip_init_options_handling(int reload)
 	ast_manager_register2("PJSIPQualify", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, ami_sip_qualify, NULL, NULL, NULL);
 	ast_cli_register_multiple(cli_options, ARRAY_LEN(cli_options));
 
+	update_all_unqualified_endpoints();
 	qualify_and_schedule_all();
 
 	return 0;
diff --git a/res/res_pjsip_exten_state.c b/res/res_pjsip_exten_state.c
index 69a4589..73a5af3 100644
--- a/res/res_pjsip_exten_state.c
+++ b/res/res_pjsip_exten_state.c
@@ -352,9 +352,11 @@ static void subscription_shutdown(struct ast_sip_subscription *sub)
 static int new_subscribe(struct ast_sip_endpoint *endpoint,
 		const char *resource)
 {
-	if (!ast_exists_extension(NULL, endpoint->context, resource, PRIORITY_HINT, NULL)) {
+	const char *context = S_OR(endpoint->subscription.context, endpoint->context);
+
+	if (!ast_exists_extension(NULL, context, resource, PRIORITY_HINT, NULL)) {
 		ast_log(LOG_NOTICE, "Extension state subscription failed: Extension %s does not exist in context '%s' or has no associated hint\n",
-			resource, endpoint->context);
+			resource, context);
 		return 404;
 	}
 
@@ -372,7 +374,9 @@ static int subscription_established(struct ast_sip_subscription *sip_sub)
 		return -1;
 	}
 
-	ast_copy_string(exten_state_sub->context, endpoint->context, sizeof(exten_state_sub->context));
+	ast_copy_string(exten_state_sub->context,
+		S_OR(endpoint->subscription.context, endpoint->context),
+		sizeof(exten_state_sub->context));
 	ast_copy_string(exten_state_sub->exten, resource, sizeof(exten_state_sub->exten));
 
 	if ((exten_state_sub->id = ast_extension_state_add_destroy_extended(
diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index 9eba335..d86c96c 100644
--- a/res/res_pjsip_mwi.c
+++ b/res/res_pjsip_mwi.c
@@ -976,38 +976,12 @@ static int create_mwi_subscriptions_for_endpoint(void *obj, void *arg, int flags
 {
 	RAII_VAR(struct mwi_subscription *, aggregate_sub, NULL, ao2_cleanup);
 	struct ast_sip_endpoint *endpoint = obj;
-	char *endpoint_aors, *aor_name, *mailboxes, *mailbox;
-	struct ao2_container *contacts = NULL;
+	char *mailboxes, *mailbox;
 
 	if (ast_strlen_zero(endpoint->subscription.mwi.mailboxes)) {
 		return 0;
 	}
 
-	endpoint_aors = ast_strdupa(endpoint->aors);
-
-	while ((aor_name = ast_strip(strsep(&endpoint_aors, ",")))) {
-		RAII_VAR(struct ast_sip_aor *, aor, ast_sip_location_retrieve_aor(aor_name), ao2_cleanup);
-
-		if (!aor) {
-			continue;
-		}
-
-		contacts = ast_sip_location_retrieve_aor_contacts(aor);
-		if (!contacts || (ao2_container_count(contacts) == 0)) {
-			ao2_cleanup(contacts);
-			contacts = NULL;
-			continue;
-		}
-
-		break;
-	}
-
-	if (!contacts) {
-		return 0;
-	}
-
-	ao2_ref(contacts, -1);
-
 	if (endpoint->subscription.mwi.aggregate) {
 		aggregate_sub = mwi_subscription_alloc(endpoint, 0, NULL);
 		if (!aggregate_sub) {
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index 65c92c7..3ac3f34 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -2271,7 +2271,7 @@ static int send_notify(struct sip_subscription_tree *sub_tree, unsigned int forc
 	}
 
 	if (sip_subscription_send_request(sub_tree, tdata)) {
-		pjsip_tx_data_dec_ref(tdata);
+		/* do not call pjsip_tx_data_dec_ref(tdata). The pjsip_dlg_send_request deletes the message on error */
 		return -1;
 	}
 
@@ -3030,11 +3030,14 @@ static struct ast_sip_publication *publish_request_initial(struct ast_sip_endpoi
 
 	resource = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "inbound-publication", resource_name);
 	if (!resource) {
+		ast_debug(1, "No 'inbound-publication' defined for resource '%s'\n", resource_name);
 		pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 404, NULL, NULL, NULL);
 		return NULL;
 	}
 
 	if (!ast_strlen_zero(resource->endpoint) && strcmp(resource->endpoint, ast_sorcery_object_get_id(endpoint))) {
+		ast_debug(1, "Resource %s has a defined endpoint '%s', but does not match endpoint '%s' that received the request\n",
+			resource_name, resource->endpoint, ast_sorcery_object_get_id(endpoint));
 		pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 403, NULL, NULL, NULL);
 		return NULL;
 	}
@@ -3046,6 +3049,7 @@ static struct ast_sip_publication *publish_request_initial(struct ast_sip_endpoi
 	}
 
 	if (!event_configuration_name) {
+		ast_debug(1, "Event '%s' is not configured for '%s'\n", handler->event_name, resource_name);
 		pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 404, NULL, NULL, NULL);
 		return NULL;
 	}
diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c
index f3af65c..e5bb90e 100644
--- a/res/res_pjsip_refer.c
+++ b/res/res_pjsip_refer.c
@@ -969,7 +969,8 @@ inv_replace_failed:
 		session->defer_terminate = 1;
 		ast_hangup(session->channel);
 
-		if (pjsip_inv_end_session(session->inv_session, response, NULL, &packet) == PJ_SUCCESS) {
+		if (pjsip_inv_end_session(session->inv_session, response, NULL, &packet) == PJ_SUCCESS
+			&& packet) {
 			ast_sip_session_send_response(session, packet);
 		}
 	} else {
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index 23d2f2f..4290f68 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -46,6 +46,7 @@
 #include "asterisk/acl.h"
 #include "asterisk/features_config.h"
 #include "asterisk/pickup.h"
+#include "asterisk/test.h"
 
 #define SDP_HANDLER_BUCKETS 11
 
@@ -53,10 +54,10 @@
 #define MOD_DATA_NAT_HOOK "nat_hook"
 
 /* Some forward declarations */
-static void handle_incoming_request(struct ast_sip_session *session, pjsip_rx_data *rdata, pjsip_event_id_e type);
-static void handle_incoming_response(struct ast_sip_session *session, pjsip_rx_data *rdata, pjsip_event_id_e type,
+static void handle_incoming_request(struct ast_sip_session *session, pjsip_rx_data *rdata);
+static void handle_incoming_response(struct ast_sip_session *session, pjsip_rx_data *rdata,
 		enum ast_sip_session_response_priority response_priority);
-static int handle_incoming(struct ast_sip_session *session, pjsip_rx_data *rdata, pjsip_event_id_e type,
+static int handle_incoming(struct ast_sip_session *session, pjsip_rx_data *rdata,
 		enum ast_sip_session_response_priority response_priority);
 static void handle_outgoing_request(struct ast_sip_session *session, pjsip_tx_data *tdata);
 static void handle_outgoing_response(struct ast_sip_session *session, pjsip_tx_data *tdata);
@@ -791,12 +792,14 @@ static int delay_request(struct ast_sip_session *session,
 static pjmedia_sdp_session *generate_session_refresh_sdp(struct ast_sip_session *session)
 {
 	pjsip_inv_session *inv_session = session->inv_session;
-	const pjmedia_sdp_session *previous_sdp;
+	const pjmedia_sdp_session *previous_sdp = NULL;
 
-	if (pjmedia_sdp_neg_was_answer_remote(inv_session->neg)) {
-		pjmedia_sdp_neg_get_active_remote(inv_session->neg, &previous_sdp);
-	} else {
-		pjmedia_sdp_neg_get_active_local(inv_session->neg, &previous_sdp);
+	if (inv_session->neg) {
+		if (pjmedia_sdp_neg_was_answer_remote(inv_session->neg)) {
+			pjmedia_sdp_neg_get_active_remote(inv_session->neg, &previous_sdp);
+		} else {
+			pjmedia_sdp_neg_get_active_local(inv_session->neg, &previous_sdp);
+		}
 	}
 	return create_local_sdp(inv_session, session, previous_sdp);
 }
@@ -916,7 +919,9 @@ int ast_sip_session_refresh(struct ast_sip_session *session,
 
 	if (generate_new_sdp) {
 		/* SDP can only be generated if current negotiation has already completed */
-		if (pjmedia_sdp_neg_get_state(inv_session->neg) != PJMEDIA_SDP_NEG_STATE_DONE) {
+		if (inv_session->neg
+			&& pjmedia_sdp_neg_get_state(inv_session->neg)
+				!= PJMEDIA_SDP_NEG_STATE_DONE) {
 			ast_debug(3, "Delay session refresh with new SDP to %s because SDP negotiation is not yet done...\n",
 				ast_sorcery_object_get_id(session->endpoint));
 			return delay_request(session, on_request_creation, on_sdp_creation,
@@ -2143,7 +2148,7 @@ static int new_invite(void *data)
 	}
 	ast_sip_session_send_response(invite->session, tdata);
 
-	handle_incoming_request(invite->session, invite->rdata, PJSIP_EVENT_RX_MSG);
+	handle_incoming_request(invite->session, invite->rdata);
 
 	return 0;
 }
@@ -2364,7 +2369,7 @@ static void __print_debug_details(const char *function, pjsip_inv_session *inv,
 
 #define print_debug_details(inv, tsx, e) __print_debug_details(__PRETTY_FUNCTION__, (inv), (tsx), (e))
 
-static void handle_incoming_request(struct ast_sip_session *session, pjsip_rx_data *rdata, pjsip_event_id_e type)
+static void handle_incoming_request(struct ast_sip_session *session, pjsip_rx_data *rdata)
 {
 	struct ast_sip_session_supplement *supplement;
 	struct pjsip_request_line req = rdata->msg_info.msg->line.req;
@@ -2379,7 +2384,7 @@ static void handle_incoming_request(struct ast_sip_session *session, pjsip_rx_da
 	}
 }
 
-static void handle_incoming_response(struct ast_sip_session *session, pjsip_rx_data *rdata, pjsip_event_id_e type,
+static void handle_incoming_response(struct ast_sip_session *session, pjsip_rx_data *rdata,
 		enum ast_sip_session_response_priority response_priority)
 {
 	struct ast_sip_session_supplement *supplement;
@@ -2398,16 +2403,16 @@ static void handle_incoming_response(struct ast_sip_session *session, pjsip_rx_d
 	}
 }
 
-static int handle_incoming(struct ast_sip_session *session, pjsip_rx_data *rdata, pjsip_event_id_e type,
+static int handle_incoming(struct ast_sip_session *session, pjsip_rx_data *rdata,
 		enum ast_sip_session_response_priority response_priority)
 {
 	ast_debug(3, "Received %s\n", rdata->msg_info.msg->type == PJSIP_REQUEST_MSG ?
 			"request" : "response");
 
 	if (rdata->msg_info.msg->type == PJSIP_REQUEST_MSG) {
-		handle_incoming_request(session, rdata, type);
+		handle_incoming_request(session, rdata);
 	} else {
-		handle_incoming_response(session, rdata, type, response_priority);
+		handle_incoming_response(session, rdata, response_priority);
 	}
 
 	return 0;
@@ -2490,6 +2495,36 @@ static int session_end_completion(void *vsession)
 	return 0;
 }
 
+static void handle_incoming_before_media(pjsip_inv_session *inv,
+	struct ast_sip_session *session, pjsip_rx_data *rdata)
+{
+	pjsip_msg *msg;
+
+	handle_incoming(session, rdata, AST_SIP_SESSION_BEFORE_MEDIA);
+	msg = rdata->msg_info.msg;
+	if (msg->type == PJSIP_REQUEST_MSG
+		&& msg->line.req.method.id == PJSIP_ACK_METHOD
+		&& pjmedia_sdp_neg_get_state(inv->neg) != PJMEDIA_SDP_NEG_STATE_DONE) {
+		pjsip_tx_data *tdata;
+
+		/*
+		 * SDP negotiation failed on an incoming call that delayed
+		 * negotiation and then gave us an invalid SDP answer.  We
+		 * need to send a BYE to end the call because of the invalid
+		 * SDP answer.
+		 */
+		ast_debug(1,
+			"Endpoint '%s(%s)': Ending session due to incomplete SDP negotiation.  %s\n",
+			ast_sorcery_object_get_id(session->endpoint),
+			session->channel ? ast_channel_name(session->channel) : "",
+			pjsip_rx_data_get_info(rdata));
+		if (pjsip_inv_end_session(inv, 400, NULL, &tdata) == PJ_SUCCESS
+			&& tdata) {
+			ast_sip_session_send_request(session, tdata);
+		}
+	}
+}
+
 static void session_inv_on_state_changed(pjsip_inv_session *inv, pjsip_event *e)
 {
 	struct ast_sip_session *session = inv->mod_data[session_module.id];
@@ -2511,8 +2546,7 @@ static void session_inv_on_state_changed(pjsip_inv_session *inv, pjsip_event *e)
 		handle_outgoing(session, e->body.tx_msg.tdata);
 		break;
 	case PJSIP_EVENT_RX_MSG:
-		handle_incoming(session, e->body.rx_msg.rdata, type,
-				AST_SIP_SESSION_BEFORE_MEDIA);
+		handle_incoming_before_media(inv, session, e->body.rx_msg.rdata);
 		break;
 	case PJSIP_EVENT_TSX_STATE:
 		ast_debug(3, "Source of transaction state change is %s\n", pjsip_event_str(e->body.tsx_state.type));
@@ -2522,8 +2556,7 @@ static void session_inv_on_state_changed(pjsip_inv_session *inv, pjsip_event *e)
 			handle_outgoing(session, e->body.tsx_state.src.tdata);
 			break;
 		case PJSIP_EVENT_RX_MSG:
-			handle_incoming(session, e->body.tsx_state.src.rdata, type,
-					AST_SIP_SESSION_BEFORE_MEDIA);
+			handle_incoming_before_media(inv, session, e->body.tsx_state.src.rdata);
 			break;
 		case PJSIP_EVENT_TRANSPORT_ERROR:
 		case PJSIP_EVENT_TIMER:
@@ -2595,8 +2628,8 @@ static void session_inv_on_tsx_state_changed(pjsip_inv_session *inv, pjsip_trans
 		 */
 		if ((e->body.tsx_state.src.rdata->msg_info.msg->type != PJSIP_REQUEST_MSG) ||
 			(tsx->method.id != PJSIP_BYE_METHOD)) {
-			handle_incoming(session, e->body.tsx_state.src.rdata, e->type,
-							AST_SIP_SESSION_AFTER_MEDIA);
+			handle_incoming(session, e->body.tsx_state.src.rdata,
+				AST_SIP_SESSION_AFTER_MEDIA);
 		}
 		if (tsx->method.id == PJSIP_INVITE_METHOD) {
 			if (tsx->role == PJSIP_ROLE_UAC) {
@@ -2619,20 +2652,57 @@ static void session_inv_on_tsx_state_changed(pjsip_inv_session *inv, pjsip_trans
 						}
 						if (tsx->status_code != 488) {
 							/* Other reinvite failures (except 488) result in destroying the session. */
-							if (pjsip_inv_end_session(inv, 500, NULL, &tdata) == PJ_SUCCESS) {
+							if (pjsip_inv_end_session(inv, 500, NULL, &tdata) == PJ_SUCCESS
+								&& tdata) {
 								ast_sip_session_send_request(session, tdata);
 							}
 						}
 					}
 				} else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
 					if (inv->cancelling && tsx->status_code == PJSIP_SC_OK) {
-						/* This is a race condition detailed in RFC 5407 section 3.1.2.
-						 * We sent a CANCEL at the same time that the UAS sent us a 200 OK for
-						 * the original INVITE. As a result, we have now received a 200 OK for
-						 * a cancelled call. Our role is to immediately send a BYE to end the
-						 * dialog.
+						int sdp_negotiation_done =
+							pjmedia_sdp_neg_get_state(inv->neg) == PJMEDIA_SDP_NEG_STATE_DONE;
+
+						/*
+						 * We can get here for the following reasons.
+						 *
+						 * 1) The race condition detailed in RFC5407 section 3.1.2.
+						 * We sent a CANCEL at the same time that the UAS sent us a
+						 * 200 OK with a valid SDP for the original INVITE.  As a
+						 * result, we have now received a 200 OK for a cancelled
+						 * call and the SDP negotiation is complete.  We need to
+						 * immediately send a BYE to end the dialog.
+						 *
+						 * 2) We sent a CANCEL and hit the race condition but the
+						 * UAS sent us an invalid SDP with the 200 OK.  In this case
+						 * the SDP negotiation is incomplete and PJPROJECT has
+						 * already sent the BYE for us because of the invalid SDP.
+						 *
+						 * 3) We didn't send a CANCEL but the UAS sent us an invalid
+						 * SDP with the 200 OK.  In this case the SDP negotiation is
+						 * incomplete and PJPROJECT has already sent the BYE for us
+						 * because of the invalid SDP.
 						 */
-						if (pjsip_inv_end_session(inv, 500, NULL, &tdata) == PJ_SUCCESS) {
+						ast_test_suite_event_notify("PJSIP_SESSION_CANCELED",
+							"Endpoint: %s\r\n"
+							"Channel: %s\r\n"
+							"Message: %s\r\n"
+							"SDP: %s",
+							ast_sorcery_object_get_id(session->endpoint),
+							session->channel ? ast_channel_name(session->channel) : "",
+							pjsip_rx_data_get_info(e->body.tsx_state.src.rdata),
+							sdp_negotiation_done ? "complete" : "incomplete");
+						if (!sdp_negotiation_done) {
+							ast_debug(1, "Endpoint '%s(%s)': Incomplete SDP negotiation cancelled session.  %s\n",
+								ast_sorcery_object_get_id(session->endpoint),
+								session->channel ? ast_channel_name(session->channel) : "",
+								pjsip_rx_data_get_info(e->body.tsx_state.src.rdata));
+						} else if (pjsip_inv_end_session(inv, 500, NULL, &tdata) == PJ_SUCCESS
+							&& tdata) {
+							ast_debug(1, "Endpoint '%s(%s)': Ending session due to RFC5407 race condition.  %s\n",
+								ast_sorcery_object_get_id(session->endpoint),
+								session->channel ? ast_channel_name(session->channel) : "",
+								pjsip_rx_data_get_info(e->body.tsx_state.src.rdata));
 							ast_sip_session_send_request(session, tdata);
 						}
 					}
@@ -2919,8 +2989,7 @@ static pjsip_redirect_op session_inv_on_redirected(pjsip_inv_session *inv, const
 		return PJSIP_REDIRECT_STOP;
 	}
 
-	handle_incoming(session, e->body.rx_msg.rdata, PJSIP_EVENT_RX_MSG,
-			AST_SIP_SESSION_BEFORE_REDIRECTING);
+	handle_incoming(session, e->body.rx_msg.rdata, AST_SIP_SESSION_BEFORE_REDIRECTING);
 
 	uri = pjsip_uri_get_uri(target);
 
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c
index 14207d9..992902a 100644
--- a/res/res_pjsip_t38.c
+++ b/res/res_pjsip_t38.c
@@ -361,7 +361,9 @@ static int t38_interpret_parameters(void *obj)
 			ast_udptl_set_local_max_ifp(session_media->udptl, state->our_parms.max_ifp);
 			t38_change_state(data->session, session_media, state, T38_ENABLED);
 			ast_sip_session_resume_reinvite(data->session);
-		} else if (data->session->t38state != T38_ENABLED) {
+		} else if ((data->session->t38state != T38_ENABLED) ||
+				((data->session->t38state == T38_ENABLED) &&
+                                (parameters->request_response == AST_T38_REQUEST_NEGOTIATE))) {
 			if (t38_initialize_session(data->session, session_media)) {
 				break;
 			}
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index feab1ca..9db5aef 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -1340,7 +1340,7 @@ static int ast_rtp_dtls_set_configuration(struct ast_rtp_instance *instance, con
 {
 	struct ast_rtp *rtp = ast_rtp_instance_get_data(instance);
 	int res;
-#ifndef HAVE_OPENSSL_ECDH_AUTO
+#ifdef HAVE_OPENSSL_EC
 	EC_KEY *ecdh;
 #endif
 
@@ -1368,15 +1368,42 @@ static int ast_rtp_dtls_set_configuration(struct ast_rtp_instance *instance, con
 
 	SSL_CTX_set_read_ahead(rtp->ssl_ctx, 1);
 
-#ifdef HAVE_OPENSSL_ECDH_AUTO
-	SSL_CTX_set_ecdh_auto(rtp->ssl_ctx, 1);
-#else
+#ifdef HAVE_OPENSSL_EC
+
+	if (!ast_strlen_zero(dtls_cfg->pvtfile)) {
+		BIO *bio = BIO_new_file(dtls_cfg->pvtfile, "r");
+		if (bio != NULL) {
+			DH *dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+			if (dh != NULL) {
+				if (SSL_CTX_set_tmp_dh(rtp->ssl_ctx, dh)) {
+					long options = SSL_OP_CIPHER_SERVER_PREFERENCE |
+						SSL_OP_SINGLE_DH_USE | SSL_OP_SINGLE_ECDH_USE;
+					options = SSL_CTX_set_options(rtp->ssl_ctx, options);
+					ast_verb(2, "DTLS DH initialized, PFS enabled\n");
+				}
+				DH_free(dh);
+			}
+			BIO_free(bio);
+		}
+	}
+	/* enables AES-128 ciphers, to get AES-256 use NID_secp384r1 */
 	ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
-	if (ecdh) {
-		SSL_CTX_set_tmp_ecdh(rtp->ssl_ctx, ecdh);
+	if (ecdh != NULL) {
+		if (SSL_CTX_set_tmp_ecdh(rtp->ssl_ctx, ecdh)) {
+			#ifndef SSL_CTRL_SET_ECDH_AUTO
+				#define SSL_CTRL_SET_ECDH_AUTO 94
+			#endif
+			/* SSL_CTX_set_ecdh_auto(rtp->ssl_ctx, on); requires OpenSSL 1.0.2 which wraps: */
+			if (SSL_CTX_ctrl(rtp->ssl_ctx, SSL_CTRL_SET_ECDH_AUTO, 1, NULL)) {
+				ast_verb(2, "DTLS ECDH initialized (automatic), faster PFS enabled\n");
+			} else {
+				ast_verb(2, "DTLS ECDH initialized (secp256r1), faster PFS enabled\n");
+			}
+		}
 		EC_KEY_free(ecdh);
 	}
-#endif
+
+#endif /* #ifdef HAVE_OPENSSL_EC */
 
 	rtp->dtls_verify = dtls_cfg->verify;
 
@@ -2565,7 +2592,7 @@ static int ast_rtp_new(struct ast_rtp_instance *instance,
 
 	/* Set default parameters on the newly created RTP structure */
 	rtp->ssrc = ast_random();
-	rtp->seqno = ast_random() & 0xffff;
+	rtp->seqno = ast_random() & 0x7fff;
 	rtp->strict_rtp_state = (strictrtp ? STRICT_RTP_LEARN : STRICT_RTP_OPEN);
 	if (strictrtp) {
 		rtp_learning_seq_init(&rtp->rtp_source_learn, (uint16_t)rtp->seqno);
diff --git a/res/res_rtp_multicast.c b/res/res_rtp_multicast.c
index 53bdf14..ea31347 100644
--- a/res/res_rtp_multicast.c
+++ b/res/res_rtp_multicast.c
@@ -143,7 +143,7 @@ struct ast_multicast_rtp_options *ast_multicast_rtp_create_options(const char *t
 
 	mcast_options = ast_calloc(1, sizeof(*mcast_options)
 			+ strlen(type)
-			+ strlen(options) + 2);
+			+ strlen(S_OR(options, "")) + 2);
 	if (!mcast_options) {
 		return NULL;
 	}
@@ -155,8 +155,9 @@ struct ast_multicast_rtp_options *ast_multicast_rtp_create_options(const char *t
 	mcast_options->type = pos;
 	pos += strlen(type) + 1;
 
-	/* Safe */
-	strcpy(pos, options);
+	if (!ast_strlen_zero(options)) {
+		strcpy(pos, options); /* Safe */
+	}
 	mcast_options->options = pos;
 
 	if (ast_app_parse_options(multicast_rtp_options, &mcast_options->opts,
diff --git a/res/res_sorcery_realtime.c b/res/res_sorcery_realtime.c
index 2c533ea..138d6ea 100644
--- a/res/res_sorcery_realtime.c
+++ b/res/res_sorcery_realtime.c
@@ -271,7 +271,7 @@ static int sorcery_realtime_update(const struct ast_sorcery *sorcery, void *data
 		return -1;
 	}
 
-	return (ast_update_realtime_fields(config->family, UUID_FIELD, ast_sorcery_object_get_id(object), fields) <= 0) ? -1 : 0;
+	return (ast_update_realtime_fields(config->family, UUID_FIELD, ast_sorcery_object_get_id(object), fields) < 0) ? -1 : 0;
 }
 
 static int sorcery_realtime_delete(const struct ast_sorcery *sorcery, void *data, void *object)
diff --git a/tests/test_sorcery_realtime.c b/tests/test_sorcery_realtime.c
index 3ed1462..64475fb 100644
--- a/tests/test_sorcery_realtime.c
+++ b/tests/test_sorcery_realtime.c
@@ -711,41 +711,6 @@ AST_TEST_DEFINE(object_update)
 	return AST_TEST_PASS;
 }
 
-AST_TEST_DEFINE(object_update_uncreated)
-{
-	RAII_VAR(struct ast_sorcery *, sorcery, NULL, deinitialize_sorcery);
-	RAII_VAR(struct test_sorcery_object *, obj, NULL, ao2_cleanup);
-
-	switch (cmd) {
-	case TEST_INIT:
-		info->name = "object_update_uncreated";
-		info->category = "/res/sorcery_realtime/";
-		info->summary = "sorcery object update unit test";
-		info->description =
-			"Test updating of an uncreated object in sorcery using realtime wizard";
-		return AST_TEST_NOT_RUN;
-	case TEST_EXECUTE:
-		break;
-	}
-
-	if (!(sorcery = alloc_and_initialize_sorcery("sorcery_realtime_test"))) {
-		ast_test_status_update(test, "Failed to open sorcery structure\n");
-		return AST_TEST_FAIL;
-	}
-
-	if (!(obj = ast_sorcery_alloc(sorcery, "test", "blah"))) {
-		ast_test_status_update(test, "Failed to allocate a known object type\n");
-		return AST_TEST_FAIL;
-	}
-
-	if (!ast_sorcery_update(sorcery, obj)) {
-		ast_test_status_update(test, "Successfully updated an object which has not been created yet\n");
-		return AST_TEST_FAIL;
-	}
-
-	return AST_TEST_PASS;
-}
-
 AST_TEST_DEFINE(object_delete)
 {
 	RAII_VAR(struct ast_sorcery *, sorcery, NULL, deinitialize_sorcery);
@@ -942,7 +907,6 @@ static int unload_module(void)
 	AST_TEST_UNREGISTER(object_retrieve_regex);
 	AST_TEST_UNREGISTER(object_retrieve_regex_nofetch);
 	AST_TEST_UNREGISTER(object_update);
-	AST_TEST_UNREGISTER(object_update_uncreated);
 	AST_TEST_UNREGISTER(object_delete);
 	AST_TEST_UNREGISTER(object_delete_uncreated);
 	AST_TEST_UNREGISTER(object_allocate_on_retrieval);
@@ -964,7 +928,6 @@ static int load_module(void)
 	AST_TEST_REGISTER(object_retrieve_regex);
 	AST_TEST_REGISTER(object_retrieve_regex_nofetch);
 	AST_TEST_REGISTER(object_update);
-	AST_TEST_REGISTER(object_update_uncreated);
 	AST_TEST_REGISTER(object_delete);
 	AST_TEST_REGISTER(object_delete_uncreated);
 	AST_TEST_REGISTER(object_allocate_on_retrieval);
diff --git a/third-party/pjproject/Makefile.rules b/third-party/pjproject/Makefile.rules
index d2e7d25..739193a 100644
--- a/third-party/pjproject/Makefile.rules
+++ b/third-party/pjproject/Makefile.rules
@@ -1,9 +1,34 @@
 PJPROJECT_URL = http://www.pjsip.org/release/$(PJPROJECT_VERSION)
 
 # Even though we're not installing pjproject, we're setting prefix to /opt/pjproject to be safe
-PJPROJECT_CONFIG_OPTS = --prefix=/opt/pjproject --disable-speex-codec --disable-speex-aec \
-	--disable-gsm-codec --disable-video --disable-v4l2 --disable-sound --disable-opencore-amr \
-	--disable-ilbc-codec --without-libyuv --disable-g7221-codec --disable-resample
+
+PJPROJECT_CONFIG_OPTS = --prefix=/opt/pjproject \
+	--disable-speex-codec \
+	--disable-speex-aec \
+	--disable-speex-aec \
+	--disable-gsm-codec \
+	--disable-ilbc-codec \
+	--disable-l16-codec \
+	--disable-g711-codec \
+	--disable-g722-codec \
+	--disable-g7221-codec \
+	--disable-opencore-amr \
+	--disable-webrtc \
+	--disable-silk \
+	--disable-opus \
+	--disable-video \
+	--disable-v4l2 \
+	--disable-sound \
+	--disable-ext-sound \
+	--disable-oss \
+	--disable-sdl \
+	--disable-libyuv \
+	--disable-resample \
+	--disable-ffmpeg \
+	--disable-openh264 \
+	--disable-ipp \
+	--without-external-pa \
+	--with-external-srtp
 
 ifeq ($(shell uname -s),Linux)
    PJPROJECT_CONFIG_OPTS +=  --enable-epoll
diff --git a/third-party/pjproject/patches/0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch b/third-party/pjproject/patches/0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch
deleted file mode 100644
index d2a47c6..0000000
--- a/third-party/pjproject/patches/0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From a5030c9b33b2c936879fbacb1d2ea5edc2979181 Mon Sep 17 00:00:00 2001
-From: George Joseph <gjoseph at digium.com>
-Date: Sat, 18 Jun 2016 10:14:34 -0600
-Subject: [PATCH] evsub:  Add APIs to add/decrement an event  subscription's
- group lock
-
-These APIs can be used to ensure that the evsub isn't destroyed before
-an application is finished using it.
----
- pjsip/include/pjsip-simple/evsub.h | 20 ++++++++++++++++++++
- pjsip/src/pjsip-simple/evsub.c     | 14 ++++++++++++++
- 2 files changed, 34 insertions(+)
-
-diff --git a/pjsip/include/pjsip-simple/evsub.h b/pjsip/include/pjsip-simple/evsub.h
-index 2dc4d69..31f85f8 100644
---- a/pjsip/include/pjsip-simple/evsub.h
-+++ b/pjsip/include/pjsip-simple/evsub.h
-@@ -490,6 +490,26 @@ PJ_DECL(void) pjsip_evsub_set_mod_data( pjsip_evsub *sub, unsigned mod_id,
- PJ_DECL(void*) pjsip_evsub_get_mod_data( pjsip_evsub *sub, unsigned mod_id );
- 
- 
-+/**
-+ * Increment the event subscription's group lock.
-+ *
-+ * @param sub		The server subscription instance.
-+ *
-+ * @return		PJ_SUCCESS on success.
-+ */
-+PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub);
-+
-+
-+/**
-+ * Decrement the event subscription's group lock.
-+ *
-+ * @param sub		The server subscription instance.
-+ *
-+ * @return		PJ_SUCCESS on success.
-+ */
-+PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub);
-+
-+
- 
- PJ_END_DECL
- 
-diff --git a/pjsip/src/pjsip-simple/evsub.c b/pjsip/src/pjsip-simple/evsub.c
-index 7cd8859..68a9564 100644
---- a/pjsip/src/pjsip-simple/evsub.c
-+++ b/pjsip/src/pjsip-simple/evsub.c
-@@ -831,7 +831,21 @@ static pj_status_t evsub_create( pjsip_dialog *dlg,
-     return PJ_SUCCESS;
- }
- 
-+/*
-+ * Increment the event subscription's group lock.
-+ */
-+PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub)
-+{
-+    return pj_grp_lock_add_ref(sub->grp_lock);
-+}
- 
-+/*
-+ * Decrement the event subscription's group lock.
-+ */
-+PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub)
-+{
-+    return pj_grp_lock_dec_ref(sub->grp_lock);
-+}
- 
- /*
-  * Create client subscription session.
--- 
-2.5.5
-
diff --git a/third-party/pjproject/patches/0001-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch b/third-party/pjproject/patches/0001-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch
deleted file mode 100644
index d8a9adb..0000000
--- a/third-party/pjproject/patches/0001-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From b7cb93b0e1729589a71e8b30d9a9893f0918e2a2 Mon Sep 17 00:00:00 2001
-From: George Joseph <george.joseph at fairview5.com>
-Date: Mon, 30 May 2016 11:58:22 -0600
-Subject: [PATCH] sip_transport_tcp/tls:  Set factory on transports created
- from accept
-
-The ability to re-use tcp and tls transports when a factory is
-specified now depends on transport->factory being set which is a new field
-in 2.5.  This was being set only on new outgoing sockets not on
-incoming sockets.  The result was that a client REGISTER created a new
-socket but without the factory set, the next outgoing request to the
-client, OPTIONS, INVITE, etc, would attempt to create another socket
-which the client would refuse.
-
-This patch sets the factory on transports created as a result of an
-accept.
----
- pjsip/src/pjsip/sip_transport_tcp.c | 1 +
- pjsip/src/pjsip/sip_transport_tls.c | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/pjsip/src/pjsip/sip_transport_tcp.c b/pjsip/src/pjsip/sip_transport_tcp.c
-index 1bbb324..00eb8fc 100644
---- a/pjsip/src/pjsip/sip_transport_tcp.c
-+++ b/pjsip/src/pjsip/sip_transport_tcp.c
-@@ -713,6 +713,7 @@ static pj_status_t tcp_create( struct tcp_listener *listener,
-     tcp->base.send_msg = &tcp_send_msg;
-     tcp->base.do_shutdown = &tcp_shutdown;
-     tcp->base.destroy = &tcp_destroy_transport;
-+    tcp->base.factory = &listener->factory;
- 
-     /* Create group lock */
-     status = pj_grp_lock_create(pool, NULL, &tcp->grp_lock);
-diff --git a/pjsip/src/pjsip/sip_transport_tls.c b/pjsip/src/pjsip/sip_transport_tls.c
-index a83ac32..36ee70d 100644
---- a/pjsip/src/pjsip/sip_transport_tls.c
-+++ b/pjsip/src/pjsip/sip_transport_tls.c
-@@ -742,6 +742,7 @@ static pj_status_t tls_create( struct tls_listener *listener,
-     tls->base.send_msg = &tls_send_msg;
-     tls->base.do_shutdown = &tls_shutdown;
-     tls->base.destroy = &tls_destroy_transport;
-+    tls->base.factory = &listener->factory;
- 
-     tls->ssock = ssock;
- 
--- 
-2.5.5
-
diff --git a/third-party/pjproject/patches/0002-Fix-1946-Avoid-deinitialization-of-uninitialized-cli.patch b/third-party/pjproject/patches/0002-Fix-1946-Avoid-deinitialization-of-uninitialized-cli.patch
new file mode 100644
index 0000000..c4288a3
--- /dev/null
+++ b/third-party/pjproject/patches/0002-Fix-1946-Avoid-deinitialization-of-uninitialized-cli.patch
@@ -0,0 +1,56 @@
+From 33fd755e819dc85a96718abc0ae26a9b46f14800 Mon Sep 17 00:00:00 2001
+From: nanang <nanang at localhost>
+Date: Thu, 28 Jul 2016 08:21:45 +0000
+Subject: [PATCH 2/3] Fix #1946: Avoid deinitialization of uninitialized client
+ auth session.
+
+---
+ pjsip/src/pjsip/sip_dialog.c | 18 ++++++------------
+ 1 file changed, 6 insertions(+), 12 deletions(-)
+
+diff --git a/pjsip/src/pjsip/sip_dialog.c b/pjsip/src/pjsip/sip_dialog.c
+index f03885d..421ddc4 100644
+--- a/pjsip/src/pjsip/sip_dialog.c
++++ b/pjsip/src/pjsip/sip_dialog.c
+@@ -92,6 +92,12 @@ static pj_status_t create_dialog( pjsip_user_agent *ua,
+     pj_list_init(&dlg->inv_hdr);
+     pj_list_init(&dlg->rem_cap_hdr);
+ 
++    /* Init client authentication session. */
++    status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
++				 dlg->pool, 0);
++    if (status != PJ_SUCCESS)
++	goto on_error;
++
+     status = pj_mutex_create_recursive(pool, dlg->obj_name, &dlg->mutex_);
+     if (status != PJ_SUCCESS)
+ 	goto on_error;
+@@ -283,12 +289,6 @@ PJ_DEF(pj_status_t) pjsip_dlg_create_uac( pjsip_user_agent *ua,
+     /* Initial route set is empty. */
+     pj_list_init(&dlg->route_set);
+ 
+-    /* Init client authentication session. */
+-    status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
+-				 dlg->pool, 0);
+-    if (status != PJ_SUCCESS)
+-	goto on_error;
+-
+     /* Register this dialog to user agent. */
+     status = pjsip_ua_register_dlg( ua, dlg );
+     if (status != PJ_SUCCESS)
+@@ -506,12 +506,6 @@ pj_status_t create_uas_dialog( pjsip_user_agent *ua,
+     }
+     dlg->route_set_frozen = PJ_TRUE;
+ 
+-    /* Init client authentication session. */
+-    status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
+-				 dlg->pool, 0);
+-    if (status != PJ_SUCCESS)
+-	goto on_error;
+-
+     /* Increment the dialog's lock since tsx may cause the dialog to be
+      * destroyed prematurely (such as in case of transport error).
+      */
+-- 
+2.7.4
+
diff --git a/third-party/pjproject/patches/config_site.h b/third-party/pjproject/patches/config_site.h
index 8e854b7..07e4d97 100644
--- a/third-party/pjproject/patches/config_site.h
+++ b/third-party/pjproject/patches/config_site.h
@@ -19,7 +19,7 @@
 #define PJ_SCANNER_USE_BITWISE	0
 #define PJ_OS_HAS_CHECK_STACK	0
 #define PJ_LOG_MAX_LEVEL		3
-#define PJ_ENABLE_EXTRA_CHECK	0
+#define PJ_ENABLE_EXTRA_CHECK	1
 #define PJSIP_MAX_TSX_COUNT		((64*1024)-1)
 #define PJSIP_MAX_DIALOG_COUNT	((64*1024)-1)
 #define PJSIP_UDP_SO_SNDBUF_SIZE	(512*1024)
@@ -37,3 +37,7 @@
 
 #undef PJ_TODO
 #define PJ_TODO(x)
+
+/* Defaults too low for WebRTC */
+#define PJ_ICE_MAX_CAND 32
+#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * 2)
diff --git a/third-party/versions.mak b/third-party/versions.mak
index ca40531..a4d7874 100644
--- a/third-party/versions.mak
+++ b/third-party/versions.mak
@@ -1,2 +1,2 @@
 
-PJPROJECT_VERSION = 2.5
+PJPROJECT_VERSION = 2.5.5

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/asterisk.git



More information about the Pkg-voip-commits mailing list