]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
9 years agoChangeLog: Updated for 13.7.1 13.7.1
kharwell [Wed, 3 Feb 2016 21:33:58 +0000 (16:33 -0500)] 
ChangeLog: Updated for 13.7.1

9 years agoRelease summaries: Add summaries for 13.7.1
kharwell [Wed, 3 Feb 2016 21:33:57 +0000 (16:33 -0500)] 
Release summaries: Add summaries for 13.7.1

9 years agoRelease summaries: Remove previous versions
Kevin Harwell [Wed, 3 Feb 2016 21:33:43 +0000 (15:33 -0600)] 
Release summaries: Remove previous versions

9 years ago.version: Update for 13.7.1
kharwell [Wed, 3 Feb 2016 21:33:43 +0000 (16:33 -0500)] 
.version: Update for 13.7.1

9 years ago.lastclean: Update for 13.7.1
kharwell [Wed, 3 Feb 2016 21:33:43 +0000 (16:33 -0500)] 
.lastclean: Update for 13.7.1

9 years agorealtime: Add database scripts for 13.7.1
kharwell [Wed, 3 Feb 2016 21:33:43 +0000 (16:33 -0500)] 
realtime: Add database scripts for 13.7.1

9 years agoMerge "AST-2016-003 udptl.c: Fix uninitialized values." into 13.7
Kevin Harwell [Wed, 3 Feb 2016 21:18:34 +0000 (15:18 -0600)] 
Merge "AST-2016-003 udptl.c: Fix uninitialized values." into 13.7

9 years agoMerge "AST-2016-002 chan_sip.c: Fix retransmission timeout integer overflow." into...
Kevin Harwell [Wed, 3 Feb 2016 21:15:52 +0000 (15:15 -0600)] 
Merge "AST-2016-002 chan_sip.c: Fix retransmission timeout integer overflow." into 13.7

9 years agoAST-2016-001 http: Provide greater control of TLS and set modern defaults. 84/2184/2
Joshua Colp [Wed, 3 Feb 2016 18:05:20 +0000 (14:05 -0400)] 
AST-2016-001 http: Provide greater control of TLS and set modern defaults.

This change exposes the configuration of various aspects of the TLS
support and sets the default to the modern standards.

The TLS cipher is now set to the best values according to the
Mozilla OpSec team, different TLS versions can now be disabled, and
the cipher order can be forced to be that of the server instead of
the client.

ASTERISK-24972 #close

Change-Id: I0a10f2883f7559af5e48dee0901251dbf30d45b8

9 years agoAST-2016-003 udptl.c: Fix uninitialized values. 89/2189/2
Richard Mudgett [Mon, 7 Dec 2015 18:46:53 +0000 (12:46 -0600)] 
AST-2016-003 udptl.c: Fix uninitialized values.

Sending UDPTL packets to Asterisk with the right amount of missing
sequence numbers and enough redundant 0-length IFP packets, can make
Asterisk crash.

ASTERISK-25603 #close
Reported by: Walter Doekes

ASTERISK-25742 #close
Reported by: Torrey Searle

Change-Id: I97df8375041be986f3f266ac1946a538023a5255

9 years agoAST-2016-002 chan_sip.c: Fix retransmission timeout integer overflow. 87/2187/2
Richard Mudgett [Mon, 28 Sep 2015 22:07:42 +0000 (17:07 -0500)] 
AST-2016-002 chan_sip.c: Fix retransmission timeout integer overflow.

Setting the sip.conf timert1 value to a value higher than 1245 can cause
an integer overflow and result in large retransmit timeout times.  These
large timeout times hold system file descriptors hostage and can cause the
system to run out of file descriptors.

NOTE: The default sip.conf timert1 value is 500 which does not expose the
vulnerability.

* The overflow is now detected and the previous timeout time is
calculated.

ASTERISK-25397 #close
Reported by: Alexander Traud

Change-Id: Ia7231f2f415af1cbf90b923e001b9219cff46290

9 years agoChangeLog: Updated for 13.7.0 13.7.0
kharwell [Fri, 15 Jan 2016 19:01:49 +0000 (14:01 -0500)] 
ChangeLog: Updated for 13.7.0

9 years agoRelease summaries: Add summaries for 13.7.0
kharwell [Fri, 15 Jan 2016 19:01:43 +0000 (14:01 -0500)] 
Release summaries: Add summaries for 13.7.0

9 years agoRelease summaries: Remove previous versions
Kevin Harwell [Fri, 15 Jan 2016 18:57:53 +0000 (12:57 -0600)] 
Release summaries: Remove previous versions

9 years ago.version: Update for 13.7.0
kharwell [Fri, 15 Jan 2016 18:57:53 +0000 (13:57 -0500)] 
.version: Update for 13.7.0

9 years ago.lastclean: Update for 13.7.0
kharwell [Fri, 15 Jan 2016 18:57:53 +0000 (13:57 -0500)] 
.lastclean: Update for 13.7.0

9 years agorealtime: Add database scripts for 13.7.0
kharwell [Fri, 15 Jan 2016 18:57:53 +0000 (13:57 -0500)] 
realtime: Add database scripts for 13.7.0

