The XML docs are currently only loaded on
startup with no way to update them during runtime.
This makes it impossible to load modules that
use ACO/Sorcery (which require documentation)
if they are added to the source tree and built while
Asterisk is running (e.g. external modules).
This adds a CLI command to reload the XML docs
during runtime so that documentation can be updated
without a full restart of Asterisk.
ASTERISK-30289 #close
Change-Id: I4f265b0e5517e757c5453a0f241201a5788d3a07
Add live_dangerously flag to manager and use this flag to
determine if a configuation file outside of AST_CONFIG_DIR
should be read.
ASTERISK-30176
Change-Id: I46b26af4047433b49ae5c8a85cb8cda806a07404
This PR contains two relatively separate changes in channel.c and
res_pjsip_session.c which ensure that topology changes are not ignored
in cases where they should be handled.
For channel.c:
The function ast_channel_request_stream_topology_change only triggers a
stream topology request change indication, if the channel's topology
does not equal the requested topology. However, a channel could be in a
state where it is currently "negotiating" a new topology but hasn't
updated it yet, so the topology request change would be lost. Channels
need to be able to handle such situations internally and stream
topology requests should therefore always be passed on.
In the case of chan_pjsip for example, it queues a session refresh
(re-INVITE) if it is currently in the middle of a transaction or has
pending requests (among other reasons).
Now, ast_channel_request_stream_topology_change always indicates a
stream topology request change even if the requested topology equals the
channel's topology.
For res_pjsip_session.c:
The function resolve_refresh_media_states does not process stream state
changes if the delayed active state differs from the current active
state. I.e. if the currently active stream state has changed between the
time the sip session refresh request was queued and the time it is being
processed, the session refresh is ignored. However, res_pjsip_session
contains logic that ensures that session refreshes are queued and
re-queued correctly if a session refresh is currently not possible. So
this check is not necessary and led to some session refreshes being
lost.
Now, a session refresh is done even if the delayed active state differs
from the current active state and it is checked whether the delayed
pending state differs from the current active - because that means a
refresh is necessary.
Further, the unit test of resolve_refresh_media_states was adapted to
reflect the new behavior. I.e. the changes to delayed pending are
prioritized over the changes to current active because we want to
preserve the original intention of the pending state.
ASTERISK-30184
Change-Id: Icd0703295271089057717006730b555b9a1d4e5a
The Answer application currently waits for up to 500ms
for media, even if users specify a different timeout.
This adds an option to not wait for media on the channel
by doing a raw answer instead. The default 500ms threshold
is also documented.
ASTERISK-30308 #close
Change-Id: Id59cd340c44b8b8b2384c479e17e5123e917cba4
The ModuleCheck XML documentation falsely
claims that the module's version number is returned.
This has not been the case since 14, since the version
number is not available anymore, but the documentation
was not changed at the time. It is now updated to
reflect this.
ASTERISK-30285 #close
Change-Id: Idde2d1205a11f2623fa1ddab192faa3dc4081e91
write_openssl_error_to_log has been erroneously
using ast_free instead of free, which will
cause a crash when MALLOC_DEBUG is enabled since
the memory was not allocated by Asterisk's memory
manager. This changes it to use the actual free
function directly to avoid this.
ASTERISK-30278 #close
Change-Id: Iac8b6468b718075809c45d8ad16b101af21a474d
race condition: ast_dial_join() may not cancel outgoing call, if
function is called just after called party answer and before
application execution (bit is_running_app not yet set).
This fix adds ast_softhangup() calls in addition to existing
pthread_kill() when is_running_app is not set.
ASTERISK-30258
Change-Id: Idbdd5c15122159661aa8e996a42d5800083131e4
Some logic in say.c for determining if we need
to also add an ampersand for file seperation was faulty,
as non-successful files would increment the count, causing
a leading ampersand to be added improperly.
This is fixed, and a unit test that captures this regression
is also added.
ASTERISK-30248 #close
Change-Id: I02c1d3a11d82fe4ea8b462070cbd1effb5834d2b
Add enum to allow setting optional direction. If set to only one
direction, only feed matching-direction frames to the associated
slin factory.
This prevents mangling the transcoder on non-mixed frames when the
READ and WRITE frames would have otherwise required it. Also
removes the need to mute or discard the un-wanted frames as they
are no longer added in the first place.
res_stasis_snoop is changed to use this addition to set direction
on audiohook based on spy direction.
If no direction is set, the ast_audiohook_init will init this enum
to BOTH which maintains existing functionality.
ASTERISK-30252
Change-Id: If8716bad334562a5d812be4eeb2a92e4f3be28eb
Allows bridging, parking, and dial messages to be globally
ignored for all CDRs such that only a single CDR record
is generated per channel.
This is useful when CDRs should endure for the lifetime of
an entire channel and bridging and dial updates in the
dialplan should not result in multiple CDR records being
created for the call. With the ignore bridging option,
bridging changes have no impact on the channel's CDRs.
With the ignore dial state option, multiple Dials and their
outcomes have no impact on the channel's CDRs. The
last disposition on the channel is preserved in the CDR,
so the actual disposition of the call remains available.
These two options can reduce the amount of "CDR hacks" that
have hitherto been necessary to ensure that CDR was not
"spoiled" by these messages if that was undesired, such as
putting a dummy optimization-disabled local channel between
the caller and the actual call and putting the CDR on the channel
in the middle to ensure that CDR would persist for the entire
call and properly record start, answer, and end times.
Enabling these options is desirable when calls correspond
to the entire lifetime of channels and the CDR should
reflect that.
Current default behavior remains unchanged.
ASTERISK-30091 #close
Change-Id: I393981af42732ec5ac3ff9266444abb453b7c832
The DBGetTree AMI action's ListItem previously
always reported 1, regardless of the count. This
is corrected to report the actual count.
ASTERISK-30245 #close
patches:
gettreecount.diff submitted by Birger Harzenetter (license 5870)
Change-Id: I46d8992710f1b8524426b1255f57d1ef4a4934d4
Adds the n "no answer" option to the Bridge application
so that answer supervision can not automatically
be provided when Bridge is executed.
Additionally, a mechanism (dialplan variable)
is added to prevent bridge targets (typically the
target of a masquerade) from answering the channel
when they enter the bridge.
ASTERISK-30223 #close
Change-Id: I76f73fcd8e403bcd18f2abb40c658f537ac1ba6d
If we find that n_max (currently hard wired to 1) sessions were purged,
schedule the next purge for 1ms into the future rather than 5000ms (as
per current). This way we will purge up to 1000 sessions per second
rather than 1 every 5 seconds.
This mitigates a build-up of sessions should http sessions gets
established faster than 1 per 5 seconds.
Change-Id: I9820d39aa080109df44fe98c1325cafae48d54f5
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Fixed a segfault caused by var_list_from_loc_info() encountering
an empty location info element.
Fixed an issue in ast_strsep() where a value with only whitespace
wasn't being preserved.
Fixed an issue in ast_variable_list_from_quoted_string() where
an empty value was considered a failure.
ASTERISK-30215
Reported by: Dan Cropp
Change-Id: Ieca64e061a6d9298f0196c694b60d986ef82613a
Adds an AMI event to indicate that a deadlock
has likely started, when Asterisk is compiled
with DETECT_DEADLOCKS enabled. This can make
it easier to perform automated deadlock detection
and take appropriate action (such as doing a core
dump). Unlike the deadlock warnings, the AMI event
is emitted only once per deadlock.
ASTERISK-30161 #close
Change-Id: Ifc6ed3e390f8b4cff7f8077a50e4d7a5b54e42fb
If "core show channels" is run before startup has completed, it
is possible for bad ao2 refs to occur because the system is not
yet fully initialized. This will lead to an assertion failing.
To prevent this, initialization of CLI builtins is moved to be
later along in the main load sequence. Core CLI commands are
loaded at the same time, but channel-related commands are loaded
later on.
ASTERISK-29846 #close
Change-Id: If6b3cde802876bd738c1b4cf2683bea6ddc615b6
Adds additional control options over the transfer
feature functionality to give users more control
in how the transfer feature sounds and works.
First, the "transfer" sound that plays when a transfer is
initiated can now be customized by the user in
features.conf, just as with the other transfer sounds.
Secondly, the user can now specify the transfer extension
in advance by using the TRANSFER_EXTEN variable. If
a valid extension is contained in this variable, the call
will automatically be transferred to this destination.
Otherwise, it will fall back to collecting the extension
from the user as is always done now.
ASTERISK-29899 #close
Change-Id: Ibff309caa459a2b958706f2ed0ca393b1ef502e3
Fixes a few coding guideline violations:
* Use of C99 comments
* Opening brace on same line as function prototype
ASTERISK-30163 #close
Change-Id: I07771c4c89facd41ce8d323859f022ddbddf6ca7
* Added processing for the 'confidence' element.
* Added documentation to some APIs.
* removed a lot of complex code related to the very-off-nominal
case of needing to process multiple location info sources.
* Create a new 'ast_geoloc_eprofile_to_pidf' API that just takes
one eprofile instead of a datastore of multiples.
* Plugged a huge leak in XML processing that arose from
insufficient documentation by the libxml/libxslt authors.
* Refactored stylesheets to be more efficient.
* Renamed 'profile_action' to 'profile_precedence' to better
reflect it's purpose.
* Added the config option for 'allow_routing_use' which
sets the value of the 'Geolocation-Routing' header.
* Removed the GeolocProfileCreate and GeolocProfileDelete
dialplan apps.
* Changed the GEOLOC_PROFILE dialplan function as follows:
* Removed the 'profile' argument.
* Automatically create a profile if it doesn't exist.
* Delete a profile if 'inheritable' is set to no.
* Fixed various bugs and leaks
* Updated Asterisk WiKi documentation.
ASTERISK-30167
Change-Id: If38c23f26228e96165be161c2f5e849cb8e16fa0
The manager XML documentation documents a "FilterList"
action, but there is no such action. Therefore, this can
lead to confusion when people try to use a documented
action that does not, in fact, exist. This is removed
as the action never did exist in the past, nor would it
be trivial to add since we only store the regex_t
objects, so the filter list can't actually be provided
without storing that separately. Most likely, the
documentation was originally added (around version 10)
in anticipation of something that never happened.
ASTERISK-29917 #close
Change-Id: I846b16fd6f80a91d4ddc5d8a861b522d7c6f8f97
Adjusts some logging levels to be more or less important,
that is more prominent when actual problems occur and less
prominent for less noteworthy things.
ASTERISK-30153 #close
Change-Id: Ifc8f7df427aa018627db462125ae744986d3261b
When ast_func_read2 is used to read a function using
its read function (as opposed to a native ast_str read2
function), the result is copied directly by the function
into the ast_str buffer. As a result, the ast_str length
remains initialized to 0, which is a bug because this is
not the real string length.
This can cascade and have issues elsewhere, such as when
reading substrings of functions that only register read
as opposed to read2 callbacks. In this case, since reading
ast_str_strlen returns 0, the returned substring is empty
as opposed to the actual substring. This has caused
the ast_str family of functions to behave inconsistently
and erroneously, in contrast to the pbx_variables substitution
functions which work correctly.
This fixes this issue by manually updating the ast_str length
when the result is copied directly into the ast_str buffer.
Additionally, an assertion and a unit test that previously
exposed these issues are added, now that the issue is fixed.
ASTERISK-29966 #close
Change-Id: I4e2dba41410f9d4dff61c995d2ca27718248e07f
The global event filtering code was only in one
possible execution path, so not all events were
being properly filtered out if requested. This moves
that into the universal AMI handling code so all
events are properly handled.
Additionally, the CLI listing of disabled events can
also get truncated, so we now print out everything.
ASTERISK-30137 #close
Change-Id: If8c42edcb2abc5158552da7eba2a8ff6b20e1959
Adds the DBGetTree action, which can be used to
retrieve all of the DB keys beginning with a
particular prefix, similar to the capability
provided by the database show CLI command.
ASTERISK-30136 #close
Change-Id: I3be9425e53be71f24303fdd4d2923c14e84337e6
There are several things wrong with analog Caller ID
handling that are fixed by this commit:
callerid.c's Caller ID generation function contains the
logic to use the presentation to properly send the proper
Caller ID. However, currently, DAHDI does not pass any
presentation information to the Caller ID module, which
means that presentation is completely ignored on all calls.
This means that lines could be getting Caller ID information
they aren't supposed to.
Part of the reason this has been obscured is because the
simple switch logic for handling the built in *67 and *82
is completely wrong. Rather than modifying the presentation
for the call accordingly (which is what it's supposed to do),
it simply blanks out the Caller ID or fills it in. This is
wrong, so wrong that it makes a mockery of the specification.
Additionally, it would leave to the "UNAVAILABLE" disposition
being used for Caller ID generation as opposed to the "PRIVATE"
disposition that it should have been using. This is now fixed
to only update the presentation and not modify the number and
name, so that the simple switch *67/*82 work correctly.
Next, sig_analog currently only copies over the name and number,
nothing else, when it is filling in a duplicated caller id
structure. Thus, we also now copy over the presentation
information so that is available for the Caller ID spill.
Additionally, this meant that "valid" was implicitly 0,
and as such presentation would always fail to "Unavailable".
The validity is therefore also copied over so it can be used
by ast_party_id_presentation.
As part of this fix, new API is added so that all the relevant
Caller ID information can be passed in to the Caller ID generation
functions. Parameters that are also completely missing from the
Caller ID spill have also been added, to enhance the compatibility,
correctness, and completeness of the Asterisk Caller ID implementation.
ASTERISK-29991 #close
Change-Id: Icc44a5e09979916f4c18a440f96e10dc1c76ae15
Allocate all of the ast_context's character data in the structure's
flexible array member and eliminate the clunky fake_context. This will
simplify future changes to ast_context.
Change-Id: I98357de75d8ac2b3c4c9f201223632e6901021ea
The current documentation is out of date and does not reflect actual
behaviour. This change makes documentation clearer and accurately
reflect the purpose of relevant channel variables.
ASTERISK-30123
Change-Id: I160d0b01fce862477ad55ac1aa708a730473eb6f
* Added ast_variable_list_from_quoted_string()
Parse a quoted string into an ast_variable list.
* Added ast_str_substitute_variables_full2()
Perform variable/function/expression substitution on an ast_str.
* Added ast_strsep_quoted()
Like ast_strsep except you can specify a specific quote character.
Also added unit test.
* Added ast_xml_find_child_element()
Find a direct child element by name.
* Added ast_xml_doc_dump_memory()
Dump the specified document to a buffer
* ast_datastore_free() now checks for a NULL datastore
before attempting to destroy it.
Change-Id: I5dcefed2f5f93a109e8b489e18d80d42e45244ec
Currently, if using the CLI to delete a DB entry,
"Database entry removed" is always returned,
regardless of whether or not the entry actually
existed in the first place. This meant that users
were never told if entries did not exist.
The same issue occurs if trying to delete a DB key
using AMI.
To address this, new API is added that is more stringent
in deleting values from AstDB, which will not return
success if the value did not exist in the first place,
and will print out specific error details if available.
ASTERISK-30001 #close
Change-Id: Ic84e3eddcd66c7a6ed7fea91cdfd402568378b18
A corner case exists in CLI parsing where if
a CLI user in a remote console ends with
a backslash and then invokes command completion
(using TAB or ?), then the console will freeze
forever until a SIGQUIT signal is sent to the
process, due to getting blocked forever
reading the command completion. CTRL+C
and other key combinations have no impact on
the CLI session.
This occurs because, in such cases, the CLI
process is waiting for AST_CLI_COMPLETE_EOF
to appear in the buffer from the main process,
but instead the main process is confused by
the funny syntax and thus prints out the CLI help.
As a result, the CLI process is stuck on the
read call, waiting for the completion that
will never come.
This prevents blocking forever by checking
if the data from the main process starts with
"Usage:". If it does, that means that CLI help
was sent instead of the tab complete vector,
and thus the CLI should bail out and not wait
any longer.
ASTERISK-29822 #close
Change-Id: I9810ac59304fec162da701653c9c834f0ec8f670
If the caller has hung up, break out of the play loop so we don't try
to play remaining files and fail to do so.
ASTERISK-30075 #close
Change-Id: I55e85be28ee90b48c0fe4ce20ac136a7dbb49f14
Finding an application and executing it if found is
a common task throughout Asterisk. This adds a helper
function around pbx_exec to do this, to eliminate
redundant code and make it easier for modules to
substitute variables and execute applications by name.
ASTERISK-30061 #close
Change-Id: Ifee4d2825df7545fb515d763d393065675140c84
A previous review fixing ASTERISK_22246 and ASTERISK_26582
got a couple of the options mixed up as to whether or not
they are compatible with the remote console. This fixes
those to the best of my knowledge.
ASTERISK-30097 #close
Change-Id: Id54166991aa79f04fb02699cc499bedda854253b
In function ast_say_date_with_format_de(), take special
care when the hour is one o'clock. In this case, the
German number "eins" must be inflected to its neutrum form,
"ein". This is achieved by playing "digits/1N" instead of
"digits/1". Fixes both 12- and 24-hour formats.
ASTERISK-30092
Change-Id: Ica9b80125c0b317e378d89c1ea786816e2635510
If tab completion using ast_module_helper is attempted
during startup, deadlock will ensue because the CLI
will attempt to lock the module list while it is already
locked by the loader. This causes deadlock because when
the loader tries to acquire the CLI lock, they are blocked
on each other.
Waiting for startup to complete is not feasible because
the CLI lock is acquired while waiting, so deadlock will
ensure regardless of whether or not a lock on the module
list is attempted.
To prevent deadlock, we immediately abort if tab completion
is attempted on the module list before Asterisk is fully
booted.
ASTERISK-30039 #close
Change-Id: Idd468906c512bb196631e366a8f597a0e2e9271d
This change exposes the channel driver's unique id (i.e. the Call-ID
for chan_sip/chan_pjsip based channels) to ARI channel resources
as `protocol_id`.
ASTERISK-30027
Reported by: Moritz Fain
Tested by: Moritz Fain
Change-Id: I7cc6e7a9d29efe74bc27811d788dac20fe559b87
Most issues were in stringfields and had to do with comparing
a pointer to an constant/interned string with NULL. Since the
string was a constant, a pointer to it could never be NULL so
the comparison was always "true". gcc now complains about that.
There were also a few issues where determining if there was
enough space for a memcpy or s(n)printf which were fixed
by defining some of the involved variables as "volatile".
There were also a few other miscellaneous fixes.
ASTERISK-30044
Change-Id: Ia081ca1bcfb329df6487c4660aaf1944309eb570
GCC 12 caught an issue in state_id_by_topic where we were
checking a pointer for NULL instead of the contents of
the pointer for '\0'.
ASTERISK-30044
Change-Id: Ia0b04d4fff45c92acb7f07132a33622fa341148e
When a new unreal (local) channel is created, a second (;2) channel is
created as a counterpart which clones the topology of the first
channel. This creates issues when an outgoing stream is sendonly or
recvonly as the stream state of the inbound channel will be the same
as the stream state of the outbound channel.
Now the stream state is flipped for the streams of the 2nd channel in
ast_unreal_new_channels if the outgoing stream topology is recvonly or
sendonly.
ASTERISK-29655
Reported by: Michael Auracher
ASTERISK-29638
Reported by: Michael Auracher
Change-Id: I0cea29635bb20b7bf7fd0fb95498cd44dab98fbf
Some command line options to Asterisk only apply when Asterisk
is started and cannot be used with remote console mode. If a
user tries to use any of these, they are currently simply
silently ignored.
This prints out a warning if incompatible options are used,
informing users that an option used cannot be used with remote
console mode. Additionally, some clarifications are added to
the help text and man page.
ASTERISK-22246
ASTERISK-26582
Change-Id: I980a5380ef2c19e8ea348596396d5382893c4337
This adds the EVAL_EXTEN function, which may be used to retrieve
the variable-substituted data at any extension.
ASTERISK-29486
Change-Id: Iad81019689674c9f4ac77d235f5d7234adbb1432
Adds version information for applications, functions,
and manager events/actions.
This is not completely exhaustive by any means but
covers most new things added that have release
versioning information in the issue tracker.
ASTERISK-29940 #close
Change-Id: I506401e93c799715dbbe97c0a8ba18af2bf5e131
Currently, if a user uses an application like ControlPlayback
to try to rewind a file past the beginning, this can throw
warnings when the file format (e.g. PCM) tries to seek to
a negative offset.
Instead of letting file formats try (and fail) to seek a
negative offset, we instead now catch this in the rewind
function to ensure that we never seek an offset less than 0.
This prevents legitimate user actions from triggering warnings
from any particular file formats.
ASTERISK-29943 #close
Change-Id: Ia53f2623f57898f4b8e5c894b968b01e95426967
Adds the dialplan eval function commands to evaluate a dialplan
function from the CLI. The return value and function result are
printed out and can be used for testing or debugging.
ASTERISK-29820 #close
Change-Id: I833e97ea54c49336aca145330a2adeebfad05209
On a write error to an AMI session a flag was set to
indicate that the write error had occurred, with the
expected result being that the session be terminated.
This was not actually happening and instead writing
would continue to be attempted.
This change adds a check for the write error and causes
the session to actually terminate.
ASTERISK-29948
Change-Id: Icaf5d413d4c0d5dc78292a17287fecc8720a31a5
The PBX core uses the stack when it comes to includes, which
means that a context can only contain strictly fewer than
AST_PBX_MAX_STACK includes. If this is exceeded, then warnings
will be emitted for each number of includes beyond this if
searching for an extension in the including context, and if
the extension's inclusion is beyond the stack size, it will
simply not be found.
To address this, we now check if there are too many includes
in a context when the dialplan is reloaded so that if there
is an issue, the user is aware of at "compile time" as opposed
to "run time" only. Secondly, more details are printed out
when this message is encountered so it's clear what has happened.
ASTERISK-26719
Change-Id: Ia3700452e75a7af3391b3e82ee69f06a669f8958
Treat time_t's as entirely unique and use the POSIX API's for
converting to/from strings.
Lastly, a 64-bit integer formats as 20 digits at most in base10.
Don't need to have any 100 byte buffers to hold that.
ASTERISK-29674 #close
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Change-Id: Id7b25bdca8f92e34229f6454f6c3e500f2cd6f56
MUSL defines BUFSIZ as 1024 which is not reasonable for log messages.
More broadly, BUFSIZ is the amount of buffering stdio.h does, which
is arbitrary and largely orthogonal to what logging should accept
as the maximum message size.
ASTERISK-29928
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Change-Id: Iaa49fbbab029c64ae3d95e4b18270e0442cce170
Passing 0 as the last argument to strtoimax() or strtoumax() causes
octal and hexadecimal to be accepted which was not originally
intended. So we now force to only accept decimal.
ASTERISK-29950 #close
Change-Id: I93baf0f273441e8280354630a463df263a8c0edd
BackGround and WaitExten both accept options that are not
currently documented. This adds documentation for these
options to the xml documentation for each application.
ASTERISK-29967 #close
Change-Id: If812a9f1ccbba3e4d427a0e7a6dea923c2f905f7
Added functions to open, close, and apply XML Stylesheets
to XML documents. Although the presence of libxslt was already
being checked by configure, it was only happening if xmldoc was
enabled. Now it's checked regardless.
Added ability to parse a string consisting of comma separated
name/value pairs into an ast_variable list. The reverse of
ast_variable_list_join().
Change-Id: I1e1d149be22165a1fb8e88e2903a36bba1a6cf2e
Added:
Replace a variable in a list:
int ast_variable_list_replace_variable(struct ast_variable **head,
struct ast_variable *old, struct ast_variable *new);
Added test as well.
Create a "name=value" string from a variable list:
'name1="val1",name2="val2"', etc.
struct ast_str *ast_variable_list_join(
const struct ast_variable *head, const char *item_separator,
const char *name_value_separator, const char *quote_char,
struct ast_str **str);
Added test as well.
Allow the name of an XML element to be changed.
void ast_xml_set_name(struct ast_xml_node *node, const char *name);
Change-Id: I330a5f63dc0c218e0d8dfc0745948d2812141ccb
The disabledevents setting has been added to the general section
in manager.conf, which allows users to specify events that
should be globally disabled and not sent to any AMI listeners.
This allows for processing of these AMI events to end sooner and,
for frequent AMI events such as Newexten which users may not have
any need for, allows them to not be processed. Additionally, it also
cleans up core debug as previously when debug was 3 or higher,
the debug was constantly spammed by "Analyzing AMI event" messages
along with a complete dump of the event contents (often for Newexten).
ASTERISK-29853 #close
Change-Id: Id42b9a3722a1f460d745cad1ebc47c537fd4f205
Adds the lastcontext and lastexten channel fields to allow users
to access previous dialplan execution locations.
ASTERISK-29840 #close
Change-Id: Ib455fe300cc8e9a127686896ee2d0bd11e900307
Although there are 10 debugs levels, over time,
many current debug calls have come to use
inappropriately low debug levels. In particular,
a select few debug calls (currently all debug 1)
can result in thousands of debug messages per minute
for a single call.
This can adds a lot of noise to core debug
which dilutes the value in having different
debug levels in the first place, as these
log messages are from the core internals are
are better suited for higher debug levels.
Some debugs levels are thus adjusted so that
debug level 1 is not inappropriately overloaded
with these extremely high-volume and general
debug messages.
ASTERISK-29897 #close
Change-Id: I55a71598993552d3d64a401a35ee99474770d4b4
Adds two pieces of information to the core show settings command
which are useful in the context of getting backtraces.
The first is to display whether or not Asterisk would generate
a core dump if it were to crash.
The second is to show the current running directory of Asterisk.
ASTERISK-29866 #close
Change-Id: Ic42c0a9ecc233381aad274d86c62808d1ebb4d83
The configObject tag contains a default attribute which
allows the default value to be specified, if applicable.
This allows for the default value to show up specially on
the wiki in a way that is clear to users.
There are a couple places in the tree where default values
are included in the description as opposed to as attributes,
which means these can't be parsed specially for the wiki.
These are changed to use the attribute instead of being
included in the text description.
ASTERISK-29898 #close
Change-Id: I9d7ea08f50075f41459ea7b76654906b674ec755
When tps_shutdown is called as part of the cleanup process there is a
chance that one of the taskprocessors that references the
tps_singletons object is still running. The change is to allow for
tps_shutdown to check tps_singleton's container count and give the
running taskprocessors a chance to finish. If after
AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT (10) seconds there are still
container references we shutdown anyway as this is most likely a bug
due to a taskprocessor not being unreferenced.
ASTERISK-29365
Change-Id: Ia932fc003d316389b9c4fd15ad6594458c9727f1
This code was needlessly complex and would fail to properly delimit
the response message if LOW_MEMORY was defined.
Change-Id: Iae50bf09ef4bc34f9dc4b49435daa76f8b2c5b6e
The XML Manager Event Interface (amxml) now generates attribute names
that are compliant with the XML 1.1 specification. Previously, an
attribute name that started with a digit would be rendered as-is, even
though attribute names must not begin with a digit. We now prefix
attribute names that start with a digit with an underscore ('_') to
prevent XML validation failures.
This is not backwards compatible but my assumption is that compliant
XML parsers would already have been complaining about this.
ASTERISK-29886 #close
Change-Id: Icfaa56a131a082d803e9b7db5093806d455a0523
Adds a new option, defaultenabled, to the CDR core to
control whether or not CDR is enabled on a newly created
channel. This allows CDR to be disabled by default on
new channels and require the user to explicitly enable
CDR if desired. Existing behavior remains unchanged.
ASTERISK-29808 #close
Change-Id: Ibb78c11974bda229bbb7004b64761980e0b2c6d1
sched: Avoid a double deref when AST_SCHED_DEL_UNREF is called on an
executing call-back. This is done by adding a new variable 'rescheduled'
to the struct sched which is set in ast_sched_runq and checked in
ast_sched_del_nonrunning. ast_sched_del_nonrunning is a replacement for
now deprecated ast_sched_del which returns a new possible value -2
if called on an executing call-back with rescheduled set. ast_sched_del
is modified to call ast_sched_del_nonrunning to maintain existing code.
AST_SCHED_DEL_UNREF is also updated to look for the -2 in which case it
will not throw a warning or invoke refcall.
test_sched: Add a new unit test sched_test_freebird that will check the
reference count in the resolved scenario.
ASTERISK-29698
Change-Id: Icfb16b3acbc29cf5b4cef74183f7531caaefe21d
Enable the Linux rdtsc implementation on NetBSD as well. The assembly
works correctly there.
ASTERISK-29851
Change-Id: I460ad9b4d971913420ecb84186f5ba5ab03f6f37
Implement the ast_get_tid() function for NetBSD system. NetBSD supports
getting the TID via _lwp_self().
ASTERISK-29850
Change-Id: If57fd3f9ea15ef5d010bfbdcbbbae9b379f72f8c
A regression was introduced in ASTERISK~29531 that caused 'say'
functions to fail with file lists that would previously have
succeeded. This caused affected channels to hang up where previously
they would have continued.
We now explicitly check for the empty string to restore the previous
behavior.
ASTERISK-29859 #close
Change-Id: Ia2e5769868e2792313c2d7c07996efe009c6f8d5
Every config variable in the directories
section of asterisk.conf currently has a
counterpart built-in variable containing
the value of the config option, except
for the last one, astsbindir, which should
have an ASTSBINDIR variable.
However, the actual corresponding ASTSBINDIR
variable is missing in pbx_variables.c.
This adds the missing variable so that all
the config options have their corresponding
variable.
ASTERISK-29847 #close
Change-Id: I36006faf471825b36ebc8aa5e87a3bcb38d446fc
gethostbyname() and gethostbyname_r() are deprecated in favor of
getaddrinfo() which we use in the ast_sockaddr family of functions.
ASTERISK-29819 #close
Change-Id: Ie277c0ef768d753b169c121ef570a71665692ab7
Adds the macro DTMF_MATRIX_SIZE to replace
the magic number 4 sprinkled throughout
dsp.c.
ASTERISK-29815 #close
Change-Id: Ie3bddb92c6b16204ece0f758009e9490eb33b9ba
Adds a command to the CLI to unload and then
load a module. This makes it easier to perform
these operations which are often done
subsequently to load a new version of a module.
"module reload" already refers to reloading of
configuration, so the name "refresh" is chosen
instead.
ASTERISK-29807 #close
Change-Id: I595f6f11774a0de2565a1fba38da22309ce93a2c
Adds missing documentation for some channel,
bridge, and queue events.
ASTERISK-24427
ASTERISK-29515
Change-Id: I92b06b88c8cadc0155f95ebe3e870b3e795a8c64
The current TCP client connect code, blocks and does not handle EINTR
error case.
This patch makes the client socket non-blocking while connecting,
ensures a connect does not immediately fail due to EINTR "errors",
and adds a connect timeout option.
The original client start call sets the new timeout option to
"infinite", thus making sure old, orginal behavior is retained.
ASTERISK-29746 #close
Change-Id: I907571843a83e43c0742b95a64785f4411f02671
Adds tech-agnostic support for SF signaling
by adding SF sender and receiver applications
as well as Dial integration.
ASTERISK-29802 #close
Change-Id: I7ec50752e9a661af639425e5d1e339f17411bcad
SayAlpha, SayAlphaCase, SayDigits, SayMoney, SayNumber, SayOrdinal,
and SayPhonetic all claim to allow DTMF interruption if the
SAY_DTMF_INTERRUPT channel variable is set to a truthy value, but we
are failing to break out of a given 'say' application if DTMF actually
occurs.
ASTERISK-29816 #close
Change-Id: I6a96e0130560831d2cb45164919862b9bcb6287e
It's not safe to keep the channel locked while locking
the peer Local channel, as it can result in a deadlock.
This change unlocks it during this time but keeps the
bridge locked to ensure nothing changes about the bridge.
ASTERISK-29821
Change-Id: Ib68eb7037e5a479bcc2aceee77337cdde1fbdde6
The variable cp4 in a variable substitution function
can potentially be used without being initialized
currently. This causes Asterisk to no longer compile.
This initializes cp4 to NULL to make the compiler
happy.
ASTERISK-29803 #close
Change-Id: I392579cbb76db2795d5820c9427cf55fbcee9e72
Previously, it was only possible to have one HTTP server in Asterisk.
With this patch it is now possible to have multiple HTTP servers
listening on different addresses.
Note, this behavior has only been made available through an API call
from within the TEST_FRAMEWORK. Specifically, this feature has been
added in order to allow unit test to create/start and stop servers,
if one has not been enabled through configuration.
Change-Id: Ic5fb5f11e62c019a1c51310f4667b32a4dae52f5
Currently, Asterisk doesn't throw warnings if options
are passed into applications that don't accept them.
This can confuse users if they're unaware that they
are doing something wrong.
This adds an additional check to parse_options so that
a warning is thrown anytime an option is parsed that
doesn't exist in the parsing application, so that users
are notified of the invalid usage.
ASTERISK-29801 #close
Change-Id: Id029274a57135caca193c913307a63fd75e24679
Currently MSet can only parse a maximum of 24 variables.
If more variables are provided to MSet, the 24th variable
will simply contain the remainder of the string and the
remaining variables thereafter will never get set.
This increases the number of variables that can be parsed
in one go from 24 to 99. Additionally, documentation is added
since this limitation is currently undocumented and is
confusing to users who encounter this limitation.
ASTERISK-29766 #close
Change-Id: I3fe35b462dedec0a452fd9ea7f92c920a3939f16
Currently, variable substitution involving dialplan
extensions is quite clunky since it entails obtaining
the current dialplan location, backing it up, storing
the desired variables for substitution on the channel,
performing substitution, then restoring the original
location.
In addition to being clunky, things could also go wrong
if an async goto were to occur and change the dialplan
location during a substitution.
Fundamentally, there's no reason it needs to be done this
way, so new API is added to allow for directly passing in
the dialplan location for the purposes of variable
substitution so we don't need to mess with the channel
information anymore. Existing API is not changed.
ASTERISK-29745 #close
Change-Id: I23273bf27fa0efb64a606eebf9aa8e2f41a065e4
Adds tech-agnostic support for MF signaling by adding
MF sender and receiver applications as well as Dial
integration.
ASTERISK-29496-mf #do-not-close
Change-Id: I61962b359b8ec4cfd05df877ddf9f5b8f71927a4
We know that passing a NULL or empty argument to
ast_channel_get_by_name() will never result in a matching channel and
will always result in an error being emitted, so just short-circuit
out in that case.
ASTERISK-28219 #close
Change-Id: I88eadc748e9c6996fc17467b0a05881bbfd00bce
Since Doxygen 1.8.16, a special comment block is required. Otherwise
(pure C comment), the group command is ignored. Additionally, several
unbalanced group commands were fixed.
ASTERISK-29732
Change-Id: I4687857b9d56e6f44fd440b73af156691660202e
A backend's implementation of the realtime 'require' function may call
va_arg() and then fail, leaving the va_list in an undefined
state. Pass a copy of the va_list instead.
ASTERISK-29771 #close
Change-Id: I555565a72af84e96d49f62fe8cb66ba5a78461f4
Refactors generic functions used for email generation
into utils.c so that they can be used by multiple
modules, including app_voicemail and app_minivm,
to avoid code duplication.
ASTERISK-29715 #close
Change-Id: I1de0ed3483623e9599711129edc817c45ad237ee
In the AO2_ALLOC_OPT_LOCK_NOLOCK case the referenced obj
structure is freed, but is then referenced later if ref_log is
enabled. The change is to store the obj->priv_data.options value
locally and reference it instead of the value from the freed obj
ASTERISK-29730
Change-Id: I60cc5dc1f5a4330e7ad56976fc38a42de0ab6072
Local channels are made up of two pairs - the 1 and 2
sides. When a frame goes in one side, it comes out the
other. Back and forth. When both halves are in a
bridge this creates an infinite loop of frames.
This change makes it so that bridging no longer
allows both of these sides to exist in the same
bridge.
ASTERISK-29748
Change-Id: I29928b6de87cd9be996a77daccefd7c360fef651