If the receiver of a previously passthrough T.30 stream gets switched to
a generated PCM stream from a T.38 gateway, continue the sequencing of
the previous SSRC. Technically this is not necessary as the generated
PCM stream gets a new SSRC, but at least Asterisk seems to ignore this
and expect sequencing to continue, and will ignore PCM if the sequence
jump is too large.
Change-Id: Ia4656770db11f5fa1a1e9bf5bd71a0398deb1e00
(cherry picked from commit 18579227a9)
There is enough overlap between the two enums that it doesn't make sense
to carry along both. Unify.
Change-Id: I9de8fbdb8d78a2002d8c1b62cea57188c937d61d
Allow to-tag updates in answers only until a non-provisional response is
received. Add a flag to optionally suppress this feature.
Change-Id: I67110ede662f618ba5a355500d3d84050e6318cc
If we receive an answer from a to-tag that hasn't previously seen and no
corresponding monologue exists (created from a previous offer),
previously we would treat this is a separate and new call branch, create
a brand new monologue and dissociate the previous one. This may lead to
unexpected results as this new monologue has been created without the
same initialisation as was done for the original one, and so may be left
with incorrect or incomplete data (e.g. SRTP keys, codec information,
interface bindings, etc).
Improve this by treating an unexpected and unseen to-tag as an alias to
the already existing to-tag. Going forward both tags can be used
interchangeably to refer to the same monologue.
Add a flag to suppress this new behaviour, in case some situation is
made worse by it.
Change-Id: Ie8f838eebd50d29d3549031998a2eb1f610b04bb
In order to be able to control, which media types
one wants to have in the call session,
add support of the "sdp-media-remove" flag.
Syntax:
"sdp-media-remove" : ["<media-type>", "<media-type>", ...]
Additionally, add according unit tests.
Change-Id: Ic52456f8124319992ea9ca8c161daefb1df46b59
Convert existing sdp manipulation helpers
to work with arrays directly, independently from
which array is actually given.
Moreover, don't use the `G_N_ELEMENTS()`,
since we already have the `__MT_MAX`
as the size of the array, so we can directly use
that instead of relying on the G_N_ELEMENTS macro
(for array size checks).
Change-Id: I38e71dab30a467b933c213c8157fa06651ebaf04
Not needed any more. All strings reside in the call's memory arena, and
SDP rewriting isn't a thing any more.
Change-Id: I594b85fe26f44fa25312eb97fb65de238fc18920
Convenience wrapper for &STR()
This is useful so that STR() and STR_DUP() can be extended to avoid
duplicate expansion of its macro arguments.
Change-Id: Ieae170807c11b0cdd8b52fac9bab98dccdc2b951
Instead of keeping one global hash/list of all received ICE fragments,
indexed by string call ID and from-tag, move the hash/list of ICE
fragments into the call object, now indxed only by the from-tag.
This requires a call object to exist before an ICE fragment can be
stored. Change the order of operations to always create a call object
first, then parse the SDP, then check for ICE fragment processing. The
determining factor now is only whether the monologue exists.
Duplicate the raw SDP into the call's memory arena instead of onto the
heap.
ICE fragments now don't need to store the pre-parsed SDP any more, and
the trickle ICE handling code is guaranteed to always have the fully
parsed SDP information.
Strings for fragment indexes can now be allocated from the call's memory
arena.
Obsolete the extra thread used to delete old ICE fragments. This is now
done in-line with regular call timeout processing.
Change-Id: I7acbc4c52666c4cdf1c02324bf33cf0bfcb4f0d0
Move the SDP offer/answer model to the sdp_create
approach instead of using the sdp_replace one.
This assumes the SDP body including session level
attributes (s=, o=, t= etc.), as well as the media
attributes, are formatted using currently given
session context.
In other words, rtpengine collects all possible
information during all of the offer/answer exchanges
within the dialog, which in its turn affects each
monologue's context, from which each new SDP message
will be built up.
This approach replaces the older one, which instead
used to go through the currenty processed SDP and
just replace those attributes, that rtpengine
is required to affect, leaving the rest untouched.
Additionally: all of the existing offer/asnwer model
tests were fixed to comply with the currect change.
Most of it is just an offset of attributes, which are
stored a bit higher/lower within the same media or global
SDP session.
Also a good part of unit test fixes targets a move of
`c=` line from the session level to the media one (so
each media has from now on its own `c=` attribute). This
does discontinue a support for session level connection
information.
Change-Id: Iecb4739683d23c4f9341e8a34b71f8ca2070956c
Add `break` statement. Fixes:
*** CID 1600019: Control flow issues (MISSING_BREAK)
/daemon/call_interfaces.c: 1162 in call_ng_flags_flags()
1156 out->strip_extmap = 1;
1157 break;
1158 case CSH_LOOKUP("symmetric-codecs"):
1159 ilog(LOG_INFO, "Ignoring obsolete flag `symmetric-codecs`");
1160 break;
1161 case CSH_LOOKUP("to-tag"):
>>> CID 1600019: Control flow issues (MISSING_BREAK)
>>> The case for value "155" is not terminated by a "break" statement.
1162 case CSH_LOOKUP("to_tag"):
1163 /* including the To tag in the delete message allows to be more selective
1164 * about monologues within a dialog to be torn down. */
1165 out->to_tag_flag = 1;
1166 case CSH_LOOKUP("trickle-ICE"):
1167 case CSH_LOOKUP("trickle-ice"):
Change-Id: I0195341ec70ea623ea7fece3782cfdc030ee4eaf
Add `call_ng_process_flags()` based parsing
as for other opmodes, like offer and answer.
This keeps the backwards compatibility with
the older "flags" parsing approach on the
module side, as well as adds the possibility
to parse rtpp-flags on the daemon side.
As an advantage, there is no need to use
specific local parsing for things like
to/from tags, call-id, delete-delay etc.
Additionally:
- this commit introduces flags-flags parsing
for the "fatal" flag.
However, as before is only taken into account
by the `call_delete_ng()` processing,
so no functional change.
- this commit introduces main-flags parsing
for the "delete-delay" flag, which is also
only taken into account by the `call_delete_ng()`
processing, so no functional change.
- this commit adds To-tag options flag prasing
into the `call_ng_flags_flags()` function,
and is used by `call_delete_ng()` specificially,
for cases when more specific identification of
monologues to be deleted is used.
Change-Id: Ia992e5375a2f86318d9ad193a7857dd589038eed
For trickle ICE updates that need to be queued up, this requires storing
the unparsed SDP in the fragment object, and then doing the parsing when
actually processing the fragment.
This allows the call's memory arena to be used for parsing.
Change-Id: I28ed192c4443cedfa3095007cc8a555e3aa7a17a
Instead of having to explicitly pass the call object to each invocation,
keep one thread-local reference to a call, implicitly set by setting the
logging context.
Add helper functions to set and release the respective reference.
Change-Id: Ic0d82eeaa403467d50dae867e33fdf9b9dd7cec5
... so that the desired wav channel can be controlled when producing a
mixed audio file
When a mixed wav file is created, the channels in the wav container are
currently allocated in the same order as each SSRC is received, meaning
it is impossible to know which channels have been allocated to the offer
or answer side of the call. Furthermore if there is a reinvite or media
file played, these are also allocated in the order that SSRC is received
- so an "answer" could end up sharing a channel with an "offer" with no
way of knowing this.
This patch allows you to specify how many channel slots should be
allocated within the mixer, and allows you to then specify which slot is
assigned to each media in the call (this will usually be 2 slots in
total, slot 1 for answer, slot 2 for offer or vice versa).
Ported from https://github.com/sipwise/rtpengine/pull/1852Closes#1857Closes#1852
Change-Id: I010208427cabc3a48d6ef7bd3a84e9a5bdcfd492