tags:

views:

8355

answers:

16

I'm 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'm talking about the VOIP protocol SIP.

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

+2  A: 

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

Sean Bright
A: 

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

ankushnarula
unfortunately - it is also Avaya-centric.
ankushnarula
+3  A: 

Here are a couple I came across:

http://www.independentsoft.com/sip/index.html

http://voipengine.googlepages.com/sipeksdk

Xaisoft
A: 

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

AviD
A: 

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.

Eric Z Beard
+1  A: 

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 FreeSwitch. One feature they have is the ability to write extension code in Mono, which allows C#. Look for mod_mono support.

FreeSwitch

Mystere Man
I renamed it to mod_managed, and it now supports Mono and CLR. And FreeSWITCH can run embedded, which allows some other interesting scenarios.
MichaelGG
A: 

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.

EnocNRoll
+6  A: 

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.

JayG
+3  A: 

IMHO, one of the best stacks by far is PJSIP. It is written in very portable C and has a number of wrappers. Here is a .NET wrapper that works really well.

E Dominique
+2  A: 

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 facade) 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)

Ron Klein
A: 

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.

LB
A: 

Does the Office Communications Server SDK contains any components (dlls) that let you work with sip sessions without a OCS backend?

I am trying to get familiar with SIP programming in .NET but am not neccessarly only targeting OCS in the end?

Any other tips on frameworks are also appreciated, I am a C# guy so if its managed it would be much easier to get started. Thanks

JWendel
A: 

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.

MRFerocius
+1  A: 

Try Voice Elements www.voiceelements.com

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

Laura Williamson
+1  A: 

Konnetic provide fully managed SIP components for .NET development.

Their standard SIP SDK is available here: http://www.konnetic.com/products/products_sip_sdk_std.aspx

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

jnielsen
+1  A: 

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.

jwri