With the "foreign" flag now stored in call_flags, restoring a call from
Redis restores this flag as well, overwriting the desired flag as we had
set it through call_get_or_create().
Reverse the flag setting by taking it out of call_get_or_create() (where
it's always false anyway, except when coming from Redis) and setting it
explicitly with call_make_own_foreign() after restorting call and its
flags.
Change-Id: Ib68be2aeedfa988b7555e426fa337657e1062245
Start using the media subscriptions model
(based on newly introduced `media_subscription` objects)
in scope of:
- `redis_encode_json()`
- `json_link_medias()`
- `rbl_subs_cb()`
Change-Id: I3f7267ab156b361d7e7bec4ff91a8976a7be02ee
Introduce `media_unconfirm()` to do a selective handling
of medias to unkernelize the correlated to it streams.
This is analogue of the of the `__monologue_unconfirm()`
but for medias.
Change-Id: Id8ede0fc56412021c301e97764fd5dd070b7d484
Previous implementation assumes that we use the `call_subscription`
objects in:
- `call_offer_answer_ng()`
- `call_update_lookup_udp()`
- `call_request_lookup_tcp()`
when appealing to the `call_get_mono_dialogue()`, in order to
get the `call_subscription` objects, in order to then pass it
for usage in the `monologue_offer_answer()`, where the most important
again is to use monologue references stored inside
the given `call_subscription` objects.
Instead of using the `call_subscription`, just use `call_monologue`
objects as a base data objects for this work,
which will allow us in the coming commits to deprecate
the `call_subscriptions` based model and
get to the subscription model based on medias.
Change-Id: Ia9ee5ba66522929acbceca28854ebccd3705635a
Introduction of the basic functions required for
a handling of the media subscriptions:
- `__unsubscribe_media_link()`
- `__unsubscribe_media()`
- `__unsubscribe_all_medias()`
- `__add_media_subscription()`
- `__subscribe_medias_both_ways()`
- `__subscribe_matched_medias()`
- `call_get_media_subscription()`
- `call_totag_subscribed_to_monologue()`
- `call_viabranch_intact_monologue()`
Change-Id: Iad2af5323b2ea8a10a83064d9ee72106c1d8f9c0
Initial introduction of objects we need to handle for media
subscriptions implementation:
- `struct media_subscription`
- `media_subscribers` and `media_subscribers_ht` (quick access)
- `media_subscriptions` and `media_subscriptions_ht` (quick access)
Change-Id: Ia2c4555cd7f4bcfe149bdb9f25081e0b3078042e
We have long switched to having a single primary global poller, so
there's no point in passing the poller pointer around and storing it in
associated objects. Remove all remnants of non-global pollers.
Change-Id: I5a3fd217d5de51e839e2b04fec7e23643ee83631
Transcoding is flow-specific, so it doesn't make sense to have a flag
for it in a call_media section. Instead we use the transcoding flag set
on the call_subscription objects (on subscribers), and set/unset a flag
on the monologue struct, depending on whether any media flows (going to
subscribers) have transcoding enabled.
Change-Id: Id671d56e56a22eaa8e56f6d449770b0c7b086cea
We have the subscription objects available now, so we can directly set
the transcoding flag without having to do a hash table lookup.
Change-Id: I2b85f34ca4d03dfaf81d92ea252902d1ee194efd
Instead of just return the monologues involved in an offer/answer,
return the respective subscription objects that have the monologues
pointing to each other. This makes it possible to set flags within these
objects.
Change-Id: Id88e56e1bf164a75e2172d0df04316cde5d8a955
Add a flag to inhibit kernel mode while DTMF injection is active. Tie in
DTMF playback trigger function: Remove stream from kernel, set inhibit
flag, play DTMF, then unset inhibit flag when all events have been
injected.
Change-Id: I533ec95a676bc7edf4dd973217f8d9499f1e22b6
Rename the original call_delete_branch() to call_delete_branch_by_id()
and provide a new call_delete_branch() which takes a reference to a call
object instead of a call ID.
Change-Id: Ie549e7f550fab5edc6e81472e78565e1925fae67
Move trickle ICE handling out of __media_init_from_flags and into a
higher-level function. This obsoletes the special magic return value to
indicate a trickle ICE failure.
All methods accepting trickle ICE updates must now explicitly call the
trickle ICE update function.
The requirement to have a full dialogue for trickle ICE updates is
removed as trickle ICE only affects one side.
Change-Id: I0850e1858876ca7bcdd39b7144b53b5a4afed53e
Using a pointer array instead of a linked lists allows us to directly
reference a media section by index number, without having to spool into
the linked list.
No functional changes.
Change-Id: I8b0e93f0c2e9addbcb4c938894118ed4a6aec768
Similar to the existing media_player, but instead of simply producing
its own standalone output media stream, the audio_player takes over the
entire media stream flowing to the receiver, including media forwarded
from the opposite side of the call, as well as media produced by the
media_player.
Change-Id: Ic34ecf08fc73b04210cfffb1a7d795b462ece5ea
Defined in RFC 8842. If a tls-id was previously given and a the new SDP
shows a different tls-id or none at all, we must restart DTLS.
Relevant to #1585
Change-Id: I554234dfcacbd330c7a0c6aea68f24d0449cba21
Perform accumulation of stats only once (i.e. increasing an actual
counter) and report stats based on differences to previous values,
instead of carrying multiple stats counters for each metric and
resetting each counter to zero whenever stats are reported.
`rtpe_stats` is the global master accumulator.
`_intv` variables are intermediate and local storage for values sampled
from `rtpe_stats` at regular intervals.
`_rate` and `_diff` variables hold stats calculated from `rtpe_stats`
and the respective `_intv` variable whenever the sampling and reporting
occurs.
`stats_counters_calc_diff` is used to calculate stats as differences
between `rtpe_stats` and the last sampled `_intv`
`stats_counters_calc_rate` does the same but calculates a per-second
rate, based on a microsecond duration.
Eliminate now-useless struct global_stats_ax
Change-Id: Ic4ca630161787025219b67e49b41995204d60573
... so that the publishing session gets notified about "webrtcup" and
not the session which created the room.
Change-Id: If7b308df4afa7afb19ecaca1f743f87c3c736007
This is a new option flag, which provides a possiblity
to select specific crypto suite(s) for the offerer from
the given list of crypto suites received in the offer.
This will be used later on, when processing an answer from
the recipient and generating an answer to be sent out towards offerer.
Furthermore, this is being decided not when the answer is processed,
but already when the offer is processed.
Flag usage example:
`SDES-offerer_pref:AES_256_CM_HMAC_SHA;AES_256_CM_HMAC_SHA1_32;`
Change-Id: I2b22b38347d24f27331482e18b92305fbadb2520
Use the new `associated_tags` table to determine which tags are
associated with which. Iterate the associations between tags in a
tree-like manner and do this at the moment the `delete` command is
received. Break up the `associated_tags` links at this time, and
determine which tags would be left dangling and mark all of these for
deletion. If no tags are left after this process, mark the entire call
for deletion.
The previous approach was cumbersome and prone to errors. Using tag
names and branch names to determine which tags are associated with which
is a pointless hurdle, and using a table of associations that is
explicitly kept for this purpose is a much cleaner approach. Also
postponing the decision about which tags to delete until the time the
deletion actually happens can lead to tags not being deleted, when they
really should be (e.g. A -> B, delete A, A -> C).
Change-Id: I03ae57d0a2117ecd721372c1a49468fc34dd630c
Keep track which tags (monologues) were created together as part of an
offer/answer exchange with a separate hash table, regardless of whether
these monologues actually have tagged names or are just nameless
branches.
Change-Id: I60aa114c8caf6ecdff4705e3399f60190d04dda6
Support multiple tone frequencies for DTMF-security=tone to enable
audibly distinguishing multiple consecutive DTMF events from one
another.
Change-Id: I6fa33a5768aae198220d0b0cc4c53308c5661a52
In some cases it's possible that some packets still arrive in userspace
immediately after a stream has been pushed to the kernel, for example if
some packets are already in the queue or if there is some processing
delay (e.g. writing to Redis). Allow for a short delay before counting a
stream as userspace if it has been pushed to the kernel.
Change-Id: I55a6e255868c8c2a9e93355a4aa2287f07b3748d
Based on the information gotten from Richard Fuchs
document the main objects in the code, to let the code be more
understandable for other code readers.
Mainly documented:
- call
- call_monologue
- call_subscription
- call_media
- packet_stream
- stream_fd
- sink_handler
- rtpe_callhash / rtpe_callhash_lock
Change-Id: I0cf122bea2d9c3f198b48da134a70301564ff1f9