9 years agoChangeLog: Updated for 13.7.0-rc3 13.7.0-rc3
kharwell [Tue, 12 Jan 2016 20:02:42 +0000 (15:02 -0500)] 
ChangeLog: Updated for 13.7.0-rc3

9 years agoRelease summaries: Add summaries for 13.7.0-rc3
kharwell [Tue, 12 Jan 2016 20:02:25 +0000 (15:02 -0500)] 
Release summaries: Add summaries for 13.7.0-rc3

9 years agoRelease summaries: Remove previous versions
Kevin Harwell [Tue, 12 Jan 2016 20:02:11 +0000 (14:02 -0600)] 
Release summaries: Remove previous versions

9 years ago.version: Update for 13.7.0-rc3
kharwell [Tue, 12 Jan 2016 20:02:11 +0000 (15:02 -0500)] 
.version: Update for 13.7.0-rc3

9 years ago.lastclean: Update for 13.7.0-rc3
kharwell [Tue, 12 Jan 2016 20:02:11 +0000 (15:02 -0500)] 
.lastclean: Update for 13.7.0-rc3

9 years agorealtime: Add database scripts for 13.7.0-rc3
kharwell [Tue, 12 Jan 2016 20:02:11 +0000 (15:02 -0500)] 
realtime: Add database scripts for 13.7.0-rc3

9 years agores_sorcery_realtime: Remove leading ^ requirement. 93/1993/1
Mark Michelson [Tue, 12 Jan 2016 16:36:15 +0000 (10:36 -0600)] 
res_sorcery_realtime: Remove leading ^ requirement.

res_sorcery_realtime's search-by-regex callback performed a check to
ensure that the passed-in regex began with a caret (^). If it did not,
then no results would be returned.

This callback only started to become used when "like" support was added
to PJSIP CLI commands. The CLI command for listing objects would pass an
empty regex ("") to the sorcery backend if no "like" statement was
present. For most sorcery backends, this resulted in returning all
objects. However, for realtime, this resulted in returning no objects.

This commit seeks to fix the regression by removing the requirement from
res_sorcery_realtime for the passed-in-regex to begin with a caret.

ASTERISK-25689 #close
Reported by Marcelo Terres

Change-Id: I22b4dc5d7f3f11bb29ac2e42ef94682e9bab3b20

9 years agoMerge "pbx: Deadlock between contexts container and context_merge locks" into 13.7
Joshua Colp [Mon, 11 Jan 2016 23:37:32 +0000 (17:37 -0600)] 
Merge "pbx: Deadlock between contexts container and context_merge locks" into 13.7

9 years agopbx: Deadlock between contexts container and context_merge locks 65/1965/2
Kevin Harwell [Fri, 8 Jan 2016 21:22:05 +0000 (15:22 -0600)] 
pbx: Deadlock between contexts container and context_merge locks

Recent changes (ASTERISK-25394 commit 2bd27d12223fe33b58c453965ed5c6ed3af7c4f5)
introduced the possibility of a deadlock. Due to the mentioned modifications
ast_change_hints now needs to keep both merge/delete and state callbacks from
occurring while it executes. Unfortunately, sometimes ast_change_hints can be
called with the contexts container locked. When this happens it's possible for
another thread to grab the context_merge_lock before the thread calling into
ast_change_hints does and then try to obtain the contexts container lock. This
of course causes a deadlock between the two threads. The thread calling into
ast_change_hints waits for the other thread to release context_merge_lock and
the other thread is waiting on that one to release the contexts container lock.

Unfortunately, there is not a great way to fix this problem. When hints change,
the subsequent state callbacks cannot run at the same time as a merge/delete,
nor when the usual state callbacks do. This patch alleviates the problem by
having those particular callbacks (the ones run after a hint change) occur in a
serialized task. By moving the context_merge_lock to a task it can now safely be
attempted or held without a deadlock occurring.

ASTERISK-25640 #close
Reported by: Krzysztof Trempala

Change-Id: If2210ea241afd1585dc2594c16faff84579bf302

9 years agores_rtp_asterisk: Revert DTLS negotiation changes. 77/1977/1
Joshua Colp [Fri, 8 Jan 2016 17:49:02 +0000 (13:49 -0400)] 
res_rtp_asterisk: Revert DTLS negotiation changes.

Due to locking issues within pjnath these changes are being
reverted until pjnath can be changed.

ASTERISK-25645

Revert "res_rtp_asterisk.c: Fix DTLS negotiation delays."

This reverts commit 24ae124e4f7310cfa64c187b944b2ffc060da28d.

Change-Id: I2986cfb2c43dc14455c1bcaf92c3804f9da49705

Revert "res_rtp_asterisk: Resolve further timing issues with DTLS negotiation"

This reverts commit 965a0eee46d24321f74c244e23c5a5f45e67e12b.

Change-Id: Ie68fafde27dad4b03cb7a1e27ce2a8502c3f7bbe

9 years agoast_format_cap_append_by_type: Resolve codec reference leak. 27/1927/1
Corey Farrell [Thu, 7 Jan 2016 15:39:19 +0000 (10:39 -0500)] 
ast_format_cap_append_by_type: Resolve codec reference leak.

