This is pointless at this stage, but makes it possible to pass
additional information to the thread in the future.
Change-Id: I9999f522e52ffd86753b291fd61e8ff8ea3e5899
Perform endpoint address check before doing ingress SSRC handling. We
don't want to act on an apparent SSRC change if the endpoint address
doesn't match and the packet should have been ignored.
Closes#1655
Change-Id: I251e23b1583b1916c7c4904cf40d3b37b3533117
Make it possible to set output-destination immediately when starting the
reording, not only afterwards.
Closes#1667
Change-Id: Idb7de770ad5a41d6ae6055784213e7983df9bfec
Deprecate increasing/decreasing functionality of
the call timer run duration, because it's not needed anymore,
most of the unnecessary functionality has been moved lately
to separate dedicated threads and the `call_timer`
is simply unloaded for now.
Additionally: remove logging with timestamps, because
we do not need to monitor it anymore.
Change-Id: I8d1fd260472528fcee6a12f48b9a92f195893787
As this is running in a separate thread now, rtpe_now needs to be set
excplicitly in each iteration.
Fix-up for 6fe9cc9
Change-Id: Icb1ec8a27389bb48ee893a9a29e4e1c11447d61c
Move the `ice_slow_timer()` functionality to a separate thread,
so that we do the work more efficiently, and not be dependent
on the call_timer runs by poller.
Furthermore it makes more sense to keep in the `ice.c`,
since it obviously has to do with ice timing.
Additionally:
Update the test-stats due to these changes in the `call_timer()`
We have to call the `ice_slow_timer()` now explicitely from
the test-stats.c, because the `call_timer()` is not anymore
responsible for providing stats counters rate calculations.
Change-Id: I03377dd59ea71c27497e1f4d30164075f05165cd
Similarly as for the `stats_rate_min_max()`,
move the `stats_counters_calc_rate()` functionality
to the same separate thread, so that we do the work
more efficiently and not be dependent on the call_timer
runs by poller.
Furthermore it makes more sense to keep in the `statistics.c`,
since it obviously has to do with statistics.
Additionally:
Update the test-stats due to these changes in the `call_timer()`
We have to call the `stats_counters_calc_rate()` now explicitely from
the test-stats.c, because the `call_timer()` is not anymore
responsible for providing stats counters rate calculations.
Change-Id: I1682eb76e3057f0f431c27b9633717d965313a1a
Packet processing (decoding, encoding, file writing, etc) happens with
the main parent object (metafile) unlocked and only with the specific
child object (SSRC) locked.
During teardown we close all SSRC objects with the metafile locked,
without locking the SSRC objects. This opens up a race condition during
which SSRC closing can happen at the same time as packet processing.
Fix this by locking each SSRC object during teardown, and also clear out
the SSRC hash table while the metafile is locked, which serves as a
marker to a packet processing thread that processing should be skipped.
Closes#1663
Change-Id: I4e8a6a5abfd678a6cfd794a98470a49d60694207
If the forwarded streams of a call are later combined without the inserted
silence, the resulting mix may end up with them out of sync. This
is already handled when outputting mixed files so the same functionality
from mix.c has been added for tls forwarding
Support the "id" parameter for the "join" as "publisher" message.
Preempts choosing a random feed ID.
Add a test case for this.
Change-Id: Iae8c2f50864adf913b288085aa70d5427e0a4456
Simply stripping a supplemental codec doesn't actually affect the
remaining real codecs. Add a special-cased version of codec_touched() to
ignore such a manipulation.
Add a matching test case.
Change-Id: I4a91292dd38e1114837c2dc841afe07d87cff6cb
To do the work more efficiently,
and not be dependent on the call_timer runs by poller,
we should move the ports iterations (stats update from the kernel)
functionality to a separate thread, to make it faster and
not be dependent on what happens in the `call_timer` at all.
Since it has nothing to do with the call timers.
As an additional benefit: we unload the `call_timer` runner.
Change-Id: I511529ce504ef3d29f4e9d6d731ffd470d78d27a
The default shell on i386 stretch has some sort of problem with wildcard
expansion. Force usage of bash.
Change-Id: I923375128b7861ec5f7a2c2d77a50850f888035e
Due to multiple threads polling all sockets for read events, it's
possible for one socket to receive a read event in one thread, then
immediately receive another read event in another thread, resulting in
two threads reading packets from the same socket at the same time.
While this is perfectly valid and correctly handled by mutex etc, it can
result in packets being processed out of order. In media passthrough
scenarios which don't do sequencing this can result in packets being
reordered.
Using a simple atomic counter we can ensure that only one thread is
reading from any one socket at a time.
Relevant to #1638
Change-Id: I406491d6ae5e13e618e153ba5463fd9169636016
Don't try to interpret or schedule DTMF packets if we're just doing RTP
passthrough.
Without tracking the seqencing and timestamping of the primary media
stream, we cannot actually schedule DTMF packets properly. Use the
presence of a defined output sequence number to make this determination.
The other case that uses a predefined output sequence number is when
media is coming from a pre-coded media player stream. The same thing
applies: These packets are already scheduled, so we can skip trying to
schedule them again.
closes#1638
Change-Id: I2d2c20e731f20a3136ca3eee37f0b521062cdb11
To do the work more efficiently,
and not be dependent on the call_timer runs by poller,
we should move the `stats_rate_min_max()` to a separate thread,
to make it faster and not be dependent on what happens in the `call_timer` at all.
Since it has nothing to do with the call timers.
Change-Id: I9a39e1b63cb8741377f5af5b2d52d4f8b428a0ad
We have to call the `stats_rate_min_max()` now explicitely from
the test-stats.c, because the `call_timer()` is not anymore
responsible for providing call rate stats.
Change-Id: Id896ac086660a94b8d1d6fe520b1aa68791cd351
Pandoc is available even on stretch, and unlike ronn is
actively maintained.
Fix -- markdown escaping.
Use __x__ for bold, and *x* for italics.
Remove .8.ronn symlinks.
Change-Id: Iff70e2b405f3b9ede856abf94d42fc51afb9f809
To do the work more efficiently and not be dependent on
the `call_timer` runs by poller, we should move
the releasing of sockets to a separate thread, to make it
faster and not be dependent on what happens in the `call_timer`
at all. Since it has nothing to do with the call timers.
Since now we have two queues:
- thread scope (local): ports_to_release
- global one: ports_to_release_glob
`sockets_releaser()` uses the ports_to_release_glob,
meanwhile appending in the `call_timer()` happens using the
ports_to_release.
Change-Id: Iadd966ac895b2dd64f81269d4fdf5d83747fe0b7
No need to iterate the list to achieve what the function does. We can
simply adjust pointers and count.
Change-Id: I849817e53d859ac73c14131b54a6d05e4efeb37e
Deprecate usage of the bit flags for return.
And instead do:
- only return true/false for the redis update
- check if we have to destroy the whole call using the
`call_monologues_associations_left()` only
Additionally remove unused variables.
Change-Id: Ie858c533d1aa4b74024d65c7064aa56437389882
Check globally left monologues (with associations left) after
the `monologue_delete_iter()` has already done its job.
This is needed to prevent cases, when a recursive call of the
`monologue_delete_iter()` leads to blocking of the whole call
destorying, meanwhile it's required, e.g.:
- A is in progress of destorying
- B gets recursive call of `monologue_delete_iter()` and sees
that A has still one association left with C, which A simply
hasn't manage to remove yet.
This commit introduces new function: `call_monologues_associations_left()`
Change-Id: I0941c18a76fa8c2a78d3864aee9e6433283bec88
In commit 427615d45b we switched to usage of dh-sequence-dkms. By
renaming debian/dkms.conf.in into debian/ngcp-rtpengine-kernel-dkms.dkms
and replacing its `__VERSION__` with `#MODULE_VERSION#` we broke the
shipped RPM spec file, which also relies on our dkms configuration file.
Accordingly adapt el/rtpengine.spec.
Thanks to @themsley-voiceflex for the bug report
Closes#1650
Change-Id: I257a8c223f931bb959f245ed518b855ffa988a81
For a compatibility reasons (with other doc files and with RTD)
the `rtpengine.pod` and `rtpengine-recording.pod` file get
converted to the Markdown syntax.
The compilation of MD syntax synopsis files will work
using `ronn` application, which converts them to man pages.
Change-Id: I75b54a712786a0a237c51c702ed1a2cc09e3a033
Due to a unification of the way we store documentation files,
the 'rtpengine-recording.pod' has been moved to the 'docs/' folder.
This 'docs/rtpengine-recording.pod' will be later used for the RTD a source.
Change-Id: I5267bd74358aa46d174ba4778f2f11651c6d0ba6
Due to a unification of the way we store documentation files,
the 'rtpengine.pod' has been moved to the 'docs/' folder.
This 'docs/rtpengine.pod' will be later used for the RTD a source.
Change-Id: Iba9d77e397c042f7d84e8e51d2367b42ecb5b07c
It's been noticed that quick access links in the general `overview.md`
of the RTD are broken, they simply don't see needed files, since
these links were implemented for the github usage initially.
Because the `overview.md` is just a symlink to the `README.md` (used
by the github), it's impossible to have own links (to the github files)
for the `README.md` and own links for the `overview.md` in the RTD.
Keeping separate files for RTD and github's README would be bad idea,
since then we have to manually keep them synced.
Instead, this commit proposes the solution like this:
- have same quick access links for the RTD and the Github
- by clicking quick access links in the github, one will be sent
to the RTD article.
It's a compromise solution, which gives us working access by both
github and RTD.
Then, in order to access github doc files, one has to enter the
`docs/` folder and select a needed one.
Change-Id: Ic58437dccbdccd8289e8282fcf8e91c71057e366
Avoid trying to acquire a recursive lock by making sure the response is
always generated in a different thread.
Fixes#1656
Change-Id: I6c4c5bb52cb95a204823848bb427ab24f42dcccd