$ show sipsorcery-org/sipsorcery
SIPSorcery is a comprehensive real-time communications library for .NET implementing SIP, WebRTC, RTP/RTCP, STUN/TURN/ICE, DTLS-SRTP, and SCTP protocols from scratch. The core library (src/SIPSorcery) provides SIPTransport for signaling, RTCPeerConnection for WebRTC, RTPSession for media transport, and media endpoint abstractions (IAudioSink, IVideoSource) for decoupling capture and rendering. Satellite projects include SIPSorceryMedia.Abstractions (media interfaces), SIPSorceryMedia.FFmpeg and SIPSorceryMedia.Windows (codec backends), SIPSorcery.VP8 (a C# port of libvpx VP8), SIPSorcery.OpenAI.Realtime (OpenAI Realtime API client), and a CLI tool (SIPSorcery.Cli) with route/bridge commands for wiring media pipelines between SIP, WebRTC, and cloud realtime endpoints.
The LLM identified 8 files worth highlighting for reuse:
Linked-list based RTP packet reordering buffer that handles sequence number wrap-around and configurable timeout. Solves a recurring real-time media problem (out-of-order packet delivery) with a self-contained implementation that can be extracted for any RTP-like stream processing pipeline.
RTP stream quality monitor tracking sequence gaps, reordering, and duplicates using RFC 3711 Appendix A extended sequence number estimation. Self-contained and reusable for any RTP receiver needing jitter, loss, and reordering statistics without external dependencies.
Big-endian byte-order conversion utilities (ParseUInt16, ToBuffer, etc.) used throughout the protocol stack. A clean, dependency-free utility class that any C# binary protocol implementation can adopt directly.
Composable static assertion helpers for SDP structure verification in WebRTC negotiation tests. Wraps SDP parsing and checks media lines, DTLS fingerprints, BUNDLE groups, ICE credentials, media direction, and RFC 3264 port-0 rejection. A reusable test pattern for any SDP/WebRTC test suite.
DelegatingHandler that logs HTTP request/response traffic with sensitive header redaction. A self-contained, drop-in component for any .NET HttpClient pipeline needing audit logging or debugging without leaking credentials.
RFC 9628 VP9 RTP packetizer implementing descriptor construction, picture ID handling, and key-frame detection. A self-contained codec packetization pattern that mirrors sibling implementations for H.264 and AV1, demonstrating a consistent fragmentation strategy.
Duplex media bridge graph that cross-wires media sources and sinks across SIP, WebRTC, and cloud realtime endpoints. Demonstrates a clean graph-based routing pattern (ISourceNode/ISinkNode with fan-out tee) for real-time media pipelines, designed for extension to richer graph shapes.
System.Text.Json converter that respects [EnumMember] attributes during enum serialization/deserialization. A small, dependency-free utility that solves a common JSON interop problem when API contracts use non-C# enum names.