This resolves a reference leak caused by ASTERISK-25535.  The pointer
returned by ast_format_get_codec is saved so it can be released.

ASTERISK-25664 #close

Change-Id: If9941b1bf4320b2c59056546d6bce9422726d1ec

9 years agoChangeLog: Updated for 13.7.0-rc2 13.7.0-rc2
kharwell [Fri, 18 Dec 2015 18:18:42 +0000 (13:18 -0500)] 
ChangeLog: Updated for 13.7.0-rc2

9 years agoRelease summaries: Add summaries for 13.7.0-rc2
kharwell [Fri, 18 Dec 2015 18:18:26 +0000 (13:18 -0500)] 
Release summaries: Add summaries for 13.7.0-rc2

9 years agoRelease summaries: Remove previous versions
Kevin Harwell [Fri, 18 Dec 2015 18:18:12 +0000 (12:18 -0600)] 
Release summaries: Remove previous versions

9 years ago.version: Update for 13.7.0-rc2
kharwell [Fri, 18 Dec 2015 18:18:12 +0000 (13:18 -0500)] 
.version: Update for 13.7.0-rc2

9 years ago.lastclean: Update for 13.7.0-rc2
kharwell [Fri, 18 Dec 2015 18:18:12 +0000 (13:18 -0500)] 
.lastclean: Update for 13.7.0-rc2

9 years agorealtime: Add database scripts for 13.7.0-rc2
kharwell [Fri, 18 Dec 2015 18:18:12 +0000 (13:18 -0500)] 
realtime: Add database scripts for 13.7.0-rc2

9 years agoMerge "res_sorcery_memory_cache: Add support for a full backend cache." into 13.7
Joshua Colp [Fri, 18 Dec 2015 17:57:51 +0000 (11:57 -0600)] 
Merge "res_sorcery_memory_cache: Add support for a full backend cache." into 13.7

9 years agoMerge "json: Audit ast_json_* usage for thread safety." into 13.7
Joshua Colp [Fri, 18 Dec 2015 17:57:23 +0000 (11:57 -0600)] 
Merge "json: Audit ast_json_* usage for thread safety." into 13.7

9 years agoAlembic: Add PJSIP global keep_alive_interval.
Mark Michelson [Wed, 16 Dec 2015 17:25:13 +0000 (11:25 -0600)] 
Alembic: Add PJSIP global keep_alive_interval.

The keep_alive_interval option was added about a year ago, but no
alembic revision was created to add the appropriate column to the
database.

This commit fixes the problem and adds the column. This was discovered
by running the testsuite with automatic conversion to realtime enabled.

Change-Id: If3ef92a7c4f4844d08f8aae170d2178aec5c4c1a

9 years agoAlembic: Increase column size of PJSIP AOR "contact".
Mark Michelson [Wed, 16 Dec 2015 17:28:14 +0000 (11:28 -0600)] 
Alembic: Increase column size of PJSIP AOR "contact".

When running the PJSIP AMI "show_endpoint" test with automatic
conversion to realtime, the test would fail. This was because the AOR
"contact" column was sized at 40, and the configured contact was larger
than that.

This commit increases the size of the contact column to 255 characters.

Change-Id: Ia65bc7fd37699b7c0eaef9629a1a31eab9a24ba1

9 years agojson: Audit ast_json_* usage for thread safety. 42/1842/1
Joshua Colp [Mon, 14 Dec 2015 18:04:15 +0000 (14:04 -0400)] 
json: Audit ast_json_* usage for thread safety.

The JSON library Asterisk uses, jansson, is not thread
safe for us in a few ways. To help with this wrappers for JSON
object reference count increasing and decreasing were added
which use a global lock to ensure they don't clobber over
each other. This does not extend to reference count manipulation
within the jansson library itself. This means you can't safely
use the object borrowing specifier (O) in ast_json_pack and
you can't share JSON instances between objects.

This change removes uses of the O specifier and replaces them
with the o specifier and an explicit ast_json_ref. Some cases
of instance sharing have also been removed.

ASTERISK-25601 #close

Change-Id: I06550d8b0cc1bfeb56cab580a4e608ae4f1ec7d1

9 years agores_sorcery_memory_cache: Add support for a full backend cache. 41/1841/1
Joshua Colp [Sat, 5 Dec 2015 16:01:55 +0000 (12:01 -0400)] 
res_sorcery_memory_cache: Add support for a full backend cache.

This change introduces the configuration option 'full_backend_cache'
which changes the cache to be a full mirror of the backend instead
of a per-object cache. This allows all sorcery retrieval operations
to be carried out against it and is useful for object types which
are used in a "retrieve all" or "retrieve some" pattern.

ASTERISK-25625 #close

Change-Id: Ie2993487e9c19de563413ad5561c7403b48caab5
(cherry picked from commit 59d5bb0613810418f2a618b9a6dee5bcfd45767e)

9 years agoMerge "rtp_engine: Ignore empty filenames in DTLS configuration." into 13.7
Joshua Colp [Thu, 17 Dec 2015 18:49:56 +0000 (12:49 -0600)] 
Merge "rtp_engine: Ignore empty filenames in DTLS configuration." into 13.7

