This project is read-only.

Using SipSourcery as a Call Control

Sep 23, 2010 at 5:50 PM
I tried playing around with SIPSorcery.SoftPhone.  I simply wanted to connect to the PBX and have it be able to either generate phone calls or accept them.  I could not figure out how, as there is STUN involved, which I do not need (since this is all on the internal network).  Do you have a sample that does this?
But overall, I am trying to do call control without being an endpoint (e.g. extension).  For instance, I have 2 extensions: Bob and Alice (these are 2 physical VOIP phones).  I have an app running on my PC where I would like to detect when Bob calls Alice.  When that happens, I want to pick up the phone for Alice programmatically.  The idea is that Alice can either pick up the physical handset or click something on the screen that would force the phone to go off hook.  I actually have this functionality implemented right now with TAPI, but the client is looking to switch to SIP.  Can SIP even do what I am asking?


Sep 24, 2010 at 12:00 AM

You can deactivate STUN by simply removing the STUN server setting in the configuration file. Either way it won't play a part in what you are trying to do as STUN comes into play only when mangling the SDP contained in a SIP INVITE request.

SIP can do the 3rd party call control. In fact I have written a switchboard application that does something simlar to waht you've described, unfortunately it's not open source. You are welcome to have a look at it in order to see what sort of call control you can do with SIP but you need an account on see and


Oct 5, 2010 at 4:57 AM


Thanks.  I do not have an account to the switchboard and it was unclear how to get one.  I understand you are not at liberty to share the source for a 3rd party call control, but can you at least explain how it is done?  The only thing that I've found online is a research paper from AT&T folks ( ).

The part that I am particularly interested in is from my previous example with Bob and Alice.  It is unclear to me, how, using your SipSourcery libraries, you can detect when Alice picked up the physical VOIP phone (when someone calls her).

Also, if you could share some of the resources you used to learn SIP, it would be appreciated as well.




Oct 5, 2010 at 11:18 AM
Edited Oct 5, 2010 at 11:22 AM

The way to detect Alice has picked up her phone is using SIP event notifications, have a look halfway down the SIP Sorcery Standards Support page to see which RFC's I've done some work on implementing in this project. The way it works is that a different SIP useragent, call it the controller, can subscribe for event notifications related to Alice's SIP user agent and then when Alice does something the controller user agent gets a SIP NOTIFY request.

The main resource I used to learn SIP was the RFC's. The also has some helpful SIP call ladders.

As for the sipsorcery switchboard it's Silverlight application that acts as the controller useragent in the previous example. The really cool thing, at leat IMHO, is that with Silverlight I can have the sipsorcery SIP stack running client side in the browser and it sits there receiving the SIP NOTIFY requests letting the user know what's going on with the other useragents it's subcribed to for notifications. If you would like to check out the Switchboard send me an email to and I'll create a sipsorcery switchboard only account for you.

Dec 14, 2010 at 1:05 PM


I am interested in same functionality.Did you found the way how make call conrol via SIP in c#?