Commit Graph

32407 Commits

Author SHA1 Message Date
George Joseph 2e6f1e9602 Merge "res_pjsip_pubsub: add endpoint to some warning" 2019-10-01 06:33:18 -05:00
Torrey Searle b43cdc7f1e channel/chan_pjsip: add dialplan function for music on hold
Add a new dialplan function PJSIP_MOH_PASSTHROUGH that allows
the on-hold behavior to be controlled on a per-call basis

ASTERISK-28542 #close

Change-Id: Iebe905b2ad6dbaa87ab330267147180b05a3c3a8
2019-10-01 02:06:45 -05:00
Alexei Gradinari 068ed2c626 res_pjsip_pubsub: add endpoint to some warning
There are some warning messages which are not informative without endpoint:
"No registered subscribe handler for event presence.winfo"
"No registered publish handler for event presence"

This patch adds an endpoint name to these messages.

Change-Id: Ia2811ec226d8a12659b4f9d4d224b48289650827
2019-09-27 17:13:02 -05:00
Sean Bright 377d7bdab6 res_pjsip_transport_websocket: Don't put brackets around local_name if IPv6
ASTERISK-28544 #close

Change-Id: I8e62c444d107674c298f472e3545661de8a80dce
2019-09-27 13:08:58 -05:00
George Joseph 1b6513c5dd Merge "basic-pbx: Bring forward queue configuration from 13" 2019-09-27 08:59:36 -05:00
George Joseph b0b3bd627f Merge "res_musiconhold: Add new 'playlist' mode" 2019-09-27 08:57:41 -05:00
George Joseph 57da20ddac Merge "taskprocessor.c: Added "like" support to 'core show taskprocessors'" 2019-09-27 08:56:51 -05:00
Friendly Automation 0d37d0ad39 Merge "pbx: Prevent Realtime switch crash on invalid priority" 2019-09-27 08:29:54 -05:00
Jonathan Rose ba64d68273 basic-pbx: Bring forward queue configuration from 13
Original commit: cfbf5fbe91

Change-Id: I34a841d73c429ca8d944481f8dccb756ee231c9c
2019-09-26 08:22:00 -05:00
Friendly Automation eccfa323a5 Merge "res_pjsip_registrar: Validate Contact URI before adding to responses" 2019-09-26 04:50:26 -05:00
Sean Bright 702019fc80 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:48:25 -05:00
Ben Ford 4c3655ecfd 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:49 -05:00
George Joseph f156391176 Merge "core: Fix ABI mismatch of ao2_global_obj." 2019-09-25 08:16:39 -05:00
George Joseph 2d4abb9906 Merge "taskprocessor.c: Add CLI commands to reset taskprocessor stats." 2019-09-25 07:04:47 -05:00
George Joseph 35395ee522 Merge "res_pjsip_pubsub: change warning to debug" 2019-09-25 07:03:46 -05:00
Sean Bright 966488ab52 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-25 06:24:07 -05:00
Sean Bright 982a5025b3 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:21:18 -05:00
George Joseph f2367e56c0 Merge "core: Add AO2_ALLOC_OPT_NO_REF_DEBUG option." 2019-09-25 06:04:18 -05:00
George Joseph 490a1d38af Merge "pjproject_bundled: Revert pjproject 2.9 commits causing leaks" 2019-09-24 15:38:23 -05:00
Corey Farrell f7045cefd9 stasis_state: Create internal stasis_state_proxy object.
This improves the way which stasis_state reference counting works.
Since manager->states holds onto the proxy object instead of the real
object this allows stasis_state objects to be freed when appropriate
without use of a special state_remove function.  Additionally each
distinct eid associated with the state holds a reference to the state to
prevent early release and potentially allow easier debug of leaks.