9 years agortp_engine: Ignore empty filenames in DTLS configuration. 36/1836/1
Joshua Colp [Thu, 17 Dec 2015 16:25:47 +0000 (12:25 -0400)] 
rtp_engine: Ignore empty filenames in DTLS configuration.

When applying an empty DTLS configuration the filenames in the
configuration will be empty. This is actually valid to do and
each filename should simply be ignored.

Change-Id: Ib761dc235638a3fb701df337952f831fc3e69539

9 years agochan_sip: Enable WebSocket support by default. 35/1835/1
Joshua Colp [Thu, 17 Dec 2015 14:10:43 +0000 (10:10 -0400)] 
chan_sip: Enable WebSocket support by default.

Per the documentation the WebSocket support in chan_sip is
supposed to be enabled by default but is not. This change
corrects that.

Change-Id: Icb02bbcad47b11a795c14ce20a9bf29649a54423

9 years agoChangeLog: Updated for 13.7.0-rc1 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 18:01:38 +0000 (13:01 -0500)] 
ChangeLog: Updated for 13.7.0-rc1

9 years agoRelease summaries: Add summaries for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:57:53 +0000 (12:57 -0500)] 
Release summaries: Add summaries for 13.7.0-rc1

9 years ago.version: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:54:01 +0000 (12:54 -0500)] 
.version: Update for 13.7.0-rc1

9 years ago.lastclean: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:54:01 +0000 (12:54 -0500)] 
.lastclean: Update for 13.7.0-rc1

9 years agorealtime: Add database scripts for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:54:01 +0000 (12:54 -0500)] 
realtime: Add database scripts for 13.7.0-rc1

9 years ago.version: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:48:51 +0000 (12:48 -0500)] 
.version: Update for 13.7.0-rc1

9 years ago.lastclean: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:48:51 +0000 (12:48 -0500)] 
.lastclean: Update for 13.7.0-rc1

9 years agorealtime: Add database scripts for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:48:50 +0000 (12:48 -0500)] 
realtime: Add database scripts for 13.7.0-rc1

9 years ago.version: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:39:26 +0000 (12:39 -0500)] 
.version: Update for 13.7.0-rc1

9 years ago.lastclean: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:39:26 +0000 (12:39 -0500)] 
.lastclean: Update for 13.7.0-rc1

9 years agorealtime: Add database scripts for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:39:26 +0000 (12:39 -0500)] 
realtime: Add database scripts for 13.7.0-rc1

9 years ago.version: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:28:04 +0000 (12:28 -0500)] 
.version: Update for 13.7.0-rc1

9 years ago.lastclean: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:28:04 +0000 (12:28 -0500)] 
.lastclean: Update for 13.7.0-rc1

9 years agorealtime: Add database scripts for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:28:04 +0000 (12:28 -0500)] 
realtime: Add database scripts for 13.7.0-rc1

9 years ago.version: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:19:55 +0000 (12:19 -0500)] 
.version: Update for 13.7.0-rc1

9 years ago.lastclean: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:19:55 +0000 (12:19 -0500)] 
.lastclean: Update for 13.7.0-rc1

9 years agorealtime: Add database scripts for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:19:55 +0000 (12:19 -0500)] 
realtime: Add database scripts for 13.7.0-rc1

9 years ago.version: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:12:03 +0000 (12:12 -0500)] 
.version: Update for 13.7.0-rc1

9 years ago.lastclean: Update for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:12:03 +0000 (12:12 -0500)] 
.lastclean: Update for 13.7.0-rc1

9 years agorealtime: Add database scripts for 13.7.0-rc1
kharwell [Tue, 15 Dec 2015 17:12:03 +0000 (12:12 -0500)] 
realtime: Add database scripts for 13.7.0-rc1

9 years agores_rtp_asterisk.c: Fix DTLS negotiation delays. 18/1818/1
server-pandora [Mon, 14 Dec 2015 19:53:20 +0000 (11:53 -0800)] 
res_rtp_asterisk.c: Fix DTLS negotiation delays.

- Trigger pending DTLS packets to send out, once the RTP instance's remote
  address is set.
- Avoids locking the DTLS structure unnecessarily by only doing this if
  DTLS is passive.
- Add DTLS locks around the structurally sensitive calls in the SSL
  portion of __rtp_recvfrom, since dtls_srtp_check_pending does not lock
  inside of itself, and we're dealing with the SSL BIO in at least two
  threads.

WebRTC channels may receive a DTLS handshake before
ast_rtp_remote_address_set is called, which causes there to be a pending
response to send out.   Previous to 1ad827, this was handled by calling
dtls_srtp_check_pending on receipt of any RTP packet - a STUN or RTP
packet could trigger the pending handshake response.  Since that was
rightfully removed, whenever the DTLS handshake is received before the
remote address is set, we would have to wait until another SSL packet
arrives.

As of Chrome M47's optimizations to their handshake process, WebRTC
conversations between Chrome M47+ and Asterisk, where Asterisk is passive,
experience a 1 second delay without this patch, because the SSL handshake
is received before ICE negotation stores the remote_address, and the next
SSL packet isn't received until after a 1 second timeout in Chrome, which
causes a new handshake request.

