کد:
http://www.lcs-guides.com/sipsnoop

SIPSnoop uses the LCS 2005 API to receive all messages that the Live Communications Server processes. SIPSnoop will display the contents of the messages along with the appropriate headers.
It’s a great tool if you are interested in tracking your LCS’s statistics.
In order to compile, install and run SIPsnoop you need to install the LCS 2005 SDK.
We’ll start off by making sure that we have all three prerequisites for running SIPSnoop:

  • Install .NET framework v1.1.4322


    • Download .NET framework from HERE.
    • Double click the file you have just downloaded and install it by following the installation wizard.
    • Restart your computer and after the Installation, make sure you have a folder called “v1.1.4322” in %WINDIR%Microsoft.NETFramework


  • Add %WINDIR%Microsoft.NETFrameworkv1.1.4322 to the system PATH


    • Right click “My Computer” and press “Properties”
    • Go to the “Advanced” tab.
    • Click “Environment Variables”
    • Under “System Variables” double click “Path”
    • In the “Variable value” space, go to the end of the line and add the ‘;’ (without the ‘ signs)
    • Make sure you have no spaces between the last value and the ‘;’ sign, and add ‘%WINDIR%Microsoft.NETFrameworkv1.1.4322’ (withouht the ‘ signs)
    • Again – make sure you have no spaces!
    • Click OK three times to close all windows.


  • Copy the serveragent.dll to the SIPSnoop root dir BEFORE compiling the EXE.


    • After you install the LCS 2005 SDK, you will have a folder called SDK inside …Program FilesMicrosoft LC 2005. Inside that folder there should be a “Bin” folder, and in there you should have “serveragent.dll”
    • for the purposes of this tutorial we’ll assume that you are going to compile SIPSnoop in the original SDK directory – which is …Program FilesMicrosoft LC 2005SDKSamplesSipSnoop)
    • Copy “serveragent.dll” to the SipSnoop directory

We’ll move on to registering and compiling SIPSnoop.

  • Assuming you have a properly installed, and RUNNING LCS 2005 environment (which you should) you are ready to register the SIPSnoop application with LCS. In order to do so, do the following on the enterprise server:


    • Copy “RegApp.exe” from your “…Program FilesMicrosoft LC 2005SDKTools” folder, into the “… Program FilesMicrosoft LC 2005SDKSamplesSipSnoop” folder.
    • Open a command prompt (start – run) and type “cmd”, then click OK. You should get a “dos” window
    • CD to “… Program FilesMicrosoft LC 2005SDKSamplesSipSnoop”
    • Run the following command (without the ‘ signs): ‘RegApp.exe /i sipsnoop.am’
    • SIPSnoop should now be registered. You should be able to see it in your LCS management console – under your server, under applications.


  • Now lot’s compile the EXE


    • Open a “dos” window (as per section 1.b – above)
    • CD to “…Program FilesMicrosoft LC 2005SDKSamples”
    • Run the following command (without the ‘ signs): ‘compile sipsnoop’
    • It should return – “Build Successful”

Let’s Finalize a few settings... (VERY CRUCIAL STAGE)

  • Assuming you followed Microsoft’s instructions correctly – your Enterprise server should be running on a Server that is not a Domain Controller, which means that you still have to add the user you intend to run SIPSnoop with, to the LOCAL “RTC Server Applications” group. You can do this by right clicking “My Computer” and choosing “Manage”. Then, in “Local users and groups, find the RTC Server Applications Group, Double click it and press Add. locate the DOMAIN user you intend to run the application with. for example - if I intend to run the Application with the Administrator account - I have to add DomainAdministrator to the members of the RTC Server Applications group.
  • Log off, and log back in with the user you chose.

Run SipSnoop.exe

  • in “… Program FilesMicrosoft LC 2005SDKSamplesSipSnoop” you should have a file called SipSnoop.exe.
  • Double click that file
  • Click “Connect to Server”
  • If everything is OK and SipSnoop connects to the server, you should see a message “Connect Success”

Now you can see detailed stats about what’s going on with your server.
Enjoy