Change-Id: I400e0db4b9afa3d5cb4ac7dad60907897e73f9a9
2019-09-24 14:33:33 -05:00
Kevin Harwell 67ba62f4e6 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:24:39 -05:00
Ben Ford 4de1e6d0e6 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:23 -05:00
Kevin Harwell f67ae064b0 Merge "res_sorcery_memory_cache: stale item update leak" 2019-09-24 10:27:44 -05:00
George Joseph e034e7f51d Merge "astmm.c: Display backtrace with memory show allocations" 2019-09-24 08:27:26 -05:00
George Joseph cc83e76aa5 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:17:01 -05:00
Kevin Harwell 0cc4857159 Merge "app_voicemail: Fix module unload leak." 2019-09-23 15:28:25 -05:00
Friendly Automation ffbad8ed83 Merge "stasis: refcounter.py can incorrectly report skewed objects." 2019-09-23 14:07:27 -05:00
Corey Farrell 725e991faf
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 13:34:14 -04:00
Kevin Harwell a4caaef64c 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:06:05 -05:00
George Joseph e82f2f6e82 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 07:25:33 -05:00
Corey Farrell a4142c8437
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-23 07:35:48 -04:00
Corey Farrell ca608d2575 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 08:31:38 -05:00
Corey Farrell 3dfbc05c53 stasis: Fix leaks
* Release reference returned by cache_remove
* state_alloc unconditionally bumped state_topic even when it was
  locally allocated.

Change-Id: I51101bf7d07b8dc8ce8fc46b6cb31fbbd213fbc7
2019-09-19 17:36:40 -05:00
Corey Farrell 863fe2225f app_voicemail: Fix module unload leak.
Change-Id: Ib9a06565b9a178822d3bbb67eccf51432e12d84a
2019-09-19 11:16:14 -05:00
Joshua Colp e79a3b428a Merge "func_jitterbuffer: Add audio/video sync support." 2019-09-19 08:23:15 -05:00
Friendly Automation 2205e25073 Merge "core: Add H.265/HEVC passthrough support" 2019-09-18 16:50:23 -05:00
Joshua Colp 7298a785ad 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 20:22:50 +00:00
Friendly Automation 0630dc3e49 Merge "chan_pjsip: Relock correct channel during "fax" redirect." 2019-09-18 07:44:27 -05:00
George Joseph 1030de1d08 Merge "chan_dahdi: Fix build with clang/llvm" 2019-09-17 09:30:36 -05:00
Florian Floimair c18983207d 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-17 13:42:26 +02:00
Guido Falsi 4072e219f7 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-17 05:38:59 -05:00
Joshua Colp c358da472e 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:39 -05:00
Boris P. Korzun 8979921da9 func_odbc: acf_odbc_read() and cli_odbc_read() unicode support
Added ast_odbc_ast_str_SQLGetData() considers SQL_DESC_OCTET_LENGTH
column attribute for correct allocating the buffer.

ASTERISK-28497 #close

Change-Id: I50e86c8a277996f13d4a4b9b318ece0d60b279bf
2019-09-14 21:53:25 +10:00
Ben Ford 723b695ce5 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:31 -05:00
Sean Bright 32ce6e9a06 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 16:00:07 -05:00
Friendly Automation 02dfc89007 Merge "res_rtp: Add unit tests for RTCP stats." 2019-09-12 15:22:38 -05:00
Joshua Colp 7716f3d45d Merge "ChanIsAvail() generates a CDR when unanswered=yes in cdr.conf." 2019-09-11 09:27:09 -05:00
Friendly Automation a3eca235fd Merge "res_musiconhold: Added unregister realtime moh class" 2019-09-11 09:00:47 -05:00
Friendly Automation bf63dcab6c Merge "chan_dahdi: set CHANNEL(hangupsource) when a PRI channel hangs up" 2019-09-11 07:13:30 -05:00
Joshua Colp a009dd1c1c Merge "chan_sip: Update links referenced in deprecation notice" 2019-09-11 07:12:48 -05:00