ASTERISK-25614 #close

Change-Id: I547f1be7e302dbf71f6553dd8cbc0657b1d0b908

9 years agoFix sscanf() format string type mismatch. 14/1814/3
Richard Mudgett [Mon, 14 Dec 2015 21:25:02 +0000 (15:25 -0600)] 
Fix sscanf() format string type mismatch.

ASTERISK-25615
Reported by: George Joseph

Change-Id: Ieff35307254ca193f3d473cff2e396ca57c7ce0b

9 years agoMerge "main/utils: Don't emit an ERROR message if the read end of a pipe closes"...
Matt Jordan [Mon, 14 Dec 2015 12:45:03 +0000 (06:45 -0600)] 
Merge "main/utils: Don't emit an ERROR message if the read end of a pipe closes" into 13

9 years agomain/utils: Don't emit an ERROR message if the read end of a pipe closes 11/1811/1
Matt Jordan [Sun, 13 Dec 2015 19:13:55 +0000 (13:13 -0600)] 
main/utils: Don't emit an ERROR message if the read end of a pipe closes

An ERROR or WARNING message should generally indicate that something has gone
wrong in Asterisk. In the case of writing to a file descriptor, Asterisk is not
in control of when the far end closes its reading on a file descriptor. If the
far end does close the file descriptor in an unclean fashion, this isn't a bug
or error in Asterisk, particularly when the situation can be gracefully
handled in Asterisk.

Currently, when this happens, a user would see the following somewhat cryptic
ERROR message:

  "utils.c: write() returned error: Broken pipe"

There's a few problems with this:
(1) It doesn't provide any context, other than 'something broke a pipe'
(2) As noted, it isn't actually an error in Asterisk
(3) It can get rather spammy if the thing breaking the pipe occurs often, such
    as a FastAGI server
(4) Spammy ERROR messages make Asterisk appear to be having issues, or can even
    mask legitimate issues

This patch changes ast_carefulwrite to only log an ERROR if we actually had one
that was reasonably under our control. For debugging purposes, we still emit
a debug message if we detect that the far side has stopped reading.

Change-Id: Ia503bb1efcec685fa6f3017bedf98061f8e1b566

9 years agopjsip/config_transport: Check pjproject version at runtime for async ops 06/1806/1
George Joseph [Sat, 12 Dec 2015 17:08:50 +0000 (10:08 -0700)] 
pjsip/config_transport: Check pjproject version at runtime for async ops

pjproject < 2.5.0 will segfault on a tls transport if async_operations
is greater than 1.  A runtime version check has been added to throw
an error if the version is < 2.5.0 and async_operations > 1.

To assist in the check, a new api "ast_compare_versions" was added
to utils which compares 2 major.minor.patch.extra version strings.

ASTERISK-25615 #close

Change-Id: I8e88bb49cbcfbca88d9de705496d6f6a8c938a98
Reported-by: George Joseph
Tested-by: George Joseph
9 years agochan_sip: Add TCP/TLS keepalive to TCP/TLS server 98/1798/2
Jonathan Rose [Thu, 10 Dec 2015 17:44:03 +0000 (11:44 -0600)] 
chan_sip: Add TCP/TLS keepalive to TCP/TLS server

Adds the TCP Keep Alive option to TCP and TLS server sockets. Previously
this option was only being set on session sockets.
http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/
According to the link above, the SO_KEEPALIVE option is useful for knowing
when a TCP connected endpoint has severed communication without indicating
it or has become unreachable for some reason. Without this patch, keep
alive is not set on the socket listening for incoming TCP sessions and
in Komatsu's report this resulted in the thread listening for TCP becoming
stuck in a waiting state.

ASTERISK-25364 #close
Reported by: Hiroaki Komatsu

Change-Id: I7ed7bcfa982b367dc64b4b73fbd962da49b9af36

9 years agoMerge "res_pjsip: Add existence and readablity checks for tls related files" into 13
Joshua Colp [Thu, 10 Dec 2015 13:13:32 +0000 (07:13 -0600)] 
Merge "res_pjsip:  Add existence and readablity checks for tls related files" into 13

9 years agoMerge "app_meetme: Set default value for audio_buffers." into 13
Joshua Colp [Thu, 10 Dec 2015 12:03:32 +0000 (06:03 -0600)] 
Merge "app_meetme: Set default value for audio_buffers." into 13

9 years agores_chan_stats: Fix bug to send correct statistics to StatsD 96/1796/1
tcambron [Wed, 9 Dec 2015 15:48:29 +0000 (09:48 -0600)] 
res_chan_stats: Fix bug to send correct statistics to StatsD

Fixed a bug that originally would show a negative number of
active calls occuring in Asterisk. A gauge is persistent so
incrementing and decrementing it results in a more consistent
performance. Also changed to the call to StatsD to use
ast_statsd_log_string() so that a "+" could be sent to StatsD.

ASTERISK-25619 #close

Change-Id: Iaaeff5c4c6a46535366b4d16ea0ed0ee75ab2ee7

