Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New rtp.io module (embedded RTPProxy) #3501

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sobomax
Copy link
Contributor

@sobomax sobomax commented Oct 18, 2024

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

@sobomax sobomax force-pushed the wip_rtp.io branch 3 times, most recently from 0464fea to 26f9391 Compare October 21, 2024 17:20
@sobomax sobomax marked this pull request as draft October 21, 2024 17:23
@sobomax
Copy link
Contributor Author

sobomax commented Oct 21, 2024

Need to work around issue with pushing to ghcr, so pipeline works in the PRs.

What rtp.io module does is it starts up a RTP handling threads in
the main 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.

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.
@sobomax sobomax marked this pull request as ready for review October 23, 2024 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant