1 / 36

Upgrading your Applications to UCMA 4.0

Upgrading your Applications to UCMA 4.0. Session Objectives. What’s new in UCMA 4.0 Writing asynchronous code using Async CTP Building workflow solutions with UCMA . Agenda. Overview. What’s new in UCMA 4.0. Async CTP. Replacing UCMA Workflow. Upgrading your Applications to UCMA 4.0.

hosea
Download Presentation

Upgrading your Applications to UCMA 4.0

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Upgrading your Applications to UCMA 4.0

  2. Session Objectives • What’s new in UCMA 4.0 • Writing asynchronous code using Async CTP • Building workflow solutions with UCMA

  3. Agenda Overview What’s new in UCMA 4.0 Async CTP Replacing UCMA Workflow Upgrading your Applications to UCMA 4.0

  4. Overview

  5. Unified Communications Managed API • Build communications solutions • Help Desk / Call Center / Contact Center • Server assisted communications • IVRs / virtual personal assistants • Conferencing • Notification systems • Web chat

  6. UCMA 3.0 Highlights Conferencing • Conference scheduling and management • Conference join and lobby experience • Back-to-back calls • Trusted participant Audio Routes • Full control of media routing between participant endpoints • Enables advanced communications scenarios • Supervisor monitor • Supervisor whisper • Supervisor barge-in Context Channel • Communication channel between UCMA app and Silverlight extensibility app • Launch with initial context • Send and receive context data • Can replace WCF-based communication mechanism Management PowerShell cmdlets to create and manage UCMA trusted applications and endpoints. Autoprovisioning Application settings replicated to trusted application pools. Very easy UCMA application startup code. Quality and Resiliency Guarantee quality of service using new server role. KPIs for health indicators. DNS load balancing.

  7. Agenda Overview What’s new in UCMA 4.0 Async CTP Replacing UCMA Workflow Upgrading your Applications to UCMA 4.0

  8. What’s new in UCMA 4.0

  9. Platform Investments • Lots of investment in new features in 2.0 and 3.0 • Deployment • Performance • Web and mobile optimizations

  10. The Rise of the Cloud, Mobility, and the Real-Time Web 2010 2011 2013 2012 Microsoft Office 2013 Cumulative Update 4

  11. Speech Speech in UCMA • Upgraded to use Speech 11 • More TTS voices • 16KHz audio for most TTS voices • VXML SDK will work with Speech 11

  12. Setup and Development Setup • Support for silent runtime installs Development • .NET 4 Support for Async Task Framework

  13. UCMA Workflow SDK Support • UCMA Workflow SDK will not ship in Lync 2013 • Support existing applications in a co-existence environment • UCMA Workflow SDK 3.0 application running Lync 2010 server • Users honed on Lync 2013 server • Users able to connect to legacy application Guidance • Build using UCMA core • Leverage VXML

  14. Agenda Overview What’s new in UCMA 4.0 Async CTP Replacing UCMA Workflow Upgrading your Applications to UCMA 4.0

  15. Working with Async CTP

  16. Programming with Async CTP • IAsyncResult pattern is verbose and hard to follow • Easier syntax for writing asynchronous code • Add-on for .NET 4.0 • Go-live license available • Native in .NET 4.5

  17. Starting a Collaboration Platform – IAsyncResult • try • { • _platform.BeginStartup(startupAsyncResult => • { • try • { • _platform.EndStartup(startupAsyncResult); • Console.WriteLine("Started platform."); • EstablishEndpoint(); • } • catch (RealTimeException ex) • { • throw(ex); • } • }, • null); • } • catch (InvalidOperationException ex) • { • throw(ex); • }

  18. Starting a Collaboration Platform – Async • varplatformSettings = new ProvisionedApplicationPlatformSettings(_applicationName, _applicationId); • _platform = new CollaborationPlatform(platformSettings); • await _platform.StartUpAsync(); • Console.WriteLine("Platform started."); • varendpointSettings = new ApplicationEndpointSettings(_applicationEndpointURI, _lyncServer, _lyncServerPort); • _endpoint = new ApplicationEndpoint(_platform, endpointSettings); • await _endpoint.EstablishAsync(); • Console.WriteLine(“Application Endpoint established.");

  19. Creating Async Tasks Extension Methods • Create Task that represents pair of BeginX and EndX methods • Specify Begin operation • Specify End operation • Set parameters • Set asynchronous state

  20. Creating an Async Task – Start Collaboration Platform • using System.Threading.Tasks; • … • public static Task StartUpAsync(this CollaborationPlatform platform) • { • if (platform == null) • { • throw new ArgumentNullException(); • } • return Task.Factory.FromAsync(platform.BeginStartup, platform.EndStartup, null); • } • … • await _platform.StartUpAsync();

  21. Creating an Async Task – Establish Instant Message Call • public static Task<CallMessageData> EstablishAsync( • this Call call, • string destinationUri, • CallEstablishOptionsoptions) • { • if (call == null) • { • throw new ArgumentNullException(); • } • return Task<CallMessageData>.Factory.FromAsync( • call.BeginEstablish, • call.EndEstablish, • destinationUri, • options, • null); • }

  22. Exception Handling • try • { •      await _platform.StartupAsync(); • } • catch (InvalidOperationException ex) • { • Console.WriteLine(ex;) • } • catch (RealTimeException ex) • { • Console.WriteLine(ex;) • }

  23. Developing with Async Scenarios • Run Tasks in sequence • Run Tasks in parallel • WhenAll Tasks complete • WhenAny Tasks complete

  24. Developing UCMA Applications with Async CTP

  25. Agenda Overview Topic 1 Async CTP Replacing UCMA Workflow Upgrading your Applications to UCMA 4.0

  26. Replacing UCMA Workflow SDK Applications

  27. UCMA Workflow SDK Positives • Easy to develop with • Visual design surface • Handles underlying plumbing Negatives • Media is expensive • Scalability • Have to write straight UCMA code often

  28. Building a Workflow Application with UCMA Core

  29. Speech Synthesis • varsynthConnector = new SpeechSynthesisConnector(); • PhoneMenuCallController.SpeechSynthesizer = new SpeechSynthesizer(); • var format = • new SpeechAudioFormatInfo( • 16000, • AudioBitsPerSample.Sixteen, • Microsoft.Speech.AudioFormat.AudioChannel.Mono); • PhoneMenuCallController.SpeechSynthesizer.SetOutputToAudioStream(synthConnector.Stream, format); • synthConnector.AttachFlow(PhoneMenuCallController.AVCall.Flow); • synthConnector.Start(); • … • PhoneMenuCallController.SpeechSynthesizer.SpeakAsync( • "Thank you for calling the phone menu sample app! " • + "Press 1 to speak to an agent, or 2 to repeat this menu.");

  30. Handling Tones • PhoneMenuCallController.ToneController.ToneReceived • += new EventHandler<ToneControllerEventArgs>(ToneController_ToneReceived); • … • void ToneController_ToneReceived(object sender, ToneControllerEventArgs e) • { • PhoneMenuCallController.SpeechSynthesizer.SpeakAsyncCancelAll(); • if (e.Tone == 1) • { • // do something • } • }

  31. Building a Simple Phone Menu with UCMA

  32. Agenda Overview What’s new in UCMA 4.0 Async CTP Replacing UCMA Workflow Upgrading your Applications to UCMA 4.0

  33. Key takeaways • Platform investments in web, deployment, and performance • Writing asynchronous code using Async CTP • Replacing UCMA Workflow SDK applications

  34. thank you

  35. © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

  36. Building Blocks Unified Communications Web API VoiceXML UCMA 4.0 Core API UCMA Server Speech API Media Stack Microsoft.Speech SIP Layer Lync Server 2010 Infrastructure

More Related