Giter VIP home page Giter VIP logo

sipdotnet's Introduction

sipdotnet

Small .NET wrapper for liblinphone library. You can use it for simple interface for SIP telephony.

Using

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 and Version 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 and SetRingbackSound (sound that is heard when it's ringing to remote party)

Example

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

Requirements

  • .NET 4.0 framework on Windows or Linux (>= Mono 3.2.8)
  • last available (4.1.1) liblinphone library binaries installed

Liblinphone on Windows

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'.

Liblinphone on Linux

  1. Install Mono
  2. Build manually from sources, or use my bash script for Ubuntu 16.04.

License

LGPLv3 (see LICENSE file)

sipdotnet's People

Contributors

bedefaced avatar 3dprogramin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.