New rtp.io module (embedded RTPProxy)#3501
Conversation
0464fea to
26f9391
Compare
|
Need to work around issue with pushing to ghcr, so pipeline works in the PRs. |
26f9391 to
f3bbb64
Compare
|
Any updates here? No progress has been made in the last 30 days, marking as stale. |
|
Any updates here? No progress has been made in the last 30 days, marking as stale. |
|
Hey @sobomax ! I tried out the build & startup phase, feedback as follows (from least to most problematic):
Cheers! |
Well, edge cases handling is somewhat obviously not very well handled since the module at the moment has only one user (us) and we know how to cook it. :) Just open a PR against respective README.md in question as user #2. :)
Well, again, this is more of a call for an action against rtpproxy repository. I build against latest ubuntu and debian on like 6 different architectures (see the appropriate CI pipeline attached). If one of libraries installed on your system @liviuchircu deviates from that and it bothers you, then just open a PR in the https://github.com/sippy/rtpproxy and we'll handle that edge case gracefully. :)
Fixed that, thanks for the reporting! We just never use any of the modules in question, so I put it as a safeguard since I did not know what negative value might mean in that somewhat critical code path. Regarding WIP mode, no. The code is somewhat experimental, yes, but not not a work in progress. The PR is in fact comes with the full working CI pipeline (this is the first module to provide that and the first CI to actually run a call scenario against OpenSIPS in fact) that builds against latest ubuntu and debian releases across 6 architectures and runs against 2 of them (amd64 and riscv).
Since it's not impeding any of the functionality this should be more of a feature request than anything else. The last time I saw rtpproxy crashing in production is some 5 years ago across like 300+ systems deployed. And I went to the great deal to make it reality with the glitching and fuzzing CI runs. But no, moving processing to a separate PID is not impossible and is not that difficult if you have time. So, again, good feature request. Thanks for a review, regards! -Max |
liviuchircu
left a comment
There was a problem hiding this comment.
Hey @sobomax -- sure, I can PR against rtpproxy project, or adjacent README.md files, to clarify the build hiccups I ran into. Small problems, at the end of the day -- not that time-consuming.
So we're only left with the threads started by "Attendant" which should get moved into a dedicated process for isolation purposes, before merging this PR.
What rtp.io module does is it starts up a RTP handling threads in the separate "opensips" process and let rtpproxy module access those threads via a 1:1 socketpair, thus providing usual media relaying functionality without using any external relay process. The module requires RTPProxy 3.1 or higher, compiled with --enable-librtpproxy (or respective Docker image that is pushed to GHCR and Docker.hub on every commit). When rtpproxy module is loaded without arguments and rtp.io is loaded as well, the sockets exported by the rtp.io will be used automatically in the set 0. Otherwise those sockets can be used as part of other set(s) by using "rtp.io:auto" moniker. Provided is also a CI job that builds rtp.io in a rtpproxy container for all supported architectures and tests it using voiptests package. TODO list: o hook up notification socket directly into appropriate handler on the OpenSIPS side; o generate -l / -6 option(s) based on OpenSIPS's own socket list; o more documentation.
Use rtp.io when no explicit rtpproxy configuration is provided. It is also possible to mix internal RTP functionality with externals proxies by adding it up as "rtp.io:auto" into some of the existing set.
This fixes build on systems that have no backtrace API in the libc (e.g. BSDs).
CI: handle debian.
|
@liviuchircu PR updated to fix the noted deficiencies. I've also updated CI to remove 20.04 (being deprecated by the GitHub) and replace it with 24.04 where appropriate. |
|
Great work, @sobomax! Both of the big issues I noted above seem fixed now:
I for one am excited to see the new, self-contained RTPProxy module getting some usage and feedback from the community, it's time to merge it!! |
Fix CI issues (#3501 fallout)
New rtp.io module (embedded RTPProxy)
Fix CI issues (OpenSIPS#3501 fallout)


Summary
This PR includes a new rtp.io module which allows to provide media relaying and other RTP manipulations without external media relay.
Details
Traditionally, OpenSIPS only handles signalling, offloading media operation to the external relay. However in some situations using external relay may be undesirable from system complexity point of view and others, so having an option to handle it internally may be useful.
Solution
What rtp.io module does is it starts up a RTP handling threads in the main OpenSIPS process and let rtpproxy module access those threads via a 1:1 socketpair.
The module requires RTPProxy 3.1 or higher, compiled with --enable-librtpproxy.
When rtpproxy module is loaded without arguments and rtp.io is loaded as well, the sockets exported by the rtp.io will be used automatically in the set 0. Otherwise those sockets can be used as part of other set(s) by using "rtp.io:auto" moniker.
Provided is also a CI job that builds rtp.io in a rtpproxy container for all supported architectures and tests it using voiptests package.
Compatibility
None
Closing issues
None