Commit Graph

32204 Commits

Author SHA1 Message Date
Sean Bright
1f10ca76da res_pjsip_transport_websocket: Don't put brackets around local_name if IPv6
ASTERISK-28544 #close

Change-Id: I8e62c444d107674c298f472e3545661de8a80dce
2019-09-27 13:07:35 -05:00
George Joseph
ac331bff34 Merge "pbx: Prevent Realtime switch crash on invalid priority" into 16 2019-09-27 08:58:51 -05:00
George Joseph
072c63f575 Merge "taskprocessor.c: Added "like" support to 'core show taskprocessors'" into 16 2019-09-27 08:55:40 -05:00
Friendly Automation
b62f156261 Merge "basic-pbx: Bring forward queue configuration from 13" into 16 2019-09-27 08:37:24 -05:00
Friendly Automation
1903dcb43d Merge "res_musiconhold: Add new 'playlist' mode" into 16 2019-09-27 07:44:52 -05:00
root
d146ec7e83 Revert "Update CHANGES and UPGRADE.txt for 16.6.0-rc2"
This reverts commit a0844a9b9b.

Correcting/reverting accidental
upgrade on release process.

Change-Id: I08746eda578effa6e64054690fad48a17d2f42e7
2019-09-26 10:52:52 -05:00
Jonathan Rose
85c7326d08 basic-pbx: Bring forward queue configuration from 13
Original commit: cfbf5fbe91

Change-Id: I34a841d73c429ca8d944481f8dccb756ee231c9c
2019-09-26 09:20:36 -04:00
Joshua Colp
ddb2c90713 Merge "res_pjsip_registrar: Validate Contact URI before adding to responses" into 16 2019-09-26 04:49:39 -05:00
Sean Bright
0514559005 pbx: Prevent Realtime switch crash on invalid priority
pbx_extension_helper takes two 'context' arguments. One (con) is a
pointer directly to a 'struct ast_context' and the other (context) is
the name of the context. In all cases, one of these arguments is NULL
and the other is non-NULL.

Functions that are ultimately called by pbx_extension_helper expect that
'context' will be non-NULL, so we set it unconditionally on entry into
this function.

ASTERISK-28534 #close

Change-Id: Ifbbc5e71440afd80efd441f7a9d72e8b10b6f47d
2019-09-26 04:47:49 -05:00
Ben Ford
827dd754b2 taskprocessor.c: Added "like" support to 'core show taskprocessors'
Added "like" support for 'core show taskprocessors'. Now you
can specify a specific set of taskprocessors (or just one) by
adding the keyword "like" to the above command, followed by
your search criteria.

Change-Id: I021e740201e9ba487204b5451e46feb0e3222464
2019-09-25 14:01:34 -05:00
Asterisk Development Team
a0844a9b9b Update CHANGES and UPGRADE.txt for 16.6.0-rc2 2019-09-25 12:53:26 -05:00
George Joseph
28542da3dc Merge "res_pjsip_pubsub: change warning to debug" into 16 2019-09-25 11:34:59 -05:00
Friendly Automation
0b34551af0 Merge "core: Fix ABI mismatch of ao2_global_obj." into 16 2019-09-25 07:41:35 -05:00
George Joseph
cce4dd2e71 Merge "taskprocessor.c: Add CLI commands to reset taskprocessor stats." into 16 2019-09-25 06:24:45 -05:00
Sean Bright
41cd1ff454 res_pjsip_registrar: Validate Contact URI before adding to responses
If a permanent contact URI associated with an AOR is invalid, we add a
Contact header to REGISTER responses with a NULL URI, causing a crash.

ASTERISK-28463 #close

Change-Id: Id2b643e58b975bc560aab1c111e6669d54db9102
2019-09-25 06:20:55 -05:00
George Joseph
d799217867 Merge "core: Add AO2_ALLOC_OPT_NO_REF_DEBUG option." into 16 2019-09-25 06:03:45 -05:00
George Joseph
e929b21368 Merge "pjproject_bundled: Revert pjproject 2.9 commits causing leaks" into 16 2019-09-24 15:38:04 -05:00
Kevin Harwell
9ff11c2f00 res_pjsip_pubsub: change warning to debug
The following message:

