C# SIP Stack/Library

C#VoipSip

C# Problem Overview


I am looking for a good SIP library either written in C# or that provides a C# wrapper. Does not necessarily need to be free. Has anyone used anything good?

To clarify, I am talking about the VoIP protocol SIP.

I am really looking for more than a google search on this one. I would like to someone to come back and say "We use ______, and it works great."

To clarify further, I am looking for a library that would help me to implement a SIP proxy server without having to manually construct the SIP packets. I'm not looking for asterisk, freeswitch or any other pbx software.

I am looking to create a service in C#, that will wait for SIP packets and respond to them and I would like a library that would handle most of the details.

C# Solutions


Solution 1 - C#

I went through a similar quest 7 years ago, but looking for an embedded C version. I looked at the oSIP library. It did all the work of converting SIP packets to structures and back.

However, one point in the documentation stuck with me. The author recommended that you become very familiar with the SIP specification (RFC 3261) to use the library effectively. After reading the specs several times, I ended up writing my own parser and call control application.

Keep in mind that SIP is still an evolving standard. There is an active SIPForum group that is currently developing SIPConnect 1.1 to standardize on an interface between a SIP Service provider (e.g. Vonage) and a SIP-PBX. There is also an activity called BLISS for defining the "best practices" to implement SIP features between User Agents.

Interoperability is tough. There are hundreds of RFCs related to SIP. Different end-points use different ones, and interpretations of the specs are not always compatible. There are several different interoperability "test events (like SIPit) to make sure your implementation works with others.

Whatever you select, make sure you have a good understanding of the specs for the features you are implementing. Additionally, the specs and libraries will help with the packet side, but you still need a "call control" library (higher level "brain" to decide how to process a SIP request/response). You also need a media layer to handle audio unless your application is purely a SIP proxy.

Having said all that, several Internet Telephony Service Providers (ITSPs) have used the SIP Express Router as a front-end proxy for their services. It is very configurable and has a high success rate for compatibility.

Solution 2 - C#

IMHO, one of the best stacks by far is http://www.pjsip.org/">PJSIP</a>;. It is written in very portable C and has a number of wrappers. Here is a https://sites.google.com/site/sipekvoip/Home/documentation/pjsipwrapper">.NET wrapper that works really well.

Solution 3 - C#

Solution 4 - C#

My sipsorcery project is another option. It contains a SIP stack written completely in C#.

Solution 5 - C#

