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
Is added by:
- explicit generic flag "directionl"; or
- if the "from-tag" flag is used
Introduce the `directional` flag for `sdp_ng_flags` struct.
In use by:
- `media_block_match1()`
Additionally:
add `IS_OP_DIRECTIONAL()` marco check.
Change-Id: Ifd56ea2ad8277d7dec136def1c028c5e2b680ff1
For the sake of proper processing for From/To tags,
we need to know which message type originated interaction
with the rtpengine (from behalf of kamailo module).
This can be of two types:
- request
- reply
This can also be re-used later, if there is a need
to detect whether that was a request or reply.
P.S.: opmode and message type shouldn't be confused,
it's not the same, since SDP offer can come in the request
as well as in the reply message (late offer/answer).
So the opmode reflects what exactly is being done in terms of
rtpengine operations, meanwhile the message type shows, which
message type originated this processing.
Change-Id: I8336175d3cfcf521418ac18b71cb4a6d5730705d
Store SDP session attributes in the monologue that were received instead
of the ones to be sent out. Look up the corresponding source monologue
when creating an outgoing SDP and insert that one's attributes.
Change-Id: Ic2e57db71b0e0b48b9868940d326b5a951d89e92
While processing SDPs, we only need to look up manipulation
instructions, which means we can just return NULL if none were given,
instead of always creating the object.
Change-Id: If187c1289eb385b23b86b3aa326634efaf0ce5ad
Handle the `output-destination` flag in the same way as the `metadata`
flag, eliminating the need to do it explicitly everywhere it's relevant.
Add a few alternative spellings of `output-destination`.
Rename the member from flags to `recording_file` to make it more clear
what it is.
Add save/restore capabilities of that field to the Redis code.
Unify printing of monologue LABEL into the same function that handles
the metadata.
Update documentation to better explain this option, and use the new
clearer name.
Change-Id: I4496341013b0ccab5b1dec026cf3a1a0ea879018
In the header files follow the rules:
1. Firstly goes ifndef/define construction, then one empty row.
2. Secondly go system headers, so in angle-brackets, then one empty row.
3. If there are important pre-processor definitions, which affect
the following custom file headers, they are added next, then one empty row.
4. Thirdly custom header files, so in double quotes,
then at least one empty row.
5. If there is "xt_RTPENGINE.h", it's mentioned next, but separately,
then one empty row.
6. Then pre-processor definitions, and one empty row before the code.
In some situations it's allowed to step aside from the rules,
when inclusions are dependent on each other, so on specific sequence,
and also possibly on some inline objects definitions.
But, if possible to follow the rules, it should be done.
Change-Id: I6bec69b508653947c04e7785775373d21112eb58