9 years agoapp_meetme: Set default value for audio_buffers. 94/1794/2
Corey Farrell [Mon, 7 Dec 2015 19:07:32 +0000 (14:07 -0500)] 
app_meetme: Set default value for audio_buffers.

The default value was never set for audio_buffers, causing bad
audio quality.  This ensures the default is always set.

ASTERISK-25569 #close

Change-Id: I2d2ee3e644120b0f9f6ea6ab9286d7d590942a44

9 years agochan_sip: Check sip_pvt pointer in ast_channel_get_t38_state(c) 90/1790/1
Filip Jenicek [Tue, 8 Dec 2015 07:57:22 +0000 (08:57 +0100)] 
chan_sip: Check sip_pvt pointer in ast_channel_get_t38_state(c)

Asterisk may crash when calling ast_channel_get_t38_state(c)
on a locked channel which is being hung up.

ASTERISK-25609 #close

Change-Id: Ifaa707c04b865a290ffab719bd2e5c48ff667c7b

9 years agores_pjsip: Add existence and readablity checks for tls related files 88/1788/1
George Joseph [Tue, 8 Dec 2015 23:49:20 +0000 (16:49 -0700)] 
res_pjsip:  Add existence and readablity checks for tls related files

Both transport and endpoint now check for the existence and readability
of tls certificate and key files before passing them on to pjproject.
This will cause the object to not load rather than waiting for pjproject
to discover that there's a problem when a session is attempted.

NOTE: chan_sip also uses ast_rtp_dtls_cfg_parse but it's located
in build_peer which is gigantic and I didn't want to disturb it.
Error messages will emit but it won't interrupt chan_sip loading.

ASTERISK-25618 #close

Change-Id: Ie43f2c1d653ac1fda6a6f6faecb7c2ebadaf47c9
Reported-by: George Joseph
Tested-by: George Joseph
9 years agochan_sip.c: Start ICE negotiation when response is sent or received. 87/1787/2
Eugene Voityuk [Wed, 2 Dec 2015 18:42:15 +0000 (20:42 +0200)] 
chan_sip.c: Start ICE negotiation when response is sent or received.

The current logic for ICE negotiation starts it
when receiving an SDP with ICE candidates. This is
incorrect as ICE negotiation can only start when each
call party have at least one pair of local and remote
candidate. Starting ICE negotiation early would result
in negotiation failure and ultimately no audio.

This change makes it so ICE negotiation is only started
when a response with SDP is received or when a response
with SDP is sent.

ASTERISK-24146

Change-Id: I55a632bde9e9827871b09141d82747e08379a8ca

9 years agoMerge "res_pjsip/config_transport: Prevent async_operations > 1 when protocol = tls...
Joshua Colp [Tue, 8 Dec 2015 19:17:58 +0000 (13:17 -0600)] 
Merge "res_pjsip/config_transport: Prevent async_operations > 1 when protocol = tls" into 13

9 years agoMerge "translate: Avoid a warning message when doing FEC within Opus Codec." into 13
Joshua Colp [Tue, 8 Dec 2015 19:14:29 +0000 (13:14 -0600)] 
Merge "translate: Avoid a warning message when doing FEC within Opus Codec." into 13

9 years agores_pjsip/config_transport: Prevent async_operations > 1 when protocol = tls 85/1785/3
George Joseph [Tue, 8 Dec 2015 17:03:53 +0000 (10:03 -0700)] 
res_pjsip/config_transport: Prevent async_operations > 1 when protocol = tls

See ASTERISK-25615.
If the transport protocol is tls and async_operations > 1, pjproject
will segfault if more than one operation is attempted on the same socket.
Until this is fixed upstream, a check has been added to throw an error
if a tls transport config has async_operations set to > 1.

ASTERISK-25615

Change-Id: I76b9a5b2a5a0054fe71ca5851e635f2dca7685a6
Reported-by: George Joseph
Tested-by: George Joseph
9 years agocodec_resample: Increase buffer for Opus Codec with FEC. 83/1783/1
Alexander Traud [Tue, 8 Dec 2015 14:39:03 +0000 (15:39 +0100)] 
codec_resample: Increase buffer for Opus Codec with FEC.

ASTERISK-25599 #close

Change-Id: Idbd187f711b2ec63dda949ca0f79aa0c1a0a0b6e

9 years agotranslate: Avoid a warning message when doing FEC within Opus Codec. 78/1778/1
Alexander Traud [Tue, 8 Dec 2015 09:46:21 +0000 (10:46 +0100)] 
translate: Avoid a warning message when doing FEC within Opus Codec.

ASTERISK-25616 #close

Change-Id: Ibe729aaf2e6e25506cff247cec5149ec1e589319

9 years agochan_sip: Fix crash involving the bogus peer during sip reload. 65/1765/2
Richard Mudgett [Fri, 4 Dec 2015 21:36:45 +0000 (15:36 -0600)] 
chan_sip: Fix crash involving the bogus peer during sip reload.

A crash happens sometimes when performing a CLI "sip reload".  The bogus
peer gets refreshed while it is in use by a new call which can cause the
crash.

* Protected the global bogus peer object with an ao2 global object
container.

ASTERISK-25610 #close

Change-Id: I5b528c742195681abcf713c6e1011ea65354eeed

