When a stream topology is provided to chan_local when dialing
it filters the audio formats down. This operation did not skip
streams which were removed (that have no formats) resulting in
calling being aborted.
This change causes such streams to be skipped.
ASTERISK-29407
Change-Id: I1de8b98727cb2d10f4bc287da0b5fdcb381addd6
Up/down sampling changes the number of samples produced by a translation.
This must be taken into account when checking the codec's buffer size.
ASTERISK-29328
Change-Id: I9aebe2f8788e00321a7f5c47aa97c617f39e9055
Added support for a basic AEAP configuration read from aeap.conf.
Also added 2 CLI commands for showing individual configurations as
well as all of them: aeap show server <id> and aeap show servers.
Only one configuration option is required at the moment, and that one is
server_url. It must be a websocket URL. The other option, codecs, is
optional and will be used over the codecs specified on the endpoint if
provided.
https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=45482453
Change-Id: I567ac5148c92b98d29d2ad83421b416b75ffdaa3
There is a possibility, when bridge_channel_write_frame() is
called, that the bridge_channel->chan will be NULL. The first
thing bridge_channel_write_frame() does though is call
ast_channel_is_multistream() which had no check for a NULL
channel and therefore caused a segfault. Since it's still
possible for bridge_channel_write_frame() to write the frame to
the other channels in the bridge, we don't want to bail before we
call ast_channel_is_multistream() but we can just skip the
multi-channel stuff. So...
bridge_channel_write_frame() only calls ast_channel_is_multistream()
if bridge_channel->chan is not NULL.
As a safety measure, ast_channel_is_multistream() now returns
false if the supplied channel is NULL.
ASTERISK-29379
Reported-by: Vyrva Igor
Reported-by: Ross Beer
Change-Id: Idfe62dbea8c69813ecfd58e113a6620dc42352ce
The channels, bridges and endpoints scrape functions were
grabbing their respective global containers, getting the
count of entries, allocating metric arrays based on
that count, then iterating over the container. If the
global container had new objects added after the count
was taken and the metric arrays were allocated, we'd run
out of metric entries and attempt to write past the end
of the arrays.
Now each of the scape functions clone their respective
global containers and all operations are done on the
clone. Since the clone is stable between getting the
count and iterating over it, we can't run past the end
of the metrics array.
ASTERISK-29130
Reported-By: Francisco Correia
Reported-By: BJ Weschke
Reported-By: Sébastien Duthil
Change-Id: If0c8e40853bc0e9429f2ba9c7f5f358d90c311af
Using the information from the MODULEINFO XML we can
now output useful information at the end of module
loading for deprecated modules. This includes the
version it was deprecated in, the version it will be
removed in, and the replacement if available.
ASTERISK-29339
Change-Id: I2080dab97d2186be94c421b41dabf6d79a11611a
For some input to the standard deviation algorithm extremely large,
and wrong numbers were being calculated.
This patch uses a new formula for correctly calculating both the
running mean and standard deviation for the given inputs.
ASTERISK-29364 #close
Change-Id: Ibc6e18be41c28bed3fde06d612607acc3fbd621f
The calculated minimum lost packets represents the lowest number of
lost packets missed during an RTCP report interval. Zero of course
is the lowest, but the idea is that this value contain the lowest
number of lost packets once some have been missed.
This patch checks to make sure the number of lost packets over an
interval is not zero before checking and setting the minimum value.
Also, this patch updates the rtp lost packet test to check for
packet loss over several reports vs one.
Change-Id: I07d6e21cec61e289c2326138d6bcbcb3c3d5e008
Flash in RTP is conveyed the same as DTMF, just with a
specific digit. In Asterisk however we do flash as a
single control frame.
This change makes it so that only on end do we provide
the flash control frame to the core. Previously we would
provide a flash control frame on both begin and end,
causing flash to work improperly.
ASTERISK-29373
Change-Id: I1accd9c6e859811336e670e698bd8bd124f33226
This patch makes it so when Asterisk is compiled in DEVMODE a CLI
command is available that allows someone to drop incoming RTP
packets. The command allows for dropping of packets once, or on a
timed interval (e.g. drop 10 packets every 5 seconds). A user can
also specify to drop packets by IP address.
Change-Id: I25fa7ae9bad6ed68e273bbcccf0ee51cae6e7024
Added a TIME_UNIT enumeration, and a function that converts a
string to one of the enumerated values. Also, added functions
that create and initialize a timeval object using a specified
value, and unit type.
Change-Id: Ic31a1c3262a44f77a5ef78bfc85dcf69a8d47392
Added .log extension to the sample logs in logger.conf.sample so that
they will be able to be opened in the browser when attached to JIRA
tickets. Because of this, asterisk.logrotate has also been updated to
look for .log extensions instead of no extension for log files such as
full and messages.
Change-Id: I5de743c03f08047d6c6cc80cac5019ae0c4c200f
Also removed the sample documentation, and some oddly-placed
documentation about the timeout argument to the Queue() application
itself. There is a large section on the timeout behavior below.
ASTERISK-26614 #close
Change-Id: I8f84e8304b50305b7c4cba2d9787a5d77c3a6217
The 'core' console (ie: asterisk -c) does read logger.conf and does
use the dateformat= option.
Whereas 'remote' consoles (ie: asterisk -r -T) does not read logger.conf
and uses a hard coded dateformat option for printing received verbose messages:
main/logger.c: static char dateformat[256] = "%b %e %T"
This change will load logger.conf for each remote console session and
use the dateformat= option to set the per-line timestamp for verbose messages
Change-Id: I3ea10990dbd920e9f7ce8ff771bc65aa7f4ea8c1
ASTERISK-25358: #close
Reported-by: Igor Liferenko
When the check for equal topologies was added to reschedule_reinvite()
it was assumed that both the pending and active media states would
actually have non-NULL topologies. We since discovered this isn't
the case.
We now only test for equal topologies if both media states have
non-NULL topologies. The logic had to be rearranged a bit to make
sure that we cloned the media states if their topologies were
non-NULL but weren't equal.
ASTERISK-29215
Change-Id: I61313cca7fc571144338aac826091791b87b6e17
If a queue member was updated with the same status multiple
times each time a QueueMemberStatus event would be sent
which would be a duplicate of the previous.
This change makes it so that the QueueMemberStatus event is
only sent if the status actually changes.
ASTERISK-29355
Change-Id: I580c60d992a0a8f2bea8b91c868771b3b490d116
When using the ast_unreal_lock_all function no channel
locks can be held before calling it.
This change unlocks the channel that indicate was
called on before doing so and then relocks it afterwards.
ASTERISK-29035
Change-Id: Id65016201b5f9c9519a216e250f9101c629e19e9
Some configuration items for a transport do not result in
the underlying transport changing, but instead are just
state we keep ourselves and use. It is perfectly reasonable
to change these items.
These include local_net and external_* information.
ASTERISK-29354
Change-Id: I027857ccfe4419f460243e562b5f098434b3d43a
When an SSRC change occurs the timestamps are likely
to change as well. As a result we need to reset the
timestamp mapping done in the calc_rxstamp function
so that they map properly from timestamp to real
time.
This previously occurred but due to packet
retransmission support the explicit setting
of the marker bit was not effective.
ASTERISK-29352
Change-Id: I2d4c8f93ea24abc1030196706de2d70facf05a5a
The "deprecated_in" and "removed_in" information can now be
set in MODULEINFO for a module and is then displayed in
menuselect so users can be aware of when a module is slated
to be deprecated and then removed.
ASTERISK-29337
Change-Id: I6952889cf08e0e9e99cf8b43f99b3cef4688087a
This change embeds the MODULEINFO block of modules
into the core XML documentation. This provides a shared
mechanism for use by both menuselect and Asterisk for
information and a definitive source of truth.
ASTERISK-29335
Change-Id: Ifbfd5c700049cf320a3e45351ac65dd89bc99d90
Some modules have a different support level documented in their
MODULEINFO XML and Asterisk module definition. This change
brings the two in sync for the modules which were not matching.
ASTERISK-29336
Change-Id: If2f819103d4a271e2e0624ef4db365e897fa3d35
There exists an inconsistency with framehook usage
such that it is only on reads that the frame should
be freed, not on writes as well.
ASTERISK-29071
Change-Id: I5ef918ebe4debac8a469e8d43bf9d6b673e8e472
see RFC 4855:
parameter names are case-insensitive both in media type strings and
in the default mapping to the SDP a=fmtp attribute.
This change is required for H.263+ because some implementations are
known to use even mixed-case. This does not fix ASTERISK~29268 because
H.264 was not fixed. This approach here lowers/uppers both parameter
names and parameter values. H.264 needs a different approach because
one of its parameter values is not case-insensitive:
sprop-parameter-sets is Base64.
Change-Id: Idf2a73457be231647aed3c87b1da197afba86892
The system header strings was included mistakenly with commit 3de0204.
That header is included via asterisk.h and there via the compat.h.
Change-Id: I3dc49060e275295f785670c87cc65fd3c3abd24a
Because they modify their argument they are not pure functions and
should not be marked as such, otherwise the compiler may optimize
them away.
ASTERISK-29306 #close
Change-Id: Ibec03a08522dd39e8a137ece9bc6a3059dfaad5f
ao2_replace() bumps the reference count of the object that is doing the
replacing, which is not what we want. We just want to drop the old ref
on the old object and update the pointer to point to the new object.
Pointed out by George Joseph in #asterisk-dev
Change-Id: Ie8167ed3d4b52b9d1ea2d785f885e8c27206743d
For RTCP to work, we update the ssrc to be the one corresponding to
the native bridge while active. However when the bridge ends we
should generate a new SSRC as the sequence numbers will not continue
from the native bridge left off.
ASTERISK-29300 #close
Change-Id: I23334b6934d2bf6490bda4bbf6414d96b8d17d10
Some sorcery objects actually contain dynamic content
that can change despite the underlying configuration
itself not changing. A good example of this is the
res_pjsip_endpoint_identifier_ip module which allows
specifying hostnames. While the configuration may not
change between reloads the DNS information of the
hostnames can.
This change adds the ability for a sorcery object to be
marked as having dynamic contents which is then taken
into account when reloading by the sorcery file based
config module. If there is an object with dynamic content
then a reload will be forced while if there are none
then the existing behavior of not reloading occurs.
ASTERISK-29321
Change-Id: I9342dc55be46cc00204533c266a68d972760a0b1
Although the dlg session count was incremented in a pjsip servant
thread, there's no guarantee that the last thread to unref this
progress object was one. Before we decrement, we need to make
sure that this is either a servant thread or that we push the
decrement to a serializer that is one.
Because pjsip_dlg_dec_session requires the dialog lock, we don't
want to wait on the task to complete if we had to push it to a
serializer.
Change-Id: I8ff2d5d94be3ff04298394070434e22a7d3cbc41
When registering it can be useful to see the source IP address and
port in cases where multiple devices are using the same endpoint
or when anonymous is in use.
ASTERISK-29325
Change-Id: Ie178a6f55f53f8473035854c411bc3d056e0a2e0
When Asterisk sends a reinvite negotiating T38 faxing, it's possible a
crash can occur if the response contains a m=image and zero port. The
reinvite callback code now checks session_media to see if it is null or
not before trying to access the udptl variable on it.
ASTERISK-29305
Change-Id: I1dfc51c5fa586e38579ede4bc228edee213ccaa9