Plugin.Maui.VoipCore 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Plugin.Maui.VoipCore --version 1.0.2
                    
NuGet\Install-Package Plugin.Maui.VoipCore -Version 1.0.2
                    
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="Plugin.Maui.VoipCore" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plugin.Maui.VoipCore" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Plugin.Maui.VoipCore" />
                    
Project file
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 Plugin.Maui.VoipCore --version 1.0.2
                    
#r "nuget: Plugin.Maui.VoipCore, 1.0.2"
                    
#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 Plugin.Maui.VoipCore@1.0.2
                    
#: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=Plugin.Maui.VoipCore&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Plugin.Maui.VoipCore&version=1.0.2
                    
Install as a Cake Tool

Plugin.Maui.VoipCore

NuGet

Generic SIP/VoIP abstraction for .NET MAUI on iOS and Android.

The package owns the session model (register, call, hold, mute, speaker, DTMF) and platform audio. Signaling and media come from a pluggable ISipStack — ship your own PJSIP/Linphone adapter, or use the built-in loopback stack for tests and UI work.

Feature What it does
Accounts SIP username, domain, transport (UDP/TCP/TLS), proxy, STUN, ICE
Calls Place, answer, reject, hangup, transfer, concurrent-call limit
Media Mute, hold, speaker route, DTMF (0-9*#A-D)
Platform audio iOS AVAudioSession voice-chat; Android AudioManager in-communication
Call UI Optional iOS CallKit reporting; Android uses in-app IncomingCall
Pluggable stack ISipStack + ISipStackSink so a native SIP engine can be swapped in
Loopback In-process stack with SimulateIncoming for samples and unit tests

Install

Package: https://www.nuget.org/packages/Plugin.Maui.VoipCore

dotnet add package Plugin.Maui.VoipCore

Quick start

using Plugin.Maui.VoipCore;

public static class MauiProgram
{
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiApp<App>()
            .UseVoipCore(options =>
            {
                options.Account = new SipAccount
                {
                    Username = "alice",
                    Domain = "sip.example.com",
                    Password = "secret",
                    Transport = SipTransport.Udp
                };
                options.HoldOnBackground = true;
            });

        return builder.Build();
    }
}

Resolve IVoipCore or use VoipCore.Current:

var voip = handler.Services.GetRequiredService<IVoipCore>();

await voip.InitializeAsync();
await voip.RegisterAsync(new SipAccount
{
    Username = "alice",
    Domain = "sip.example.com"
});

voip.IncomingCall += (_, e) => { /* show answer UI */ };

var call = await voip.PlaceCallAsync(new CallRequest
{
    Destination = "bob@sip.example.com",
    DisplayName = "Bob"
});

await voip.SetMutedAsync(call.Id, true);
await voip.SendDtmfAsync(call.Id, "123#");
await voip.HangupAsync(call.Id);

The default stack is LoopbackSipStack (no network). Outgoing loopback calls connect after PlaceCallAsync returns; inject inbound calls with SimulateIncoming.

Bring your own SIP stack

Implement ISipStack and report events through ISipStackSink:

builder.UseVoipCore(options =>
{
    options.StackFactory = () => new MyPjsipStack();
});

InitializeAsync receives a SipStackContext with the sink and options. Raise OnRegistrationChanged, OnIncomingCall, and OnCallStateChanged as the native engine reports them.

Loopback (tests and sample)

var stack = new LoopbackSipStack(new LoopbackSipStackOptions
{
    AutoProgress = false
});

var voip = VoipCore.Create(new VoipCoreOptions
{
    StackFactory = () => stack
});

await voip.InitializeAsync();
await voip.RegisterAsync(account);

var call = await voip.PlaceCallAsync(new CallRequest { Destination = "sip:bob@example.com" });
stack.ReportCallState(call.Id, CallState.Connected);

stack.SimulateIncoming("sip:carol@example.com", "Carol");

Lifecycle hooks

UseVoipCore wires platform resume/pause:

  • Background — hold connected calls when HoldOnBackground is true
  • Resume — resume calls that were held for backgrounding
voip.NotifyForeground();
voip.NotifyBackground();

Without the generic host

var voip = VoipCore.Create(new VoipCoreOptions
{
    UseSpeakerByDefault = true
});

await voip.InitializeAsync();

Platform notes

iOS — set NSMicrophoneUsageDescription and UIBackgroundModes (audio, voip) in Info.plist. When UseNativeCallUi is true, incoming/outgoing calls are reported to CallKit.

Android — declare RECORD_AUDIO, MODIFY_AUDIO_SETTINGS, INTERNET, and ACCESS_NETWORK_STATE. Incoming calls are delivered through IncomingCall; host a ConnectionService in the app if you need Telecom UI.

Target frameworks

The package targets net10.0, net10.0-android, and net10.0-ios.

Pack from source

dotnet pack src/Plugin.Maui.VoipCore/Plugin.Maui.VoipCore.csproj -c Release -o artifacts

The .nupkg is written to artifacts/Plugin.Maui.VoipCore.1.0.0.nupkg.

License

MIT

Support

If this plugin saved you a weekend of native plumbing, consider buying me a coffee. Your support keeps it maintained, documented, and free.

Buy Me A Coffee

This library stays open source. A coffee helps cover time for bug fixes, new features, and docs.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-android36.0 is compatible.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-ios26.0 is compatible.  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

    • No dependencies.
  • net10.0-android36.0

    • No dependencies.
  • net10.0-ios26.0

    • No dependencies.

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
1.0.7 89 8/30/2026
1.0.6 94 8/30/2026
1.0.5 88 8/29/2026
1.0.4 93 8/28/2026
1.0.3 81 8/28/2026
1.0.2 86 8/28/2026
1.0.1 95 8/28/2026
1.0.0 112 8/27/2026

Include the Buy Me a Coffee support section in the package README.