Age | Commit message (Collapse) | Author |
|
* changes:
Sorcery: Create human friendly serializer names.
Stasis: Create human friendly taskprocessor/serializer names.
taskprocessor.c: New API for human friendly taskprocessor names.
taskprocessor.c: Sort CLI "core show taskprocessors" output.
|
|
into 13
|
|
* changes:
taskprocessor.c: Fix CLI "core show taskprocessors" unref.
taskprocessor.c: Add CLI "core ping taskprocessor" missing unlock.
|
|
|
|
|
|
|
|
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
|
|
ASTERISK-25681 #close
Change-Id: I64337c70f0ebd8c77f70792042684607c950c8f1
|
|
ASTERISK-25680 #close
Change-Id: I3251d781cbc3f48a6a7e1b969ac4983f552b2446
|
|
Sorcery name formats:
sorcery/<type>-<seq> -- Sorcery thread pool serializer
Change-Id: Idc2e5d3dbab15c825b97c38c028319a0d2315c47
|
|
Stasis name formats:
subm:<topic>-<seq> -- Stasis subscription mailbox task processor
subp:<topic>-<seq> -- Stasis subscription thread pool serializer
Change-Id: Id19234b306e3594530bb040bc95d977f18ac7bfd
|
|
* Add new API call to get a sequence number for use in human friendly
taskprocessor names.
* Add new API call to create a taskprocessor name in a given buffer and
append a sequence number.
Change-Id: Iac458f05b45232315ed64aa31b1df05b875537a9
|
|
Update the CLI "core show taskprocessors" output format to not be
distorted because UUID names are longer than previously used taskprocessor
names.
Change-Id: I1a5c82ce3e8f765a0627796aba87f8f7be077601
|
|
Change-Id: I1d9f4e532caa6dfabe034745dd16d06134efdce5
|
|
Change-Id: I71e7bf57c7b908c8b8c71f1816348ed7c5a5d51e
|
|
The CLI "core ping taskprocessor" command does not work very
well with taskprocessor names that have spaces in them. You
have to put quotes around the name so using tab completion
becomes awkward.
Change-Id: I29e806dd0a8a0256f4e2e0a7ab88c9e19ab0eda0
|
|
Change-Id: I78247e0faf978bf850b5ba4e9f4933ab3c59d17b
|
|
Fix compile error in main/utils.c because strdup was used in dummy_start
Change-Id: Id61a6cf4f3cbf235450441e10e7da101a6335793
|
|
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
|
|
* changes:
main/pbx: Move hangup handler routines to pbx_hangup_handler.c.
main/pbx: Move dialplan application management routines to pbx_app.c.
main/pbx: Move switch routines to pbx_switch.c.
|
|
|
|
The 11/13 branches and master use 2 different file version macros. 11/13
uses ASTERISK_FILE_VERSION but master uses ASTERISK_REGISTER_FILE. This
means a new file added to 11/13 can't just be cherry-picked to master
because the macro has to be changed.
To make cherry-picking possible, ASTERISK_REGISTER_FILE was added
to asterisk.h as a simple alias for ASTERISK_FILE_VERSION(__FILE__, NULL)
The "$Revision$" tag doesn't do anything since Asterisk moved to git so
just passing NULL as the verison works fine. asterisk.h was also
annotated to deprecate ASTERISK_FILE_VERSION and suggest using
ASTERISK_REGISTER_FILE for all new files.
Finally, 2 recent file additions, pbx_builtins.c and pbx_functions.c,
were modified to use the new macro to make sure it actually worked.
'core show file version' showed the correct output.
Change-Id: I5867ed898818d26ee49bb6e5c7d4c1a45d4789a5
|
|
|
|
Somehow stasis_cache_pattern got out of sync between 13 and master
and it was causing duplicate channel message issues in 13 when
related to a specific endpoint. I.E. from statsd,
'endpoints.PJSIP.1174.channels 0|g' was being emitted twice.
Backporting stasis_cache_pattern from master to 13 solved
the issue and running the unit and testsuite tests confirmed
that no new ones were created.
ASTERISK-25317 #close
Change-Id: Ia8707462f62d15eed14541c37f332a7bbbceb548
|
|
This is the sixth patch in a series meant to reduce the bulk of pbx.c.
This moves hangup handler management functions to their own source.
Change-Id: Ib25a75aa57fc7d5c4294479e5cc46775912fb104
|
|
This is the sixth patch in a series meant to reduce the bulk of pbx.c.
This moves dialplan application management functions to their own source.
Change-Id: I444c10fb90a3cdf9f3047605d6a8aad49c22c44c
|
|
This is the fifth patch in a series meant to reduce the bulk of pbx.c.
This moves ast_switch functions to their own source.
Change-Id: Ic2592a18a5c4d8a3c2dcf9786c9a6f650a8c628e
|
|
This is the fourth patch in a series meant to reduce the bulk of pbx.c.
This moves pbx timing functions to their own source.
Change-Id: I05c45186cb11edfc901e95f6be4e6a8abf129cd6
|
|
The menuselect conflict between app_voicemail and res_mwi_external
makes it hard to package 1 version of Asterisk. There no actual
build dependencies between the 2 so moving this check to runtime
seems like a better solution.
The ast_vm_register and ast_vm_greeter_register functions in app.c
were modified to return AST_MODULE_LOAD_DECLINE instead of -1 if there
is already a voicemail module registered. The modules' load_module
functions were then modified to return DECLINE instead of -1 to the
loader. Since -1 is interpreted by the loader as AST_MODULE_LOAD_FAILURE,
the modules were incorrectly causing Asterisk to stop so this needed
to be cleaned up anyway.
Now you can build both and use modules.conf to decide which voicemail
implementation to load.
The default menuselect options still build app_voicemail and not
res_mwi_external but if both ARE built, res_mwi_external will load
first and become the voicemail provider unless modules.conf rules
prevent it. This is noted in CHANGES.
Change-Id: I7d98d4e8a3b87b8df9e51c2608f0da6ddfb89247
|
|
This is the third patch in a series meant to reduce the bulk of pbx.c.
This moves channel and global variable routines to their own source.
Change-Id: Ibe8fb4647db11598591d443a99e3f99200a56bc6
|
|
last one" into 13
|
|
|
|
Prior to this patch, we explicitly disallowed setting any properties on a
finalized CDR. This seemed like a good idea at the time; in practice, it was
more restrictive.
There are weird and strange scenarios where setting a property on a finalized
CDR is definitely wrong. For example, we may Fork a CDR, finalizing the
previous one, then change a property. In said case, the old CDR is supposed
to now be 'immutable' (so to speak), and should not be updated. From the
perspective of the code, a forked CDR that is finalized is just finalized.
Hence why we decided these should not be updated.
In practice, it is much more common to want to set a property on a CDR in
the h extension or in a hangup handler. Disallowing a common scenario to make
an esoteric behaviour work isn't good. This patch fixes this by allowing
callers to set a property IF we are the last CDR in the chain. This preserves
the finalized CDR if it was forked, while allowing the more common case to
function.
ASTERISK-25458 #close
Change-Id: Icf3553c607b9f561152a41e6d8381d594ccdf4b9
|
|
Prior to this patch, the CDR engine attempted to set the end time on a CDR
that was executing hangup logic and with endbeforehexten set to Yes by
calling a function that inspects the properties on the Party A snapshot to
determine if we are ready to set the end time. That always failed. This is
because a Party A snapshot is not updated for CDRs that are executing hangup
logic with endbeforehexten=Yes.
Instead of calling a function that looks at the Party A snapshot, we just
simply set the end time on the CDR. This is safe to call multiple times, and is
safe to call at this point as we know that (a) we are executing hangup logic,
and (b) we are supposed to set the end time at this point.
ASTERISK-25458
Change-Id: I0c27b493861f9c13c43addbbb21257f79047a3b3
|
|
This is the second patch in a series meant to reduce the bulk of pbx.c.
This moves custom function management routines to their own source.
Change-Id: I34a6190282f781cdbbd3ce9d3adeac3c3805e177
|
|
We joked about splitting pbx.c into multiple files but this first step was
fairly easy. All of the pbx_builtin dialplan applications have been moved
into pbx_builtins.c and a new pbx_private.h file was added. load_pbx_builtins()
is called by asterisk.c just after load_pbx().
A few functions were renamed and are cross-exposed between the 2 source files.
Change-Id: I87066be3dbf7f5822942ac1449d98cc43fc7561a
|
|
|
|
The test_timezone_watch unit test is written to expect a
condition to be signaled when the inotify daemon thread runs.
There exists a small window where the test_timezone_watch
thread can signal the inotify daemon thread while it is not
reading on the underlying file descriptor. If this occurs
the test_timezone_watch thread will wait indefinitely for a
signal that will never arrive.
This change adds a timeout to the condition so it will return
regardless after a period of time.
Change-Id: Ifed981879df6de3d93acd3ee0a70f92546517390
|
|
When an endpoint is created, its messages are forwarded to both the tech
endpoint topic and the all endpoints topic. This is done so that various
parties interested in endpoint messages can subscribe to just the tech
endpoint and receive all messages associated with that particular technology,
as opposed to subscribing to the all endpoints topic. Unfortunately, when the
tech endpoint is created, it also forwards all of its messages to the all
topic. This results in duplicate messages whenever an endpoint publishes its
messages.
This patch resolves the duplicate message issue by creating a new function
for Stasis caching topics, stasis_cp_sink_create. In most respects, this acts
as a normal caching topic, save that it no longer forwards messages it receives
to the all endpoints topic. This allows it to act as an aggregation "sink",
while preserving the necessary caching behaviour.
ASTERISK-25137 #close
Reported-by: Vitezslav Novy
ASTERISK-25116 #close
Reported-by: George Joseph <george.joseph@fairview5.com>
Tested-by: George Joseph <george.joseph@fairview5.com>
Change-Id: Ie47784adfb973ab0063e59fc18f390d7dd26d17b
|
|
Use of GOTO_ON_BLINDXFR would not work at all. The target location would
never be executed by the transferring channel.
* Made feature_blind_transfer() call ast_bridge_set_after_go_on() with
valid context, exten, and priority parameters from the transferring
channel.
* Renamed some feature_blind_transfer() local variables for clarity.
ASTERISK-25641 #close
Reported by Dmitry Melekhov
Change-Id: I19bead9ffdc4aee8d58c654ca05a198da1e4b7ac
|
|
|
|
|
|
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
|
|
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
|
|
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
|
|
|
|
ASTERISK-25615
Reported by: George Joseph
Change-Id: Ieff35307254ca193f3d473cff2e396ca57c7ce0b
|
|
closes" into 13
|
|
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
|
|
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
|