-
Notifications
You must be signed in to change notification settings - Fork 498
TURN Client #1457
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
TURN Client #1457
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces TURN client functionality to enable relay endpoints on TURN servers for SIP media sessions. The implementation provides a comprehensive TURN client that handles allocation requests, permission creation, and automatic refresh operations to maintain relay connections.
Key changes:
- Added a complete TURN client implementation with automatic allocation and renewal
- Integrated TURN support into SIP media sessions with relay endpoint management
- Refactored RTP channel architecture to support STUN/TURN message handling
Reviewed Changes
Copilot reviewed 28 out of 33 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/net/TURN/TurnClient.cs | Complete TURN client implementation handling allocate, refresh, and permission requests |
| src/net/TURN/TurnClientExtensions.cs | Extension methods for MediaStream to enable TURN relay functionality |
| src/net/TURN/TurnRelayEndPoint.cs | Data structure representing TURN relay endpoint information |
| src/net/RTP/RTPChannel.cs | Enhanced RTP channel with STUN message detection and relay sending capabilities |
| src/net/RTP/Streams/MediaStream.cs | Added TURN relay endpoint support and relay-aware RTP packet sending |
| src/net/RTP/UdpReceiver.cs | Extracted UDP receiver functionality from RTPChannel for better modularity |
| examples/sipcmdline/Program.cs | Updated command-line example to demonstrate TURN functionality |
| src/net/WebRTC/IRTCPeerConnection.cs | Added RTCIceServer parsing utility method |
| src/net/ICE/IceServer.cs | Enhanced IceServer with parsing capabilities and URI property |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Add a new TURN client for allocating relay endpoints on TURN servers.
The TURN client has been wired up to work with the SIP media sessions. Wiring up for WebRTC is a TODO.