问题
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.
回答1:
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.
回答2:
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.
回答3:
Here are a couple I came across:
http://www.independentsoft.com/sip/index.html
http://voipengine.googlepages.com/sipeksdk
回答4:
My sipsorcery project is another option. It contains a SIP stack written completely in C#.
回答5:
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)
回答6:
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.
回答7:
Looks like a decent starting point might be this CodeProject article. I don't believe it handles the media stream, however.
回答8:
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.
回答9:
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
回答10:
Konnetic provide fully managed SIP components for .NET development.
Their .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
回答11:
Perhaps you want to try lumisoft. Entirely build in C#. Completely open source and free. lumisoft
回答12:
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.
回答13:
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#.
回答14:
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.
回答15:
The best i found was VoIP Video SIP SDK It provide as well video with high quality
回答16:
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.
回答17:
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
回答18:
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.
回答19:
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.
来源:https://stackoverflow.com/questions/498056/c-sharp-sip-stack-library