The FRAME_TRACE function currently asserts if it sees
a MASQUERADE_NOTIFY. However, this is a legitimate thing
that can happen so asserting is inappropriate, as there
are no clear negative ramifications of such a thing. This
is adjusted to be like the other frames to print out
the subclass.
ASTERISK-30210 #close
Change-Id: I8ecbdcf17e35f64bdeab42868471f581ad1d1a56
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
Adds the end_marked_any option, which can be used
to kick a user from a conference if any marked user
leaves.
ASTERISK-30211 #close
Change-Id: I9e8da7ccb892e522546c0f2b5476d172e022c2f5
Use const char for char arguments to
pbx_substitute_variables_helper_full_location
that can do so (context and exten).
ASTERISK-30209 #close
Change-Id: I001357177e9c3dca2b2b4eebc5650c1095b3da6f
Added an 'a' option to the GEOLOC_PROFILE function to allow
variable lists like location_info_refinement to be appended
to instead of replacing the entire list.
Added an 'r' option to the GEOLOC_PROFILE function to resolve all
variables before a read operation and after a Set operation.
Added a few missing parameters to the ones allowed for writing
with GEOLOC_PROFILE.
Fixed a bug where calling GEOLOC_PROFILE to read a parameter
might actually update the profile object.
Cleaned up XML documentation a bit.
ASTERISK-30190
Change-Id: I75f541db43345509a2e86225bfa4cf8e242e5b6c
You can now specify the location object's format, location_info,
method, location_source and confidence parameters directly on
a profile object for simple scenarios where the location
information isn't common with any other profiles. This is
mutually exclusive with setting location_reference on the
profile.
Updated appdocsxml.dtd to allow xi:include in a configObject
element. This makes it easier to link to complete configOptions
in another object. This is used to add the above fields to the
profile object without having to maintain the option descriptions
in two places.
ASTERISK-30185
Change-Id: Ifd5f05be0a76f0a6ad49fa28d17c394027677569
Added profile parameter "suppress_empty_ca_elements" that
will cause Civic Address elements that are empty to be
suppressed from the outgoing PIDF-LO document.
Fixed a possible SEGV if a sub-parameter value didn't have a
value.
ASTERISK-30177
Change-Id: I924ccc5aa2f45110a3155b22e53dfaf3ef2092dd
The trigger to perform outgoing geolocation processing is the
presence of a geoloc_outgoing_call_profile on an endpoint. This
is intentional so as to not leak location information to
destinations that shouldn't receive it. In a totally dynamic
configuration scenario however, there may not be any profiles
defined in geolocation.conf. This makes it impossible to do
outgoing processing without defining a "dummy" profile in the
config file.
This commit adds 4 built-in profiles:
"<prefer_config>"
"<discard_config>"
"<prefer_incoming>"
"<discard_incoming>"
The profiles are empty except for having their precedence
set and can be set on an endpoint to allow processing without
entries in geolocation.conf. "<discard_config>" is actually the
best one to use in this situation.
ASTERISK-30182
Change-Id: I1819ccfa404ce59802a3a07ad1cabed60fb9480a
When producing an outgoing SDP we iterate through the configured
formats and produce SDP information. It is possible for some
configured formats to not have SDP information available. If this
is the case we skip over them to allow the SDP to still be
produced.
ASTERISK-29185
Change-Id: I3e37569aa4ca341260e6ca5904dc2f75e46a1749
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
This change adds support using the pjsip_tls_transport_restart
function for reloading the TLS certificate and key, if the filenames
remain unchanged. This is useful for Let's Encrypt and other
situations. Note that no restart of the transport will occur if
the certificate and key remain unchanged.
ASTERISK-30186
Change-Id: I9bc95a6bf791830a9491ad9fa43c17d4010028d0
Fixes two typos that cause fax detection to not work.
One refers to the wrong frame variable, and the other
refers to the subclass.integer instead of the frametype
as it should.
ASTERISK-30192 #close
Change-Id: I7b35fdb7bcf25a29a212eee37c20812c64ab3ef1
The following required columns were missing,
now added to the ps_endpoints table:
incoming_call_offer_pref
outgoing_call_offer_pref
stir_shaken_profile
ASTERISK-29453
Change-Id: I5cf565edf30195844d6acbc1e1de8c5f0d837568
With gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0:
> chan_dahdi.c:4129:18: error: ‘%s’ directive output may be truncated
> writing up to 255 bytes into a region of size between 242 and 252
> [-Werror=format-truncation=]
This removes the error-prone sizeof(...) calculations in favor of just
doubling the size of the base buffer.
Change-Id: I2d276785286730d3d5d0a921bcea2e065dbf27c5
Set termination state to old subscriptions to prevent queueing and sending
NOTIFY messages on exten/device state changes.
Postpone destruction of old subscriptions until all already queued tasks
that may be using old subscriptions have completed.
ASTERISK-29906
Change-Id: I96582aad3a26515ca73a8460ee6756f56f6ba23b
The DECLARE_STRINGFIELD_SETTERS_FOR() declares ast_channel_name_set()
for us, so no need to declare it separately.
Change-Id: I4813a884ada475ddc62bca480bceb4a53b3ec59a
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
If the CONFBRIDGE function is used to dynamically set
menu options, a memory leak occurs when a menu option
that has been set is overridden, since the menu entry
is not destroyed before being freed. This ensures that
it is.
Additionally, logic that duplicates the destroy function
is removed in lieu of the destroy function itself.
ASTERISK-28422 #close
Change-Id: I71cfb5c24e636984d41086d1333a416dc12ff995
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
The CDR sample config still mentions that app_mysql
is available in the addons directory, but this is
incorrect as it was removed as of 19. This removes
that to avoid confusion.
ASTERISK-30160 #close
Change-Id: Ie5293ccb4f2b365896981811b480544e67bb9cd7
There are a handful of files in the tree that
reference an SVN link for the coding guidelines.
This removes these because the links are dead
and the vast majority of source files do not
contain these links, so this is more consistent.
app_skel still maintains an (up to date) link
to the coding guidelines.
ASTERISK-30159 #close
Change-Id: I35bbb20f66982e98099cff3029ede20091ffdac7
The MeetmeList and MeetmeListRooms AMI
responses are currently completely undocumented.
This adds documentation for these responses.
ASTERISK-30018 #close
Change-Id: Id93135b7edf01de6f8fba266e2122989dc8996b8
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
Documents the ConfbridgeListRooms AMI response,
which is currently not documented.
ASTERISK-30020 #close
Change-Id: Id6fff7a936244bae7b52686301eb740c1169cdea
Adds missing documentation for the field parameter
for the SRVRESULT function.
ASTERISK-30151
Reported by: Chris Young
Change-Id: I4385a2e0892a07e30dea1a8a0588e2c1bea2b1f1
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
configure script detects /sbin/launchd, but the result of this
check is not used in Makefile (bininstall). Makefile also detects
/sbin/launchd file to decide if it is required to install
safe_asterisk.
configure script correctly detects cross compile build and sets
PBX_LAUNCHD=0
In case of building asterisk on MacOS host for Linux target using
external toolchain (e.g. OpenWrt toolchain), bininstall does not
install safe_asterisk (due to /sbin/launchd detection in Makefile),
but it is required on target (Linux).
This patch adds HAVE_SBIN_LAUNCHD=@PBX_LAUNCHD@ to makeopts.in to
use the result of /sbin/launchd detection from configure script in
Makefile.
Also this patch uses HAVE_SBIN_LAUNCHD in Makefile (bininstall) to
decide if it is required to install safe_asterisk.
ASTERISK-29905 #close
Change-Id: Iff61217276cd188f43f51ef4cdbffe39d9f07f65
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
Move the call to ast_sip_location_prune_boot_contacts() *after* the call
to ast_res_pjsip_init_options_handling() so that
res/res_pjsip/pjsip_options.c is informed about the contact deletion and
updates its sip_options_contact_statuses list. This allows for an AMI
event to be sent by res/res_pjsip/pjsip_options.c if the endpoint
registers again from the same remote address and port (i.e., same URI)
as used before the Asterisk restart.
ASTERISK-30109
Reported-by: Michael Neuhauser
Change-Id: I1ba4478019e4931a7085f62708d9b66837e901a8
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
Adds a POLARITY function which can be used to
retrieve the current polarity of an FXS channel
as well as set the polarity of an FXS channel
to idle or reverse at any point during a call.
ASTERISK-30000 #close
Change-Id: If6f50998f723e4484bf68e2473f5cedfeaf9b8f1
make_version now silently checks if the required git commands will
fail. If they do, then return UNKNOWN__git_check_fail to
distinguish this failure from other UNKNOWN__ version failures
Makefile checks for this value on install and exits out with
instructions
ASTERISK-30029
Change-Id: If8f10cac8f509c08981120f17555762342020221
Currently, if multiple video-enabled ConfBridges are
conferenced together, we immediately get into a scenario
where an infinite sequence of video updates fills up
the taskprocessor queue and causes memory consumption
to climb unabated until Asterisk is killed. This is due
to the core bridging mechanism that provides video updates
(softmix_bridge_write_control in bridge_softmix.c)
continously updating all the channels in the bridge with
video updates.
The logic to do so in the core is that the video updates
should be provided if the video_update_discard property
for the bridge is 0, or if enough time has elapsed since
the last video update. Thus, we already have a safeguard
built in to ensure the scenario described above does not
happen. Currently, however, this safeguard is not being
adequately ensured.
In app_confbridge, the video_update_discard property
defaults to 2000, which is a healthy value that should
completely prevent this issue. However, this value is
only set onto the bridge in the SFU video mode. This
leaves video modes such as follow_talker completely
vulnerable, since video_update_discard will actually
be 0, since the default or set value was never applied.
As a result, the core bridging mechanism will always
try to provide video updates regardless of when the last
one was sent.
To prevent this issue from happening, we now always
set the video_update_discard property on the bridge
with the value from the bridge profile. The app_confbridge
defaults will thus ensure that infinite video updates
no longer happen in any video mode.
ASTERISK-29907 #close
Change-Id: I4accb2536ac62797950468e9930f12ef7dd486b2
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
line 196: loc_src = '\0';
should have been
line 196: *loc_src = '\0';
The issue was caught by the gcc optimizer complaining that
loc_src had a zero length because the pointer itself was being
set to NULL instead of the _contents_ of the pointer being set
to the NULL terminator.
ASTERISK-30138
Reported-by: Sean Bright
Change-Id: Id247be113cc8510f043ca053d5b4f5f3d32acd29
This commit adds res_pjsip_geolocation which gives chan_pjsip
the ability to use the core geolocation capabilities.
This commit message is intentionally short because this isn't
a simple capability. See the documentation at
https://wiki.asterisk.org/wiki/display/AST/Geolocation
for more information.
THE CAPABILITIES IMPLEMENTED HERE MAY CHANGE BASED ON
USER FEEDBACK!
ASTERISK-30128
Change-Id: Ie2e2bcd87243c2cfabc43eb823d4427c7086f4d9
This commit adds res_geolocation which creates the core capabilities
to manipulate Geolocation information on SIP INVITEs.
An upcoming commit will add res_pjsip_geolocation which will
allow the capabilities to be used with the pjsip channel driver.
This commit message is intentionally short because this isn't
a simple capability. See the documentation at
https://wiki.asterisk.org/wiki/display/AST/Geolocation
for more information.
THE CAPABILITIES IMPLEMENTED HERE MAY CHANGE BASED ON
USER FEEDBACK!
ASTERISK-30127
Change-Id: Ibfde963121b1ecf57fd98ee7060c4f0808416303