Export (0) Print
Expand All

How to: Start Automation Audio Conversations

[This is preliminary documentation and is subject to change.]

This topic shows how to start an audio conversation using .NET Framework managed code with Microsoft Lync 2013 Preview SDK.

To start an audio conversation, get a Microsoft.Lync.Model.Extensibility.Automation object, create IEnumerable objects to contain a URI or a phone number, set instances of Microsoft.Lync.Model.Extensibility.AutomationModalities and Microsoft.Lync.Model.Extensibility.AutomationModalitySettings, and then call the Automation.BeginStartConversation method.

To create the audio conversation application

  1. Sign in to Microsoft Lync 2013 Preview.

  2. In Microsoft Visual Studio development system, create a new Windows Forms application.

  3. 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.

  4. Add a reference to the assembly Microsoft.Lync.Model.

  5. In Form1.cs add the following using statement.

    using Microsoft.Lync.Model;
    using Microsoft.Lync.Model.Extensibility;
  6. In the Form1_Load event handler add the following 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>();
    // Start the conversation.
    IAsyncResult ar = _Automation.BeginStartConversation(
        , inviteeList
        , _ModalitySettings
        , null
        , null);
  7. Build and run the application.

  8. Hear the ringtone from Microsoft Lync 2013 Preview on the calling computer. See the accept call request on the computer you called.

Other resources

Community Additions

© 2015 Microsoft