This makes it possible to have different media silencing options for
different outputs. Functionally this commit alone is a no-op.
Change-Id: I967c3e07ea4645bb49ccb76db12d51ded2d72f06
Create a dedicated struct to hold certain attributes shared by both sink
handlers and media subscriptions, as a preparation to simplify handling
these attributs.
Change-Id: I866159c33ed6d6a2873d2cf68c4906ea705d253e
If an offer is going to a side that is already known to support
rtcp-mux, don't try to offer a fallback RTCP port. Do this by pretending
that rtcp-mux=require is set, which leads to the correct behaviour. This
is needed because the RTCP fallback port might already be closed, so
trying to include it in the offer would require opening a new set of
ports, which is undesirable.
closes#1494
Change-Id: I550bec08379c799cb7dd090a70d090ae47462467
Keep a running lifetime total of all "gauge" type metrics. Also track
the square of the sums of all "gauge" type metrics in order to determine
the standard deviation.
Change-Id: I23f60774a6421636f1a913674c7d1b54a1c5f702
When doing the initial answer, the packet_stream endpoint port isn't
filled in yet. Use the stream_params port instead to test for rejected
streams.
closes#1499
Change-Id: I8f315d95521f874fb8c5e6222263d017800b5fc9
When ports are closed early (while the call is still running), we must
first update a slave rtpengine with this new information (that these
ports are now closed) before actually releasing the ports ourselves. Not
doing so leads to a race condition where the master instance re-uses a
port that was just closed before the slave instance knows about the port
being closed.
We implement this using a thread-local list to keep track of ports that
were released while processing a control message, and process this list
to actually close the ports only after Redis has been updated.
Additional calls to the function to close the ports are placed in
strategic locations to make sure this is triggered in every code path.
closes#1495
Change-Id: I803f4594f30ca315da0b84c6e76893f54ca3a7c9
This eliminates a spurious false warning log message for rejected
streams that use a dummy payload type
Change-Id: Id628cafb8d7c4ea576cd01ff35f5dd9cd2151280
Since we're creating a dummy sfd to hold the SRTCP context when we don't
have an actual RTCP port, we must make sure to remember and re-use this
dummy sfd during a re-invite. Otherwise we end up creating a duplicate
dummy sfd, which is detected as a different sfd and thus triggers an ICE
restart.
Change-Id: Iadc91e163bd15a3cd5f57656b52941724c920143
There's no need to open ports on non-primary interfaces if ICE is not in
use as these ports will not be used or seen by anyone.
This mostly obsoletes the `save-interface-ports` config option, with the
exception of ICE advertised by the offerer. We currently have no option
to reject ICE from the offerer during the offer phase, so ports would
always be opened on that side.
Relevant to #1164 and 001abe5
Change-Id: I43df70bc0ec49b81f63aec97c776e48617b2acfd
This enables the same behaviour towards the offerer when rtcp-mux=demux
or =accept is used, as we have towards the answerer when
rtcp-mux=require is used.
Change-Id: I56a1cea84efce0c2db1b58c500629d0e54d582f4
Special handling for codec lists that were received as part of an
answer: If the list includes a codec that was not offered, ignore that
codec. This prevents transcoders from being set up that were not
requested.
This brought to light some tests that were actually broken.
Change-Id: Iac71056ec5e10b5de5567917974f2c4e0261eb0c
If DTLS is rejected in an answer via `DTLS=off` we must forget that DTLS
was previously offered, as otherwise a re-invite would detect the
fingerprint as changed if the re-invite doesn't offer DTLS again. We
also make sure DTLS is shut down if during stream init DTLS is not
given, when it was present before.
Change-Id: I48ee6f0ec5ec02f558a6799951552ea2272d0e96
This is useful for functions which are used both from a timer and from
other callers. These functions would reset the logging context at their
end to free the reference held by the logging context, which would
wrongly reset the logging context when the same function was called from
a different code path. Using a stack with push/pop semantics makes it
safe to use these functions from any code path.
Additionally introduce an explicit reset function that clears the entire
stack regardless of context. This reset function is called at the end of
every work iteration in every worker thread, just in case not everything
was popped from the stack.
Change-Id: I0e2c142b95806b26473c65a882737e39d161d24d
commit a2e5cfb8e5
Author: Razvan Crainea <razvan@opensips.org>
Date: Thu Jan 13 16:16:19 2022 +0200
Add tests for subscribe requests on paused media
commit fa58596a9f
Author: Razvan Crainea <razvan@opensips.org>
Date: Wed Jan 12 22:01:27 2022 +0200
Swap media direction check for `subscribe request`
as @rfuchs mentioned in his review, the SEND/RECV media flags are set
according to rtpengine's perspective, not the media flow's one.
commit e1e9a157c0
Author: Razvan Crainea <razvan@opensips.org>
Date: Wed Jan 12 19:27:42 2022 +0200
Fix `subscribe request` SDP media direction
When building the SDP for a `subscribe request` command, take into
consideration the media direction of the source stream - if stream is
`recvonly`, then we do not have anything to send, thus the direction
should be advertised as `inactive`, rather than `sendonly`.
Change-Id: I2d78bbec8ad584774f3c90f0ce5cca42f57f7b0f