Learn about the Microsoft Lync Server 2013 SDK LoggingNotice sample application.
By default, the LoggingNotice application is copied to the %progfile%\Microsoft Lync Server 2013\SDK\Samples\LoggingNotice folder. LoggingNotice and related code samples can also be downloaded from the MSDN Code Gallery.
The LoggingNotice application that is distributed with the Lync Server 2013 SDK shows how to implement stateful application logic and message modification. The application maintains dialog state, and appends text to the first IM in each session.
Session state is maintained in a Hashtable and indexed by call-id. An incoming ACK moves a dialog to the modify-IM state, where incoming IM messages are appended with warning text until all parties in the conversation are notified. A separate session-participant table is used to determine the parties that have already been notified, so that each party is notified one time only. When all parties in a session are notified, the session state is deleted.
Clients that create a session and never send a message move the LoggingNotice application to the leak state.
Testing the application
If necessary, copy the %progfile%\Microsoft Lync Server 2013\SDK\Samples\LoggingNotice folder to a Microsoft Lync Server 2013 computer on which the application runs.
To build the application
Open a command console in a user account that has elevated permission.
Open the %progfile%\Microsoft Lync Server 2013\SDK\Samples folder.
Use the following command to build the application.
MS-DOS Copy code
To run the application
Log on to a Lync Server 2013 RTC Server Applications local security group account.
Copy the LoggingNotice.exe, LoggingNotice.exe.config, and LoggingNotice.am files to the %progfile%\Microsoft Lync Server 2013\Server\Core directory.
Register the application by running the following commands in a Lync Server Management Shell window.
<lync.Server.Fdqn>is the placeholder for the fully qualified domain name for the test server.
Windows PowerShell Copy code
new-csServerApplication -uri " http://www.microsoft.com/LC/SDK/Samples/LoggingNotice" -identity "service:registrar:<lync.Server.Fdqn>/LoggingNotice" -critical $false -priority 6 -enabled $true
You must register the application before the managed code is invoked.
Start the application by using the LoggingNotice.exe program.
In two active client sessions, add each client to the other client contact list, if not already present. Start a new IM session and then send messages in both directions. The following text appears in the first IM message that is sent to each client:
(*** This conversation may be logged. ***)