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

Static configuration of SRTP forwarding doesn't work in audiobridge plugin #2258

Closed
willamowius opened this issue Jul 1, 2020 · 7 comments
Closed

Comments

@willamowius
Copy link
Contributor

The config file switches rtp_forward_srtp_suite and rtp_forward_srtp_crypto are never read in the source code and SRTP is not enabled.

When dynamically enabling forwarding through the API, SRTP parameters (srtp_suite and srtp_crypto) are used.

@lminiero
Copy link
Member

lminiero commented Jul 1, 2020

Mh, looks like a typo due to some copy paste: the code to read and use them is indeed there, see
https://github.com/meetecho/janus-gateway/blob/master/plugins/janus_audiobridge.c#L1894

but it's reading srtp_suite and srtp_crypto (which is what the API expects) rather than rtp_forward_srtp_suite and rtp_forward_srtp_crypto (which is what we'd expect in the configuration file). Should be an easy fix, thanks for spotting it 👍

@willamowius
Copy link
Contributor Author

The patch causes the "listforwarders" command to show the forwarder as using SRTP, but Janus can't decrypt the resulting media stream, even so both sides use the same suit and crypto string.

@lminiero
Copy link
Member

lminiero commented Jul 1, 2020

You may want to check if it does work when doing SRTP forwarding from the VideoRoom instead.

@lminiero
Copy link
Member

lminiero commented Jul 1, 2020

Another thing you can try is changing ssrc_any_inbound to ssrc_any_outbound in the AudioBridge code, since the SRTP forwarder will just send media and never receive any.

@lminiero
Copy link
Member

lminiero commented Jul 1, 2020

Actually, turns out there's no srtp_protect call in the plugin at all... no surprise it doesn't work in the AudioBridge! It works as expected in the VideoRoom instead, where we do make use of the SRTP code. I'll try and put it in there later today.

@lminiero
Copy link
Member

lminiero commented Jul 1, 2020

Ok, should be fixed now.

@willamowius
Copy link
Contributor Author

Looks good, thanks!

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

No branches or pull requests

2 participants