Don't treat the `force_inc_sdp_ver` flag as
the `replace_sdp_version` one, but consider
it as a separate option flag.
Correct usage of it accordingly.
Additionally: change sdp_version_check() func signature
to use `force_increase` as bool.
Change-Id: I9ed772a5a3535d887dda5a5a116b6326c8f5f46a
Obsolete str_init(), rename STR_INIT() to just STR(), and replace all
instances of str_init() with STR().
no-op
Change-Id: I981529063ad2ea26089add467f7a84b638dbf423
`delete-delay` is already parsed using bencode_dictionary_get_int_str()
so we don't need to special-handle string type values
Change-Id: If9758ccfbbe18674b7731aa53b9de5bd3fd87ae4
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
Move the `call_subscribe_request_ng()` fully to a usage
of the `sdp_create()` only.
Carry the origin IP and net family via flags
to the monologue, so can be reused later when creating SDP.
Always use given SDP session origin IP address and family
for the SDP being prepared, unless sdp origin replacement
is required via given flags (in this case just used
an advertised IP of rtpengine).
Additionally: fix unit tests for subscribe cases accordingly
to the policy.
Change-Id: Ib7697876ce45e01597edd27764d4147d12f738c8
Don't carry parameters required for processing
in the `sdp_create()` via the `stream_params`,
but rahter handle them like:
- parsing in `sdp_parse()`
- `sdp_media` -> `stream_params` in sdp_streams()
- `stream_params` -> `call_media` in ` __media_init_from_flags()`
Additionally: update the test "subscribe_request AMR asymmetric".
This is because we seem to never actually take into account
presence of bandwidth data in offer/answer model preceding
the subscribe request.
Change-Id: I5b4b19ae244c6bbf961d5ea7c18b6747519144db
In all the cases (apart PUBLISH) ensure to set the actual
media connection when creating SDP using `sdp_create()`.
A new dedicated func `sdp_out_add_media_connection()`
introduced for that.
Change-Id: I26e9b123aad95e2d335aef903d441ecc2cae2605
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
Combine common basic NG checks used in the `call_publish_ng()`
and `call_offer_answer_ng()` functions into a separate func.
Change-Id: I1239c1dafd3b8a4a3ca79879323ce1bf9c3fc9c0
Use relaxed-order atomic ops to access config variables that can be set
during run time.
Rename config_lock to keyspaces_lock as the keyspaces list remains the
only object that it protects.
All other config variables aren't settable at runtime and so don't
require locks or atomic ops.
Change-Id: I7e01a34a4818a558d5648ae27a86f9880a95d050
Keep two separate timestamps, one updated by userspace code only and the
other updated by kernel only. This way we can tell where the packet
processing happens. For code that wants to report only the last
timestamp regardless of which one of the two it is, we add a convenience
function that just returns the newer one.
Change-Id: Ib3af7aa55006d8b32e2bc3db4f8bfa5514c57e40
Allocate memory from bufferpool for per-stream stats. No functional
change, but it allows sharing these between kernel and user space.
Change-Id: I370a49e1d94bb91c7fd0a2bc7d00ba65f99c4f6a
Keep the default case for the `call_ng_flags_flags()` more
accurate, which makes it easier for reading.
Change-Id: I317656ab964503389f2c84e835dd9db69cc70c3e
Deprecate a usage of intermediate dictionary for parsing
of rtpp flags. Just use the `call_ng_main_flags()` function
directly with a given `bencode_buffer_t` buffer.
Change-Id: I0bea13b94b6e0016799dd07a50061e1367131106
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
Introduced by d7b8ebbc68
*** CID 1584501: Control flow issues (MISSING_BREAK)
/daemon/call_interfaces.c: 1825 in call_ng_main_flags()
1819 call_ng_flags_str_list(out, value, call_ng_flags_replace, NULL);
1820 break;
1821 case CSH_LOOKUP("rtcp-mux"):
1822 case CSH_LOOKUP("RTCP-mux"):
1823 call_ng_flags_str_list(out, value, call_ng_flags_rtcp_mux, NULL);
1824 break;
>>> CID 1584501: Control flow issues (MISSING_BREAK)
>>> The case for value "324" is not terminated by a "break" statement.
1825 case CSH_LOOKUP("rtpp-flags"):;
1826 case CSH_LOOKUP("rtpp_flags"):;
1827 /* new dictionary to store rtpp_flags */
1828 bencode_item_t * dict;
1829 dict = bencode_dictionary(value->buffer);
1830 assert(dict != NULL);
Change-Id: Iaa1d9b3bd31d32e48451c3a47f8e99fa3c755e63
A fix for bullseye/buster and focal:
call_interfaces.c: In function 'call_ng_main_flags':
call_interfaces.c:1828:4: error: a label can only be part of a statement and a declaration is not a statement
1828 | bencode_item_t * dict;
| ^~~~~~~~~~~~~~
make[3]: *** [<builtin>: call_interfaces.strhash.o] Error 1
Switch case has to be followed by a statement, and the declaration
is not, so just follow it by the empty statement.
Change-Id: I7c5ef62dec9ceb404736ec3c4bed84f04b892d24
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