SkillAgentSearch skills...

Sipsorcery

A WebRTC, SIP and VoIP library for C# and .NET. Designed for real-time communications apps.

Install / Use

/learn @sipsorcery-org/Sipsorcery
About this skill

Quality Score

0/100

Category

Design

Supported Platforms

Universal

README

License

License Use prohibited in Israel

BSD 3-Clause License with an explicit prohibition on use by entities contributing to Israeli occupation or genocide.

For full license see LICENSE.

The SIPSorceryMediaFFmpeg library is licensed separately under GNU LGPL v2.1 see License

SIPSorcery Repository Overview

This repository is the home of the SIPSorcery project - a comprehensive real-time communications library for .NET that enables developers to add VoIP and WebRTC capabilities to their applications. The project consists of multiple packages and extensive examples to help you get started quickly.

Core Packages

| Package | Version | Downloads | Description | README | |---------|---------|-----------|-------------|---------| | SIPSorcery | NuGet | NuGet | Core library with SIP, WebRTC, RTP, ICE, STUN, and SDP support | README | | SIPSorceryMedia.Abstractions | NuGet | NuGet | Interfaces for audio/video encoders and device access | README | | SIPSorceryMedia.Windows | NuGet | NuGet | Windows-specific audio capture and playback and video capture | README | | SIPSorceryMedia.FFmpeg | NuGet | NuGet | Cross-platform media support using FFmpeg | README | | SIPSorcery.OpenAI.Realtime | NuGet | NuGet | Support for OpenAI's Realtime WebRTC and SIP end points | README | | VP8.Net | | | Experimental pure C# VP8 codec implementation | README |

Related Repositories

The SIPSorcery ecosystem includes several companion projects hosted in separate repositories:

Examples

This repository includes 70+ example projects demonstrating various SIP and WebRTC scenarios:


What Is It?

This fully C# library can be used to add Real-time Communications, typically audio and video calls, to .NET applications.

The diagram below is a high level overview of a Real-time audio and video call between Alice and Bob. It illustrates where the SIPSorcery and associated libraries can help.

Real-time Communications Overview

Supports both VoIP (get started) and WebRTC (get started).

Some of the protocols supported:

  • Session Initiation Protocol (SIP),
  • Real-time Transport Protocol (RTP),
  • Web Real-time Communications (WebRTC), as of 26 Jan 2021 now an official IETF and W3C specification,
  • Interactive Connectivity Establishment (ICE),
  • SCTP, SDP, STUN and more.

Media End Points - Audio/Video Sinks and Sources:

  • The main SIPSorcery library does not provide access to audio and video devices or native codecs. Providing cross platform access to to these features on top of .NET is a large undertaking. A number of separate demonstration libraries show some different approaches to accessing audio/video devices and wrapping codecs with .NET.

  • This library provides only a small number of audio and video codecs (G711, G722 and G729). OPUS is available via Concentus. Additional codecs, particularly video ones, require C or C++ libraries. An effort is underway to port the VP8 video codec to C# see the VP8.Net directory.

Installation

The library should work with .NET Framework >= 4.6.1 and all .NET Core and .NET versions. The demo applications initially targetted .NET Core 3.1 and are updated to later .NET versions as time and interest permit. The library is available via NuGet.

dotnet add package SIPSorcery

With Visual Studio Package Manager Console (or search for SIPSorcery on NuGet):

Install-Package SIPSorcery

Documentation

Class reference documentation and articles explaining common usage are available at https://sipsorcery-org.github.io/sipsorcery/.

Getting Started VoIP

The simplest possible example to place an audio-only SIP call is shown below. This example relies on the Windows specific SIPSorceryMedia.Windows library to play the received audio and only works on Windows (due to lack of .NET audio device support on non-Windows platforms).

dotnet new console --name SIPGetStarted --framework net10.0 --target-framework-override net10.0-windows10.0.17763.0
cd SIPGetStarted
dotnet add package SIPSorcery
dotnet add package SIPSorceryMedia.Windows
# Paste the code below into Program.cs.
dotnet run
# If successful you will hear a "Hello World" announcement.
string DESTINATION = "music@iptel.org";
        
Console.WriteLine("SIP Get Started");

var userAgent = new SIPSorcery.SIP.App.SIPUserAgent();
var winAudio = new SIPSorceryMedia.Windows.WindowsAudioEndPoint(new SIPSorcery.Media.AudioEncoder());
var voipMediaSession = new SIPSorcery.Media.VoIPMediaSession(winAudio.ToMediaEndPoints());

// Place the call and wait for the result.
bool callResult = await userAgent.Call(DESTINATION, null, null, voipMediaSession);
Console.WriteLine($"Call result {(callResult ? "success" : "failure")}.");

Console.WriteLine("Press any key to hangup and exit.");
Console.ReadLine();

The GetStarted example contains the full source and project file for the example above.

The three key classes in the abo

Related Skills

View on GitHub
GitHub Stars1.8k
CategoryDesign
Updated18h ago
Forks510

Languages

C#

Security Score

85/100

Audited on Mar 25, 2026

No findings