This topic demonstrates how to start an audio conversation using .NET managed code with Microsoft Lync 2010 SDK.
Prerequisites
For a list of prerequisites, see Walkthrough: Start an Instant Message Conversation .
Creating the Audio Conversation Application
To start an audio conversation, get a
To create the audio conversation application
-
Sign in to Microsoft Lync 2010.
-
In Microsoft Visual Studio development system, create a new Windows Forms application.
-
Select .NET Framework 3.5 or 4.0 as the target framework. For more information, see the MSDN topic How to: Target a Specific .NET Framework.
-
Add a reference to the assembly Microsoft.Lync.Model.
-
In Form1.cs add the following using statement.
Copy Code using Microsoft.Lync.Model; using Microsoft.Lync.Model.Extensibility;
-
In the Form1_Load event handler add the following code.
Copy Code // Create the major API automation objects. Automation _Automation = LyncClient.GetAutomation(); // Create a dictionary object to contain UiaConversationContext data pairs. Dictionary<AutomationModalitySettings, object> _ModalitySettings = new Dictionary<AutomationModalitySettings, object>(); // Create a generic List object to contain the URI to call. // Edit this to provide a valid URI. List<string> inviteeList = new List<string>(); inviteeList.Add("elise@contoso.com"); // Start the conversation. IAsyncResult ar = _Automation.BeginStartConversation( AutomationModalities.Audio , inviteeList , _ModalitySettings , null , null); _Automation.EndStartConversation(ar);
-
Build and run the application.
-
Hear the ringtone from Microsoft Lync 2010 on the calling computer. See the accept call request on the computer you called.