Ledon.Sip.Server
0.0.1
dotnet add package Ledon.Sip.Server --version 0.0.1
NuGet\Install-Package Ledon.Sip.Server -Version 0.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ledon.Sip.Server" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ledon.Sip.Server" Version="0.0.1" />
<PackageReference Include="Ledon.Sip.Server" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ledon.Sip.Server --version 0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ledon.Sip.Server, 0.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ledon.Sip.Server@0.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ledon.Sip.Server&version=0.0.1
#tool nuget:?package=Ledon.Sip.Server&version=0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Ledon.Sip.Server
SIP 服务端:基于 Ledon.Sockets.Server 的 socket 库构建,协议解析用 Ledon.Sip。
builder.Services.AddLedonSipServer(o =>
{
o.Port = 5060; // 标准 SIP 端口
o.AutoAnswerOptions = true; // OPTIONS 保活自动 200 OK
});
// 业务处理器:实现 ISipHandler(Ledon.Sip 提供)
public class MySipHandler : ISipHandler
{
public Task<SipMessage?> HandleAsync(SipMessage request, CancellationToken ct = default)
{
if (request.Method == "INVITE")
{
var sdp = SdpParser.Parse(request.Body);
// 接听逻辑……
return Task.FromResult<SipMessage?>(SipResponder.Ok(request, "Ledon/1.0"));
}
return Task.FromResult<SipMessage?>(null); // 不应答
}
}
- 传输层(socket/作用域/并发)由
Ledon.Sockets.Server负责:UDP 数据报并发处理、每数据报独立 DI 作用域; - 协议层(解析/应答)由
Ledon.Sip负责:SipParser+SipResponder; - 本包只是约 40 行的适配器(
SipUdpHandler : IUdpHandler); - TCP 传输用
SipTcpFrameCodec(按 Content-Length 切帧,RFC 3261 §18.3); - 解析失败只记录不崩(UDP 无连接,不能"断开"任何人)。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Ledon.Sip (>= 0.0.1)
- Ledon.Sockets.Server (>= 0.0.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.DependencyModel (>= 10.0.13)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.1 | 45 | 10/28/2026 |