Switch from specialised handling of config sections (used to load
signalling templates) to a more general approach using a callback
mechanism. This allows us to add more information to the config file
while keeping the details of the underlying GKeyFile hidden. Use a typed
hash table for type safety.
Change-Id: I71ddfda0202b47df363bcc5acf1725078774f8f1
Change old code to directly return `str` objects instead of pointers to
allocated ones. Largely a no-op change but makes some code easier and
eliminates some old kludges.
Change-Id: I2be19dd24bb7ff046d86cc32a3af235283e65dd0
Make `moh-max-duration` available for both
music-on-hold functionality as well as
for the media player.
For that to work, do the following:
- keep `moh-max-duration` config option only for MoH,
if not set (so 0) by default is 1800000ms (half an hour)
- for the play media functionality introduce flag option
`repeat-duration`, by default is disabled
Policy changes:
- duration counter can be used in common with repeats
counter, but then takes a precedence over it.
Hence if first a duration is underflown, then EOF triggered.
Otherwise if the duration counter is still positive, but
repeats are negative, then do EOF based on repeats.
- the repeats counter will always count down during each
iteration, even when used together with the duration counter
For MoH to survive, the repeats counter is simple set to 999
to let the duration counter always win over repeats one
- MoH cannot take duration disabled, since otherwise
would make no sense for it. Hence always takes internally
defined value 1800000ms (half an hour) if not defined
by the configuration option
Backwards compatibility:
- is kept in regards of repeats counter
- is kept in regards of the play media functionality
Change-Id: I48ff3c17c9bed31f80c3106b275b703a9ccb4b26
Introduced Music on Hold functionality:
- available only for the offer/answer model,
no other scenarios (publish, subscriber etc.)
are covered with it
- it gets advertised always at the beginning of
the call (original offer/answer exchange)
- can be added for both sides: offerer/answerer
- the one who advertises its MoH capabilities
with its SDP offer or answer, can later trigger
MoH using sendonly SDP and unhold remote
party using sendrecv SDP
- MoH covers only audio type of media sessions
- there is no specific selection of media sections
to be held, thus, if one audio media puts the
call on hold, the whole call is held
- list of parameters to be given when advertising
MoH capabilities: a sound source (file, blob or db source);
sendonly/sendrecv hold; zero-connection hold;
At least an audio file source must be given
- MoH cannot be mixed with the play media functionality,
the last one triggered will override previous one
- MoH must be unheld to stop the media being sent
towards a recipient, otherwise only a termination
of monologues will stop this packets stream
Change-Id: Iefd83ced79c14dadad936348a1d529007d6e7b3b
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
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
Support session level group attribute
for the sdp_create approach.
Additionally: fix the `testVideoroomWebRTCVideo` test,
because as it turned out it used to lose the `a=group:`
attribute before.
Change-Id: I799dfe0dcc5e0708864150cd0e0262a61dd4cc05
Added support of the CT (conference total) bandwidth
attribute for the SDP session level. See RFC8866.
Will be required later for the SDP formatting in `sdp_create()`.
Change-Id: Ifc64f68d7acee8ce253882f4fa480bbf7ad7c0bd
... 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
Added support of the AS bandwidth attribute for the
SDP session level. Will be required later for the SDP
formatting in `sdp_create()`.
Change-Id: I1bde4659679de6e60bdad12c0578ced2c1983300
Two version of the origin replace exist from now on:
- `origin-replace` - replaces only the origin address
- `origin-replace-full` - replaces all the values,
so name, id, version and IP family with address.
Values for replacing are taken from the rtpengine instance,
so local values provided by the daemon.
Additionally: documentation updated accordingly.
Additionally: revert changes in pub-sub test.
Change-Id: I4d068944726d1ab82683ca5aa641a954890aefcf
Instead of using separate data members to
bring data with the `call_monologue` structure,
just use the whole `sdp_origin` object type (structure)
as a pointer and keep it aling with real SDP origin
of according monologue's side.
Refactor the code accordingly for `sdp_create()`
users (firstly only here).
Additionally introduce functions to alloc/de-alloc
`sdp_orig` object:
- `sdp_orig_dup()` returns a pointer to copied object
- `sdp_orig_free()` deallocates it
Change-Id: Iff6a777e4867e78c73ca79c73fdb73ff8e9f22eb
For the sake of simplicity in usage and also
visibility for rest of file implementers
via the types.h, turn `strct sdp_origin` into
the typedef `sdp_origin`.
Change-Id: I13e71b9bbc944cf2931afc4fbc2c3f465eea815c
Always ensure to set the actual sdp session timing
if given, when creating SDP using `sdp_create()`.
Otherwise just use default value "0 0".
A new dedicated func `sdp_out_add_timing()` introduced
for that.
Change-Id: Ic02e1a1f55e21b85e50793e1608978ca0951c49d
Always ensure to set the actual sdp session level
bandwidth, if given, when creating SDP using `sdp_create()`.
A new dedicated func `sdp_out_add_bandwidth()` introduced
for that.
Additionally: explicitely set b=RR/b=RS to -1 when creating
a brand new monologue (e.g. for subscriber requests case)
so it's not considered as 0 inadvertently.
Change-Id: I5bfa236ceeb326785feadadf7f22393814505d3f
To prepare the deprecation of session level connection
usage (so the `c=` attribute of the session level),
deprecate first the `replace-session-connection` flag
support, because it will have essentially no use.
Change-Id: I9f9cb8f06d03d1c107a5c928054a79409642bb5b
Always ensure to set the actual sdp session name when
creating SDP using `sdp_create()`.
A new dedicated func `sdp_out_add_session_name()` introduced
for that.
Additionally: fix auto-daemon-tests-websocket and
auto-daemon-tests-pubsub accordingly.
Change-Id: Ie62573149ef9ae226dc8c955dcb2cfaaa4d3ae87
In order to be able to set `sdp_origin` related things
while initiating a monologue from flags (so in
`__call_monologue_init_from_flags()` ), duplicate `sdp_origin`
from `sdp_session` while doing streams parsing in `sdp_streams()`.
Change-Id: I17a4400a41623d336590010e9dfc5389460b27be
Direction parsing.
Instead of adding key/val flags to the dictionary for
further parsing later via iteration in `call_ng_main_flags()`,
just call the `call_ng_main_flags()` directly.
Change-Id: Ide137aed12a6ba416b59a307a0a11a934f78a858
Codec related flags parsing.
A bencode list for codec related flags keeping (while
parsing in `parse_rtpp_flags()` ), is removed due to no need.
Instead of adding key/val flags to the dictionary for
further parsing later via iteration in `call_ng_main_flags()`,
just call the `call_ng_codec_flags()` directly.
Change-Id: I1adcea84e9254ae35e6480d61426f1434513e779
Instead of adding key/val flags to the dictionary for
further parsing later via iteration in `call_ng_main_flags()`,
just call the `call_ng_main_flags()` directly.
Change-Id: Ia893a6b50db7a0659a42c09463169f2c0f5e595e
During the parsing of `rtpp_flags` use the
`call_ng_flags_flags()` directly instead of the
`bencode_list_add_str()`, hence reduce amount
of iterations required to parse generic flags.
Additionally:
`call_ng_flags_flags()` is made visible for usage
within external files.
`helper_arg` union has been moved to the header.
Change-Id: I34399a0d3940a1276feb1210e4421cbcdf656e9d