Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

Creating Call Center Applications with Unified Communications SDKs: Agent Application (Part 3 of 4)

Summary:   Learn how to use Unified Communications SDKs to implement speech synthesis, speech recognition, and call control technologies to create a simple call center application.

Applies to:   Microsoft Unified Communications Managed API (UCMA) 3.0 Core SDK or Microsoft Unified Communications Managed API 4.0 SDK | Microsoft Lync 2010 SDK | Microsoft Speech Platform SDK version (x64) 10.2

Published:   April 2012 | Provided by:   John Clarkson and Mark Parker, Microsoft | About the Author

Contents

Download code   Download code

Watch video   See video

This is the third in a series of four articles about how to create a call center application.

  • Microsoft Silverlight 4 SDK.

  • Microsoft Silverlight 4 Tools for Visual Studio 2010.

  • Microsoft Lync 2010 SDK.

  • On each computer that is running the deployed Microsoft Silverlight application:

    • Add the web server that is hosting the Silverlight application to the trusted sites list.

    • Sign in to the Microsoft Lync 2010 client.

Figure 1. XAML page and Silverlight controls

XAML page

The following XAML creates three labeled text boxes and a button. The button is attached to a Click event handler on the code-behind.

<Grid x:Name="LayoutRoot">
     <TextBox Height="23" HorizontalAlignment="Left" Margin="21,74,0,0" Name=" textBoxCustomerID" VerticalAlignment="Top" Width="120" />
     <TextBox Height="23" HorizontalAlignment="Left" Margin="21,128,0,0" Name=" textBoxCustomerName" VerticalAlignment="Top" Width="120" />
     <TextBox Height="23" HorizontalAlignment="Left" Margin="21,179,0,0" Name=" textBoxCustomerBalance" VerticalAlignment="Top" Width="120" />
     <TextBlock Height="23" HorizontalAlignment="Left" Margin="173,78,0,0" Name="textBlock1" Text="ID" VerticalAlignment="Top" />
     <TextBlock Height="23" HorizontalAlignment="Left" Margin="173,132,0,0" Name="textBlock2" Text="Name" VerticalAlignment="Top" />
     <TextBlock Height="23" HorizontalAlignment="Left" Margin="173,179,0,0" Name="textBlock3" Text="Balance" VerticalAlignment="Top" />
     <Button Click="GetUserInfo_Click"  Content="GetUserInfo" Height="23" HorizontalAlignment="Left" Margin="21,33,0,0" Name="button1" VerticalAlignment="Top" Width="75" />
</Grid>
  1. Get the Conversation object.

    Note Note

    The GetHostingConversation() method is available only in Silverlight applications.

    Conversation conversation = (Conversation)Microsoft.Lync.Model.LyncClient.GetHostingConversation();
    
  2. Use the GetApplicationData method to get the initial context data. For more information about the methods that you can use to get contextual data, see Working With Lync 2010 Contextual Data Methods and Events.

    string text = conversation.GetApplicationData(appId);
    
    
  3. Parse the data into a string array. The three fields are semi-colon delimited.

    char[] delimiter = { ';' };
    string[] custData = text.Split(delimiter);
    
    //Display the contents of array elements in the textboxes.
    textBoxCustomerID.Text = custData[0];
    textBoxCustomerName.Text = custData[1];
    textBoxCustomerBalance.Text = custData[2];
    
    

Create a GUID for the application, and create a registry entry using this GUID as the key. For information about how to create a GUID for the application, see Create GUID (guidgen.exe).

To identify the conversation, the applications at each end of the conversation (in this case the bot application and the agent application) must reference the same GUID. See the following sample registry entry for the bot application. For more information, see Application Registration for Lync 2010 Contextual Applications.

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Communicator\ContextPackages\{your application GUID}]
"InternalURL"="path to the Silverlight test page .html"
"Name"="CallCenterDemo"

Mark Parker is a programming writer at Microsoft Corporation. His principal responsibility is the UCMA SDK documentation.

John Clarkson is also a programming writer on the Microsoft Lync feature team.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.