9 years agoMerge "res_pjsip/contacts/statsd: Make contact lifecycle events more consistent...
Joshua Colp [Mon, 7 Dec 2015 13:51:28 +0000 (07:51 -0600)] 
Merge "res_pjsip/contacts/statsd:  Make contact lifecycle events more consistent" into 13

9 years agoRevert "bridges/bridge_t38: Add a bridging module for managing T.38 state" 70/1770/1
Matt Jordan [Sun, 6 Dec 2015 22:32:32 +0000 (16:32 -0600)] 
Revert "bridges/bridge_t38: Add a bridging module for managing T.38 state"

This reverts commit 6614babea27fbafbe11820ea03737dd5c4f9ecec.

Unfortunately, using a bridge to manage T.38 state will cause severe deadlocks
in core_unreal/chan_local. Local channels attempt to reach across both their
peer and the peer's bridge to inspect T.38 state. Given the propensity of
Local channel chains, managing the locking situation in such a scenario is
practically infeasible.

Change-Id: Ic687397ffea08dfb899345a443bd990ec3d0416a

9 years agores_pjsip/contacts/statsd: Make contact lifecycle events more consistent 67/1767/3
George Joseph [Fri, 4 Dec 2015 22:23:21 +0000 (15:23 -0700)] 
res_pjsip/contacts/statsd:  Make contact lifecycle events more consistent

It will never be perfect or even pretty, mostly because of the differences
between static and dynamic contacts.

Created:

Can't use the contact or contact_status alloc functions
because the objects come and go regardless of the actual state.

Can't use the contact_apply_handler, ast_sip_location_add_contact or
a sorcery created handler because they only get called for dynamic
contacts.  Similarly, permanent_uri_handler only gets called for
static contacts.

So, Matt had it right. :)  ast_res_pjsip_find_or_create_contact_status is
the only place it can go and not have duplicated code.  Both
permanent_uri_handler and contact_apply_handler call find_or_create.

Removed:

Can't use the destructors for the same reason as above.  The only
place to put this is in persistent_endpoint_contact_deleted_observer
which I believe is the "correct" place but even that will handle only
dynamic contacts.  This doesn't called on shutdown however.  There is
no hook to use for static contacts that may be removed because of a
config change while asterisk is in operation.

I moved the cleanup of contact_status from ast_sip_location_delete_contact
to the handler as well.

Status Change and RTT:

Although they worked fine where they were (in update_contact_status) I
moved them to persistent_endpoint_contact_status_observer to make it
more consistent with removed.  There was logic there already to detect
a state change.

Finally, fixed a nit in permanent_uri_handler rmudgett reported
eralier.

ASTERISK-25608 #close

Change-Id: I4b56e7dfc3be3baaaf6f1eac5b2068a0b79e357d
Reported-by: George Joseph
Tested-by: George Joseph
9 years agoMerge "res_format_attr_vp8: In SDP, forward max-fr and max-fs for video-codec VP8...
Matt Jordan [Fri, 4 Dec 2015 17:34:12 +0000 (11:34 -0600)] 
Merge "res_format_attr_vp8: In SDP, forward max-fr and max-fs for video-codec VP8." into 13

9 years agoMerge "res_format_attr_opus: Update to latest RFC 7587." into 13
Matt Jordan [Fri, 4 Dec 2015 17:34:07 +0000 (11:34 -0600)] 
Merge "res_format_attr_opus: Update to latest RFC 7587." into 13

9 years agoMerge "bridges/bridge_t38: Add a bridging module for managing T.38 state" into 13
Matt Jordan [Fri, 4 Dec 2015 14:58:00 +0000 (08:58 -0600)] 
Merge "bridges/bridge_t38: Add a bridging module for managing T.38 state" into 13

9 years agores_format_attr_vp8: In SDP, forward max-fr and max-fs for video-codec VP8. 76/1676/4
Alexander Traud [Sat, 21 Nov 2015 12:02:15 +0000 (13:02 +0100)] 
res_format_attr_vp8: In SDP, forward max-fr and max-fs for video-codec VP8.

ASTERISK-25584 #close

Change-Id: Iae00071b4ff1ae76f24995aeac4d00284fd14f91

9 years agores_format_attr_opus: Update to latest RFC 7587. 74/1674/5
Alexander Traud [Sat, 21 Nov 2015 11:21:05 +0000 (12:21 +0100)] 
res_format_attr_opus: Update to latest RFC 7587.

Beside that, the format-attribute module sends only non-default values in the
line fmtp, now. This avoids unnecessary overhead in SDP messages. Furthermore,
previously the parameter stereo was not parsed when being the first parameter.

ASTERISK-25583 #close

Change-Id: Iae85ba3e5960bfd5d51cf65bcffad00dd4875a73

9 years agoFix crash in audiohook translate to slin 59/1759/1
Jonathan Rose [Wed, 2 Dec 2015 20:11:08 +0000 (14:11 -0600)] 
Fix crash in audiohook translate to slin

This patch fixes a crash which would occur when an audiohook was
applied to a channel using an audio codec that could not be translated
to signed linear (such as when using pass-through codecs like OPUS or
when the codec translator module for the format in use is not loaded).

