NGCP-Flow: mr12.5.1
Only meant for mr12.5+ branches.
Add a support of session level connection replacement by default,
avoiding flag.
This is due to the fact: we've managed to deprecate
the replace-session-connection functionality, but the switch
to the SDP create approach hadn't been done that time around,
when branching the master to the mr12.5 branch.
Change-Id: Ic5230180e3ba83cda59e62c567414c71b2d2f1aa
If media type doesn't match, assume a change in a=mid and ignore it.
Change-Id: Id0c8d7b9163445266e4179f4388109954226c4fa
(cherry picked from commit 2aa11c2a2a)
(cherry picked from commit 6480bd6284)
Fix zero c= line when first m= line has a zero port.
Add matching tests.
Change-Id: I1472b8101ffb3647e6aa092995672788510ee117
(cherry picked from commit 5b69e419d5)
(cherry picked from commit 28a2f02a0a)
Fixes:
/bin/ld: dynamic STT_GNU_IFUNC symbol `s16_mix_in.lto_priv.234' with pointer equality in `/tmp/ccDfEly2.ltrans2.ltrans.o' can not be used when making an executable; recompile with -fPIE and relink with -pie
closes#1846
Change-Id: Ic31f2e064e88bc931f3438eff7b362ad611b7d84
(cherry picked from commit d9c27af99d)
(cherry picked from commit c724e84873)
Add support of replacements flags:
- replace-origin
- replace-origin-username
- replace-origin-full
Additionally: fix websocket tests, because now
the `-` symbol isn't considered as the one to be
set always when using `replce-origin-full`.
Instead it will use values of the very first parsed SDP.
Change-Id: I7636f020cb92cb760fcd25b0b84509e6d5ba2a9f
The option flag `replace-origin-full` should replace whole
origin (o=) line of the SDP body, so that all origin fields
in the `o=` line always remain the same in all SDPs going to a
particular RTP endpoint.
So, not just a straight-forward replacing with own values.
A behavior in relation to the address field is the same
as by the `origin` option flag.
Correct according tests and add one more.
Change-Id: I4bcb740db5cd68a75fb754f5f6b5d21e19b05e1b
Use the `->session_last_sdp_orig` for the version as well as
username type of replacements.
Remove superfluous code.
It's possible to handle it like that, because the last user
of the sdp_replace func, which is the offer/answer model, sets
the `->session_sdp_orig` actually in `__call_monologue_init_from_flags`.
Additionally: add tests for the user type of the origin replacement.
Change-Id: Idd60e628c676840c2e844077303035c0edec67e2
Make the `sdp_replace()` compliant with `sdp_create()` in terms
of the replace `origin-full` flag support.
Also introduce according unit tests.
Change-Id: Ib950a957d5ee3820dbc8a831fe0a7ea570b4c59b
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
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
Run the SDES reordering routine also when the opposite side is plain
RTP. Add a matching test case.
Ref: https://groups.google.com/g/rtpengine/c/pG6NB24G-BY
Change-Id: I7844290e85e44c1bba2c7665202b6259aead1028
Split the code that handles reordering offerer SDES suites based on the
respective option into its own function. Rework it slightly so that it
reorders the list in place for simplicity. Remove the part that honours
SDES-no and SDES-only as these should affect the opposite (outgoing)
direction. This requires changing one of the test cases, which seems
more correct now.
Change-Id: Ie284d052d72031fad64c94767fa95c74639ae331
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
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
Rework the `sdp_out_add_origin()` func so, that
it's compatible with offer/answer model.
Additionally it uses the previously existing logic
for the PUBLISH operations always, regardless any
conditions.
Additionally: fix auto-daemon-tests-websocket accordingly.
Change-Id: I0bddc67f4ebe47a24063ccc82428929aeb6cc37a
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
Always ensure to set the origin name properly when
creating SDP using `sdp_create()`.
A new dedicated func `sdp_out_add_oirigin()` introduced
for that.
Additionally: fix auto-daemon-tests-websocket accordingly.
Change-Id: I671f7b54f8bed9c4b78d6532c0072836d77173e6
There isn't any immediate benefit to this, but it prepares the code for
use of shared memory for statistics.
Use the opportunity to switch accesses to these to relaxed memory order.
Change-Id: I585fef7579202179fbbcbc1b843d3bbe440a723b
Switch all memory buffers used for RTP I/O from generic stack or heap
allocated memory to the bufferpool implementation. Use a per-thread
bufferpool to minimise lock contention.
This commit is just a one-for-one swap and doesn't use the bufferpool's
reference counting semantics yet.
Change-Id: I9cba4ec97bd0afcd374bf6c0be2b608a46e73e57
now that the returned last_event_ts is always that of the previous
DTMF, we can ensure that the next one isn't transmitted until that
time plus the required pause.
Like the num_samples calculation, the actual time needs to be
increased by 1 packets worth of samples so tha pause lasts the
full duration required
Change-Id: I6da1dd7cbcf49f7f0431a5123df2cdc382fe3dba
this function is used to determine if a pause is needed on a new
injected DTMF's start ts to ensure a gap between the events. However,
if an inject request comes in after the end of the previous event
but before it would have been offset due to pause, no pause is added
This change returns the ts value from dtmf_state if the queue is
empty as that will always be the ts of the last DTMF transmitted
Change-Id: I4f3cf5115d1a8e26c0ca1bc9570c46e29391e0d0
the num_samples was added to the start_pts, which is the first event
packet timestamp, which has already increased its ts by its event
duration. so, the total duration of events ends up being one packet
more than intended.
Change-Id: I423bb222a81c5bd78e570ff2026c72dd4dd1b100
Make sure we increase the output RTP sequence
number for each generated packet in the case
of packets that need to be duplicated or sent
repeatedly (DTMF end event)
Change-Id: Ia16ffefc0791d01575248ac5d8025eb30ccaec67
For the period of time while we are using
a new approach for the parsing of option flags
on the daemon side in parallel with the parsing
on the kamailio module side, and,
the previous approach with the module isn't
deprecated yet, it's good to have some basic tests
covering a new way of prasing to ensure it's working fine.
Change-Id: I8b28310b9973878530688780b6fcf366d239629d
Add support of rtpp_flags parsing for the daemon.
From now on, it's possible to parse option flags
on the daemon side instead of the kamailio module.
It's identical to what the module does, but the
difference is:
- module sends general call identification such as:
call-id, From/To tags, viabranch using bencode
- meanwhile all generic/non-generic option flags
are added to the `rtpp_flags` bencode member as str
- parsing of that is done as usually using the
`call_ng_main_flags()` / `call_ng_flags_flags()`
and additionally using new parser `parse_rtpp_flags()`
New file implementation and header introduced:
- control_ng_flags_parser.c
- control_ng_flags_parser.h
Otherwise no functional changes, and the parsing itself
remains working following the same algorithm.
Change-Id: I59e47fa1947e2aeaa0bbf3930a0f21d9a6d669ad
If multiple pollers are in use, use a single poller per call instead of
assigning pollers round-robin to each socket used in the call.
Change-Id: Iec49bd9d2fbd75d947d6232bcccfdfe87c4c6d7c
The poller-per-thread feature was broken with a division by zero. Take
the opportunity to rework it and eliminate the poller_map object. Use a
simple array of pollers for media sockets, plus one global poller for
control sockets. In the regular case only one poller is created and
everything points to that poller. In the poller-per-thread case, one
poller per thread is created, plus one poller (also with its own single
thread) for control connections. All control sockets use the single
control poller, while all media sockets get assigned one poller from the
pool in a round-robin fashion.
closes#1801
Change-Id: Iae91a3e10b7206455c6df33b1a472254c700ce21