"Subscription request from endpoint <blah> rejected. Expiration of 0 is invalid"

Would sometimes spam the log with warnings if Asterisk restarted and a bunch
of clients sent unsubscribes. This patch changes it from a warning to a debug
message.

Change-Id: I841ec42f65559f3135e037df0e55f89b6447a467
2019-09-24 11:21:12 -05:00
Corey Farrell
cd51f5b876 core: Fix ABI mismatch of ao2_global_obj.
astobj2.c declares DEBUG_THREADS_LOOSE_ABI to avoid overhead of debug
threads tracking information in the internal structures of astobj2.
Unfortunately this means that ao2_global_obj contains the statically
allocated debug threads tracking fields which are used by initialization
and cleanup but main/astobj2.c believed those fields and associated
space did not exist.

Change-Id: Icef41ad97d88a8c1d1515e034ec8133cab3b1527
2019-09-24 11:20:21 -05:00
Ben Ford
5ea667e03a taskprocessor.c: Add CLI commands to reset taskprocessor stats.
Added two new CLI commands to reset stats for taskprocessors. You can
reset stats for a single, specific taskprocessor ('core reset
taskprocessor <taskprocessor>'), or you can reset all taskprocessors
('core reset taskprocessors'). These commands will reset the counter for
the number of tasks processed as well as the max queue size.

Change-Id: Iaf17fc4ae29396ab0c6ac92408fc7bdc2f12362d
2019-09-24 10:42:08 -05:00
Friendly Automation
2bb6334098 Merge "res_sorcery_memory_cache: stale item update leak" into 16 2019-09-24 08:44:49 -05:00
George Joseph
b41e1e8928 Merge "astmm.c: Display backtrace with memory show allocations" into 16 2019-09-24 08:28:19 -05:00
George Joseph
789c51ac8a pjproject_bundled: Revert pjproject 2.9 commits causing leaks
We've found a connection re-use regression in pjproject 2.9
introduced by commit
"Close #1019: Support for multiple listeners."
https://trac.pjsip.org/repos/changeset/6002
https://trac.pjsip.org/repos/ticket/1019

Normally, multiple SSL requests should reuse the same connection
if one already exists to the remote server.  When a transport
error occurs, the next request should establish a new connection
and any following requests should use that same one.  With this
patch, when a transport error occurs, every new request creates
a new connection so you can wind up with thousands of open tcp
sockets, possibly exhausting file handles, and increasing memory
usage.

Reverting pjproject commit 6002 (and related 6021) restores the
expected behavior.

We also found a memory leak in SSL processing that was introduced by
commit
"Fixed #2204: Add OpenSSL remote certificate chain info"
https://trac.pjsip.org/repos/changeset/6014
https://trac.pjsip.org/repos/ticket/2204

Apparently the remote certificate chain is continually recreated
causing the leak.

Reverting pjproject commit 6014 (and related 6022) restores the
expected behavior.

Both of these issues have been acknowledged by Teluu.

ASTERISK-28521

Change-Id: I8ae7233c3ac4ec29a3b991f738e655dabcaba9f1
2019-09-24 08:16:01 -05:00
Kevin Harwell
bd440fcaa5 Merge "app_voicemail: Fix module unload leak." into 16 2019-09-23 15:28:13 -05:00
Kevin Harwell
258f9e6ecc Merge "res_pjsip_mwi: Remove inappropriate topic unreference." into 16 2019-09-23 15:19:07 -05:00
Corey Farrell
fec6e1bd87 core: Add AO2_ALLOC_OPT_NO_REF_DEBUG option.
Previous to this patch passing a NULL tag to ao2_alloc or ao2_ref based
functions would result in the reference not being logged under
REF_DEBUG.  This could sometimes cause inaccurate logging if NULL was
accidentally passed to a reference action.  Now reference logging is
only disabled by option passed to the allocation method.

Change-Id: I3c17d867d901d53f9fcd512bef4d52e342637b54
2019-09-23 12:34:41 -05:00
Kevin Harwell
bd96a0b79d res_sorcery_memory_cache: stale item update leak
When a stale item was being updated the object was being retrieved, but its
reference was not being decremented after the update. This patch makes it so
the object is now appropriately de-referenced.

ASTERISK-28523

Change-Id: I9d8173d3a0416a242f4eba92fa0853279c500ec7
2019-09-23 11:01:36 -05:00
George Joseph
9c5a8066a6 astmm.c: Display backtrace with memory show allocations
You can currently capture backtraces of memory allocations but they
only get displayed when you stop asterisk and the atexit hooks
are enabled.  Now, if memory backtrace is on and you issue a
"memory show allocations" CLI command for a specific file, then
a backtrace will show for each allocation that occurred after
you turned "memory backtrace on".  The backtrace display is shown
only when a specific file's allocations are displayed to prevent
a massive CLI dump of every file's allocations.

Change-Id: Ic657afc1fc6ec7205e16eb36a97a611d235a2b4f
2019-09-23 06:23:05 -06:00
Corey Farrell
5b8c1ed0d3 stasis: refcounter.py can incorrectly report skewed objects.
It is possible for topic->name to be NULL, this causes the allocation
reference to not be logged.  Use the name variable instead which has
been verified to be a non-empty.

Change-Id: I3d0031d03c8356e4808f00cdf2d5428712575883
2019-09-20 09:34:22 -04:00
Corey Farrell
76d4a42ae1 res_pjsip_mwi: Remove inappropriate topic unreference.
ast_mwi_topic() returns a borrowed reference which should not be
unreferenced, doing so leads to a FRACK.  This was hidden by the fact
that stasis_cache.c leaked the result of cache_remove in
caching_topic_exec.

Change-Id: I51101bf7d07b8dc8ce8fc46b6cb31fbbd213fbc7
2019-09-19 15:30:58 -05:00
Corey Farrell
256db889f2 app_voicemail: Fix module unload leak.
Change-Id: Ib9a06565b9a178822d3bbb67eccf51432e12d84a
2019-09-19 11:15:32 -05:00
Friendly Automation
a687c7919d Merge "func_jitterbuffer: Add audio/video sync support." into 16 2019-09-19 08:10:52 -05:00
Joshua Colp
120f2fb5f9 Merge "core: Add H.265/HEVC passthrough support" into 16 2019-09-19 06:34:07 -05:00
Joshua Colp
6647be69ac func_jitterbuffer: Add audio/video sync support.
This change adds support to the JITTERBUFFER dialplan function
for audio and video synchronization. When enabled the RTCP SR
report is used to produce an NTP timestamp for both the audio and
video streams. Using this information the video frames are queued
until their NTP timestamp is equal to or behind the NTP timestamp
of the audio. The audio jitterbuffer acts as the leader deciding
when to shrink/grow the jitterbuffer when adaptive is in use. For
both adaptive and fixed the video buffer follows the size of the
audio jitterbuffer.

ASTERISK-28533

Change-Id: I3fd75160426465e6d46bb2e198c07b9d314a4492
2019-09-18 15:26:00 -05:00
Sean Bright
9f304170f6 res_musiconhold: Add new 'playlist' mode
Allow the list of files to be played to be provided explicitly in the
music class's configuration. The primary driver for this change is to
allow URLs to be used for MoH.

Change-Id: I9f43b80b43880980b18b2bee26ec09429d0b92fa
2019-09-18 14:07:37 -05:00
Friendly Automation
f9f17f3bfe Merge "chan_pjsip: Relock correct channel during "fax" redirect." into 16 2019-09-18 07:39:25 -05:00
George Joseph
51e315765b Merge "res_rtp_asterisk.c: Send RTCP as compound packets." into 16 2019-09-17 09:26:40 -05:00
Joshua Colp
49e1346185 chan_pjsip: Relock correct channel during "fax" redirect.
When fax detection occurs on an outbound PJSIP channel the
redirect operation will result in a masquerade occurring and
the underlying channel on the session changing. The code
incorrectly relocked the new channel instead of the old
channel when returning. This resulted in the new channel
being locked indefinitely. The code now always acts on the
expected channel.

ASTERISK-28538

Change-Id: I2b2e60d07e74383ae7e90d752c036c4b02d6b3a3
2019-09-16 08:42:16 -05:00
Guido Falsi
448b8c9bc2 chan_dahdi: Fix build with clang/llvm
On FreeBSD using the clang/llvm compiler build fails to build due
to the switch statement argument being a non integer type expression.
Switch to an if/else if/else construct to sidestep the issue.

ASTERISK-28536 #close

Change-Id: Idf4a82cc1e94580a2d017fe9e351c226f23e20c8
2019-09-14 10:10:30 -05:00
Ben Ford
a95cef7140 res_rtp_asterisk.c: Send RTCP as compound packets.
According to RFC3550, ALL RTCP packets must be sent in a compond packet
of at least two individual packets, including SR/RR and SDES. REMB,
FIR, and NACK were not following this format, and as a result, would
fail the packet check in ast_rtcp_interpret. This was found from writing
unit tests for RTCP. The browser would accept the way we were
constructing these RTCP packets, but when sending directly from one
Asterisk instance to another, the above mentioned problem would occur.

Change-Id: Ieb140e9c22568a251a564cd953dd22cd33244605
2019-09-13 09:48:17 -05:00
George Joseph
913c8b48b7 Merge "channels: Allow updating variable value" into 16 2019-09-13 09:43:58 -05:00
George Joseph
c2dbba39a6 Merge "res_rtp: Add unit tests for RTCP stats." into 16 2019-09-13 07:05:08 -05:00
Asterisk Development Team
688908fe7a Update CHANGES and UPGRADE.txt for 16.6.0 2019-09-12 16:04:11 -05:00
Sean Bright
518b6bfb5c channels: Allow updating variable value
When modifying an already defined variable in some channel drivers they
add a new variable with the same name to the list, but that value is
never used, only the first one found.

Introduce ast_variable_list_replace() and use it where appropriate.

ASTERISK-23756 #close
Patches:
  setvar-multiplie.patch submitted by Michael Goryainov

Change-Id: Ie1897a96c82b8945e752733612ee963686f32839
2019-09-12 15:58:49 -05:00
Florian Floimair
f85631cf82 core: Add H.265/HEVC passthrough support
This change adds H.265/HEVC as a known codec and creates a cached
"h265" media format for use.

Note that RFC 7798 section 7.2 also describes additional SDP
parameters. Handling of these is not yet supported.

ASTERISK-28512

Change-Id: I26d262cc4110b4f7e99348a3ddc53bad0d2cd1f2
2019-09-12 11:16:09 +02:00
Joshua Colp
cb90d1cd7c Merge "ChanIsAvail() generates a CDR when unanswered=yes in cdr.conf." into 16 2019-09-11 09:26:59 -05:00
George Joseph
c49696462a Merge "res_musiconhold: Added unregister realtime moh class" into 16 2019-09-11 09:02:44 -05:00
Friendly Automation
ce5029a4db Merge "chan_dahdi: set CHANNEL(hangupsource) when a PRI channel hangs up" into 16 2019-09-11 07:07:32 -05:00
sungtae kim
b478f46d59 res_musiconhold: Added unregister realtime moh class
This fix allows a realtime moh class to be unregistered from the command
line. This is useful when the contents of a directory referenced by a
realtime moh class have changed.
The realtime moh class is then reloaded on the next request and uses the
new directory contents.

ASTERISK-17808

Change-Id: Ibc4c6834592257c4bb90601ee299682d15befbce
2019-09-11 02:31:08 -05:00
Friendly Automation
a30e2ea305 Merge "codec_resample: Ensure OUTSIDE_SPEEX is defined when necessary" into 16 2019-09-10 18:55:08 -05:00