ASTERISK-25498 #close
Reported by: Ben Langfeld

Change-Id: Ib6ea7373fcc22e537cad373996136636201f4384

9 years agoMerge "res_pjsip: Use a MD5 hash for static Contact IDs" into 13
Joshua Colp [Thu, 3 Dec 2015 21:51:45 +0000 (15:51 -0600)] 
Merge "res_pjsip: Use a MD5 hash for static Contact IDs" into 13

9 years agoMerge "res_pjsip: Update logging to show contact->uri in messages" into 13
Joshua Colp [Thu, 3 Dec 2015 18:39:08 +0000 (12:39 -0600)] 
Merge "res_pjsip:  Update logging to show contact->uri in messages" into 13

9 years agoMerge "codec_resample: Increase buffer for Opus Codec." into 13
Joshua Colp [Thu, 3 Dec 2015 18:38:07 +0000 (12:38 -0600)] 
Merge "codec_resample: Increase buffer for Opus Codec." into 13

9 years agores_pjsip: Use a MD5 hash for static Contact IDs 56/1756/1
George Joseph [Thu, 3 Dec 2015 18:07:49 +0000 (11:07 -0700)] 
res_pjsip: Use a MD5 hash for static Contact IDs

When 90d9a70789 was merged, it mostly tested dynamic contacts created as
a result of registering a PJSIP endpoint. Contacts generated in this
fashion typically have a long alphanumeric string as their object identifier,
which maps reasonably well for StatsD. Unfortunately, this doesn't work in the
general case. StatsD treats both '.' and ':' characters as special characters.
In particular, having a ':' appear in the middle of a StatsD metric will
result in the metric being rejected.

This causes some obvious issues with SIP URIs.

The StatsD API should not be responsible for escaping the metric name passed
to it. The metric is treated as a single long string, and it would be
challenging to know what to escape in the string passed to the function.
Likewise, we don't want to escape the metric in PJSIP, as that involves
overhead that is wasted when either res_statsd isn't loaded or enabled.

This patch takes an alternative approach. The Contact ID has been changed
to be "aor@@uri_hash" instead of "aor@@uri". This (a) won't contain any of the
aforementioned special characters, (b) can be done on Contact creation,
which has minimal impact on run-time performance, and (c) also conforms to an
earlier commit that changed the ID for dynamic contacts.

The downside of this is that StatsD users will have to map SHA1 hashes back to
the Contacts that are emitting the statistics. To that end, the CLI commands
have been updated to include the first 10 characters of the MD5 hash, which
should be enough to match what is shown in Graphite (or some other StatsD
backend).

ASTERISK-25595 #close

Change-Id: Ic674a3307280365b4a45864a3571c295b48a01e2
Reported-by: Matt Jordan
Tested-by: George Joseph
9 years agoMerge "res_sorcery_memory_cache.c: Fix off nominal ref leak." into 13
Joshua Colp [Thu, 3 Dec 2015 11:51:16 +0000 (05:51 -0600)] 
Merge "res_sorcery_memory_cache.c: Fix off nominal ref leak." into 13

9 years agoMerge "sched.c: Make not return a sched id of 0." into 13
Joshua Colp [Thu, 3 Dec 2015 11:50:42 +0000 (05:50 -0600)] 
Merge "sched.c: Make not return a sched id of 0." into 13

9 years agoMerge topic 'ASTERISK-25476' into 13
Joshua Colp [Thu, 3 Dec 2015 11:50:04 +0000 (05:50 -0600)] 
Merge topic 'ASTERISK-25476' into 13

* changes:
  Audit improper usage of scheduler exposed by 5c713fdf18f. (v13 additions)
  Audit improper usage of scheduler exposed by 5c713fdf18f.

9 years agores_pjsip: Update logging to show contact->uri in messages 31/1731/12
George Joseph [Tue, 1 Dec 2015 04:19:18 +0000 (21:19 -0700)] 
res_pjsip:  Update logging to show contact->uri in messages

An earlier commit changed the id of dynamic contacts to contain
a hash instead of the uri.  This patch updates status change
logging to show the aor/uri instead of the id.  This required
adding the aor id to contact and contact_status and adding
uri to contact_status.  The aor id gets added to contact and
contact_status in their allocators and the uri gets added to
contact_status in pjsip_options when the contact_status is
created or updated.

ASTERISK-25598 #close

Reported-by: George Joseph
Tested-by: George Joseph
Change-Id: I56cbec1d2ddbe8461367dd8b6da8a6f47f6fe511

9 years agoUnset BRIDGEPEER when leaving a bridge 52/1752/1
Jonathan Rose [Tue, 1 Dec 2015 22:11:07 +0000 (16:11 -0600)] 
Unset BRIDGEPEER when leaving a bridge

Currently if a channel is transferred out of a bridge, the BRIDGEPEER
variable (also BRIDGEPVTCALLID) remain set even once the channel is
out of the bridge. This patch removes these variables when leaving
the bridge.

ASTERISK-25600 #close
Reported by: Mark Michelson

Change-Id: I753ead2fffbfc65427ed4e9244c7066610e546da