We use SIP.Net, works OK for us.
We use it to wait for SIP packets and keep the SIP flow very simple.
Note that sometimes its object model is too detailed, so the product itself is very flexible (if you need such flexibility). However, we wrote a higher level wrapper (a kind of a façade) just to make things easier for us. They're very responsive, but the documentation is not detailed enough IMO.
You can also check nsip (just a link, I haven't tried it myself)

Solution 6 - C#

I needed this a while back and ended up writing my own B2BUA (a SIP proxy that also handles the audio and acts as an endpoint to both sides of the conversation).

The problem with the SIP spec (and RTP), is that it's very complicated, especially is you consider all of the optional additions that have been made to it over the years. Everyone implements it just a little bit differently, so if you go with shrink-wrapped software, you might run into problems with specific phones or servers.

In my case, I was trying to get Microsoft Speech Server to communicate with SIP terminators. Microsoft has an especially creative interpretation of the SIP spec (the most notable example being that they do not support UDP). Also, some VOIP gateways do not support REFER for supervised transfers, which is a necessity for many applications.

Several decent links have been provided in the other answers: my advice is to roll your own or go with something that is open source so you can tweak it as necessary when you run into the inevitable incompatibilites in SIP implementations.

Solution 7 - C#

Looks like a decent starting point might be this CodeProject article. I don't believe it handles the media stream, however.

Solution 8 - C#

http://www.konnetic.com is a relatively new addition. Fully managed. Everything you need to work with SIP and SDP. They haven’t picked the low-hanging fruit in the standard like a lot of the others. Just as good but tied to Microsoft is the Microsoft Lync server.

Solution 9 - C#

Not sure what you're looking for here. Are you looking for a client-side VOIP application or a server side? If the latter, you might want to check out www.freeswitch.org">FreeSwitch>. One feature they have is the ability to write extension code in Mono, which allows C#. Look for mod_mono support.

FreeSwitch

Solution 10 - C#

Try Voice Elements .

It is a .NET Telephony Tool and they have their own SIP Stack. Use C# or whatever .NET language of your choice.

Solution 11 - C#

Konnetic provide fully managed SIP components for .NET development.

Their http://www.konnetic.com/products/products_sip_sdk_std.aspx">.NET SIP SDK is probably the most comprehensive.

Otherwise, Microsoft's Lync server comes with a very good managed SIP library, available here: www.microsoft.com/en-us/lync/default.aspx

Solution 12 - C#

Perhaps you want to try lumisoft. Entirely build in C#. Completely open source and free. lumisoft

Solution 13 - C#

I've seen (not used directly, just reviewed) a fairly large and stable VOIP system using a SIP stack from Radware. Very good (i.e. no problems), and I didn't find any security issues with it either...

The system I reviewed was in C#.

Solution 14 - C#

In the past, I've used Live Communications Server from MS (thought it was in 2003). The SDK associated was pretty bad.

There's now the new version, Office Communications Server. I haven't developed with the SDK but seen some demos that were pretty cool.

Solution 15 - C#

The best i found was VoIP Video SIP SDK It provide as well video with high quality

Solution 16 - C#

LumiSoft.Net is a very good SIP stack for C#. It has all basic libraries such as SIP, RTP, SDP, DNS and many other libs to build a robust sip proxy server or SIP client very easily.

Solution 17 - C#

This looks interesting to me... http://developers.inova.si/sipobjects/Default.aspx?tabid=92 - it's not open source, but it's definitely .NET-centric. It's Avaya centric so it may not suit your purposes.

Also look at this: http://www.codeplex.com/mysipswitch

Solution 18 - C#

LanScape: http://www.lanscapecorp.com/

> All LanScape VOIP products including > the LanScape VOIP Media Engine™ have > been designed from the "ground up" to > support all versions of Microsoft > Windows® 2000 and XP up to and > including the latest version of > Windows Vista.

I also happen to personally know that it is C#-friendly.

Solution 19 - C#

Read about Avaya DMCC. You can register in AvayaDev and download it for free. That C# framework let you leverage all the pbx features with AES and CM. You can check if you have SIP supported too.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionbobwienholtView Question on Stackoverflow
Solution 1 - C#JayGView Answer on Stackoverflow
Solution 2 - C#E DominiqueView Answer on Stackoverflow
Solution 3 - C#XaisoftView Answer on Stackoverflow
Solution 4 - C#sipsorceryView Answer on Stackoverflow
Solution 5 - C#Ron KleinView Answer on Stackoverflow
Solution 6 - C#Eric Z BeardView Answer on Stackoverflow
Solution 7 - C#Sean BrightView Answer on Stackoverflow
Solution 8 - C#jwriView Answer on Stackoverflow
Solution 9 - C#Erik FunkenbuschView Answer on Stackoverflow
Solution 10 - C#Laura WilliamsonView Answer on Stackoverflow
Solution 11 - C#jnielsenView Answer on Stackoverflow
Solution 12 - C#hannesView Answer on Stackoverflow
Solution 13 - C#AviDView Answer on Stackoverflow
Solution 14 - C#LB40View Answer on Stackoverflow
Solution 15 - C#user2343734View Answer on Stackoverflow
Solution 16 - C#Iftekhairul AlamView Answer on Stackoverflow
Solution 17 - C#ankushnarulaView Answer on Stackoverflow
Solution 18 - C#EnocNRoll - AnandaGopal PardueView Answer on Stackoverflow
Solution 19 - C#MRFerociusView Answer on Stackoverflow