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 media subscriptions instead of call subscriptions
in the `call_block_silence_media()`, because older concept
gets deprecated.
Change-Id: I0ac0378a99d69017d34f8f949d7f3228bfa5b07a
Start using the media subscriptions model
(based on newly introduced `media_subscription` objects)
in scope of:
- `ng_stats_monologue()`
- `ng_call_stats()`
Change-Id: I158aedd1fae9d65135144b3331089bfc11020f13
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
To be able to use this feature from controlling agents which don't
directly support the new dictionary keys, add an alternative syntax via
the `flags` list. This is in line with all other similar dictionary keys
(e.g. `codec-` etc)
Change-Id: I7210c74c9cd3b31338052efa1c3504fe775c1c46
Similar to the other list building helper functions, add one that builds
a key/value table. The benefit is that this can then be used as a
callback in a different context.
Change-Id: If639543eaa3d67153c4cc9656d715a0c0aba3887
These functions iterate over lists, building hash tables or queues
respectively. Eliminate code duplication.
Change-Id: I375a72cc6a4d30044678e6d4abab148880713fe3
Operating on an empty queue is essentially a no-op, so there's no point
in doing an extra check first to see if the queue is empty. Remove this
extra check for the CMD_ADD case.
Change-Id: I3c7524cd407fb350a46bdf8d3a91014158c6bf44
Use an indexed array to generically support all possible media types
instead of hard-coding a few possible types. This makes lookup faster
and is also future-proof.
Add helper functions to allocate and lookup the appropriate object.
Change-Id: I28406b2c5a6829330f41601fa52e738d9a8ee315
Add second callback function to be able to handle lists that not just
contain strings, but also arbitrary other elements.
Rename the old call_ng_flags_list to call_ng_flags_str_list to reflect
this.
Unused at this point.
Change-Id: I49b46acf3ba53172b68998a93523d2d7eca1bd0b
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
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
Make it possible to set output-destination immediately when starting the
reording, not only afterwards.
Closes#1667
Change-Id: Idb7de770ad5a41d6ae6055784213e7983df9bfec
For efficiency reasons `substitute` kind of SDP manipulations
commands have been moved to the `GHashTable` instead of the `GQueue`.
Change-Id: Iec6c44109ae912ba0de440bbed6ecaee6a238b97
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
When the `discard-recording` flag is given in one of the commands to
rtpengine (e.g. in the `delete` command), the metafile is renamed to a
.DISCARD suffix and then deleted.
The recording daemon then, seeing the .DISCARD suffix, proceeds to
immediately close all recordings, delete the files if any, and delete
the entries from the DB.
Change-Id: I3f0cac129f2d56cbccd770d43bf434dea6c0a0db
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
Moving code for handling (queuing, dequeuing) trickle ICE fragments into
ice.c, where it makes no sense. No functional changes.
Change-Id: Ib68f82e8d58efe066fdc48cd32ca9869cdeab846
This is slightly more performant as it does the retrieval and removal
with just one lookup instead of two.
Change-Id: Iba702704218ac4689a6788fd23a792ad40460ea8
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
Require all callers of media_block_match() and play_media_select_party()
ot provide their own "flags" and do the cleanup of them afterwards.
Change-Id: I465696e899851dd98e714c5b0d55397a6dbd5dab
It substitutes a specified `a=` line taken from the concerned
media attributes list. If such line has been not found,
the attributes list remains untouched.
It subsitutes one attribute at a time, so one attribute into
another attribute.
Change-Id: Ie0a48ba46a1b196fbe33b09dedc40e4498640e34
Track audio writes in the mix buffer to set the `active` flag to true
whenever a write occurs, which makes it possible to create the buffer in
an inactivate state and implicitly set it active on demand.
Handle the mix buffer not returning any data in the RTP sending logic
(which is what happens for an inactive buffer) by simply not sending any
packets.
Change-Id: Iaeb0f6deadb3d90020c8c62872735cc94db80504