Small .NET wrapper for liblinphone library. You can use it for simple interface for SIP telephony.
You can access to wrapped liblinphone actions and events by Phone
class. Only that you need is the SIP account (Account
class).
For using library from .NET code you need to copy linphone dlls (liblinphone and dependencies) to directory with your EXE file (or use, for example, Add item dialog in Visual Studio (and select Copy to Output: Copy if newer
or Copy always
in Properties
window of added dlls)) and then add sipdotnet.dll
(or the whole project) as dependency to your solution.
Current available functionality:
-
SIP-proxy connection control:
Connect
Disconnect
Useragent
andVersion
definition
-
Call / Register / Error events:
PhoneConnectedEvent
PhoneDisconnectedEvent
IncomingCallEvent
CallActiveEvent
CallCompletedEvent
ErrorEvent
-
Make / receive / terminate / record calls:
MakeCall
MakeCallAndRecord
ReceiveCall
ReceiveCallAndRecord
TerminateCall
TerminateAllCalls
-
Utilities:
SendDTMFs
(sending DTMF-tones)SetIncomingRingSound
andSetRingbackSound
(sound that is heard when it's ringing to remote party)
Account account = new Account ("username", "password", "server");
Phone phone = new Phone (account);
phone.PhoneConnectedEvent += delegate() {
Console.WriteLine("Phone connected. Calling...");
phone.MakeCallAndRecord("phonenumber", "/tmp/filename.wav");
};
phone.CallActiveEvent += delegate(Call call) {
Console.WriteLine("Answered. Call is active!");
};
phone.CallCompletedEvent += delegate(Call call) {
Console.WriteLine("Completed.");
};
phone.Connect (); // connecting
Console.ReadLine ();
Console.WriteLine("Disconnecting...");
phone.Disconnect (); // terminate all calls and disconnect
- .NET 4.0 framework on Windows or Linux (>= Mono 3.2.8)
- last available (4.1.1) liblinphone library binaries installed
Due to backwardness of SDK binaries version it's recommended to use dlls from Linphone desktop build. You can use my zipped collection in lib directory or collect necessary dlls yourself using such tools as Dependency Walker against 'linphone.dll'.
- Install Mono
- Build manually from sources, or use my bash script for Ubuntu 16.04.
LGPLv3 (see LICENSE
file)