Programming for Unified Communications with Microsoft® Office Communications Server 2007 R2

Book description

Exploit the Unified Communications (UC) platform's rich and open API set and create your own real-time communication solutions faster. Led by a team of UC programming experts, you'll get the code walkthroughs and pragmatic advice you need to seamlessly integrate enterprise IM, presence, VoIP, and conferencing into your applications now. Connect users exactly how and when they want and increase business agility Examine the architecture, design model, and scenarios for each API matching the right functionality to your needs Automate Office Communicator features sign-in, contacts, presence, conversations Use contextual collaboration to send and receive application-specific messages between clients Develop Windows Workflow applications that support both voice and IM Create and provision custom presence applications Build server-side applications that maximize throughput and enable multiparty conferencing Prepare your application for deployment Apply best practices for debugging and troubleshooting.

Table of contents

  1. Programming for Unified Communications with Microsoft® Office Communications Server 2007 R2
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. Foreword
    3. Acknowledgments
      1. Personal Acknowledgments
    4. Introduction
      1. Why We Wrote This Book
      2. What This Book Is About
      3. Who This Book Is For
      4. Companion Content
      5. Hardware and Software Requirements
        1. Servers
          1. Hardware
          2. Operating System
        2. Client Computers
          1. Hardware
          2. Operating System
      6. Database Requirements
        1. Office Communications Server 2007 R2
        2. Administrative Tools
        3. Development Tools
        4. Sample Test Topology
      7. Find Additional Content Online
      8. Support for This Book
        1. Questions and Comments
    5. I. Understanding Unified Communications
      1. 1. Microsoft Unified Communications
        1. Unified Communications: Challenges and Opportunities
          1. Challenges in Unified Communications
          2. Opportunities in Unified Communications
        2. The Unified Communications Platform
        3. Unified Communications APIs
          1. Programming Office Communications Client Applications
          2. Programming Office Communications Server Applications
        4. Summary
        5. Additional Resources
      2. 2. Microsoft Unified Communications APIs Foundation
        1. Unified Communications Managed API 2.0
          1. Scenarios
          2. Considerations
          3. API Architecture
            1. UCMA 2.0 Core API
            2. UCMA 2.0 Speech API
          4. Object Model
        2. UCMA 2.0 Workflow API
          1. Scenarios
          2. Windows Workflow Foundation
          3. Considerations
          4. Workflow Architecture
          5. Object Model
        3. Office Communicator Automation API
          1. Scenarios
          2. Considerations
          3. Application Architecture
          4. Object Model
            1. The Messenger Class
              1. Messenger class interfaces
              2. Specialized Messenger class interfaces
            2. The MessengerPriv Class
        4. Unified Communications Client API
          1. Scenarios
          2. Considerations
          3. Application Architecture
          4. The UCC API Object Model
        5. Unified Communications AJAX API
          1. Scenarios
          2. Considerations
          3. Application Architecture
          4. XML Model
            1. cwaRequests
            2. cwaResponses
            3. cwaEvents
        6. Office Communications Server 2007 Speech Server Developer Edition
          1. Scenarios
          2. Considerations
          3. Application Architecture
            1. Application Components
              1. ASP.NET Components
              2. Web Server Components
            2. Object Model
            3. Speech Server API
        7. Summary
        8. Additional Resources
    6. II. Office Communicator Automation API
      1. 3. Programming a Microsoft Office Communicator Automation API Application
        1. Signing In to and Out of Office Communicator
          1. Using the Messenger Class
          2. Determining Whether Office Communicator Is Running
          3. Checking Local User Status
          4. Signing In to Office Communicator
            1. Messenger.Signin() Method
            2. Messenger.AutoSignin() Method
            3. Messenger.OnSignin Event
          5. Signing Out of Office Communicator
            1. Messenger.Signout() Method
            2. Messenger.OnSignout Event
            3. Messenger.AppShutdown Event
          6. Putting It All Together
        2. Working with Contact Information and Contact Presence
          1. Displaying Local User Information
            1. Messenger.MySigninName Property
            2. Messenger.MyFriendlyName Property
            3. Messenger.OnMyFriendlyNameChange Event
            4. Messenger.get_MyPhoneNumber Property
            5. Messenger.OnMyPhoneChange Event
            6. Putting It All Together
          2. Retrieving Contact Information
            1. Messenger.GetContact() Method
            2. Getting Contact Information
            3. Messenger.OnContactFriendlyNameChange Event
            4. Messenger.OnContactPhoneChange Event
            5. Putting It All Together
          3. Publishing and Subscribing to Contact Presence
            1. IMessengerContactAdvanced.PresenceProperties Property
            2. Messenger.OnMyStatusChange Event
            3. Messenger.OnContactStatusChange Event
          4. Putting It All Together
        3. Working with the Office Communicator Contact List
          1. Messenger.MyContacts Property
          2. IMessengerContacts.Item() Method
          3. Messenger.AddContact() Method
          4. IMessengerContacts.Remove() Method
          5. Messenger.OnContactListAdd Event
          6. MessengerOnContactListRemove Event
          7. Putting It All Together
        4. Starting Conversations
          1. Using the IMessengerAdvanced Interface
            1. IMessengerAdvanced.StartConversation() Method
          2. Putting It All Together
        5. Summary
        6. Additional Resources
      2. 4. Embedding Contextual Collaboration
        1. Introduction to Contextual Collaboration
        2. Scenario
        3. Business Value
        4. Choice of Technology
        5. Test Environment
        6. Overall Code Structure
          1. Displaying Application-Specific Contact Lists
            1. Displaying User Presence with MyPersona
            2. Displaying Application-Specific Context Menus with PersonaList
            3. Putting It All Together: Displaying an Application-Specific Contact List with Contact Presence
          2. Starting Application-Specific Conversations
            1. IMessengerAdvanced.StartConversation()
            2. Receiving Notification of New Conversations
            3. Receiving Notification of Destroyed Conversations
            4. Sending IM Text to Conversations
            5. Putting It All Together: Sending Application IM Text to Your Conversation
          3. Accepting Application-Specific Conversations
            1. Retrieving Text from IM Conversations
            2. Putting It All Together: Receiving Application-Specific Conversations with IMessengerAdvanced
            3. Testing the Application
        7. Summary
        8. Additional Resources
    7. III. Unified Communications Managed API Workflow
      1. 5. Unified Communications Managed API (UCMA) Workflow
        1. UCMA Workflow
          1. Using Project Templates
          2. Selecting a Workflow Language
          3. Using Workflow Designer
          4. Workflow Runtime Services
            1. CommunicationsWorkflowRuntimeService
            2. TrackingDataWorkflowRuntimeService
          5. General Activities
            1. CommunicationsSequenceActivity
              1. Acting as a Container
              2. Providing custom views for dialog functionality
              3. Enabling the use of the Goto activity
              4. Providing a call to its children activities to execute
              5. Binding to a CallProvider property
              6. Using CallProvider to support multiple calls
              7. Using CallProvider in nested CommunicationsSequenceActivity
            2. The Goto Activity
          6. Call Control Activities
            1. The AcceptCall Activity
            2. The DisconnectCall Activity
            3. The OutboundCall Activity
            4. The BlindTransfer Activity
          7. Dialog Activities
            1. The SpeechStatement Activity
              1. Playing a message
            2. The SpeechQuestionAnswer Activity
              1. Asking a question
              2. Recognizing user responses
              3. Specifying expected inputs
              4. Specifying the grammar file
            3. InstantMessagingStatementActivity
              1. Setting the prompt
            4. InstantMessagingQuestionAnswerActivity
              1. Asking an IM question
              2. Recognizing the user’s text response
              3. Specifying expected inputs
              4. Specifying the grammar file
          8. Command Activities
            1. SpeechCommandActivity
            2. SpeechHelpCommandActivity
            3. SpeechRepeatCommandActivity
            4. InstantMessagingCommandActivity
            5. InstantMessagingHelpCommandActivity
          9. Call Control Communications Event Activities
            1. CallDisconnectedEventActivity
            2. CallOnHoldEventActivity
            3. CallOnHoldTimeoutEventActivity
            4. CallRetrievedEventActivity
          10. Dialog Communications Event Activities
            1. ConsecutiveNoInputsSpeechEventActivity
            2. ConsecutiveSilencesSpeechEventActivity
            3. ConsecutiveNoRecognitionsSpeechEventActivity
            4. ConsecutiveNoInputsInstantMessagingEventActivity
            5. ConsecutiveSilencesInstantMessagingEventActivity
            6. ConsecutiveNoRecognitionsInstantMessagingEventActivity
          11. Presence-Related Activity
            1. GetPresenceActivity
        2. Summary
        3. Additional Resources
      2. 6. Business Process Communication
        1. Scenario
        2. Business Value
        3. Choice of Technology
        4. Overall Code Structure
        5. Test Environment
        6. Building the Application
          1. Task 1: Create a New Communication Workflow Project
          2. Task 2: Configure the Application to Connect to Office Communications Server
          3. Task 3: Allow User Input to the Workflow Instance
          4. Task 4: Get the Approver’s Presence Information
          5. Task 5: Implement Branching Logic Based on the Approver’s Presence
          6. Task 6: Update cantBeContactedBranch
          7. Task 7: Update canBeContactedBranch
            1. Task 7.1: Create Branches for Different Modalities
            2. Task 7.2: Contact the Approver by Phone
              1. Task 7.2.1: Place an Outbound Phone Call to the Approver
              2. Task 7.2.2: Bind the Outbound Phone Call to a CommunicationsSequenceActivity
              3. Task 7.2.3: Play an Introductory Message
              4. Task 7.2.4: Prompt the Approver for an Action and Recognize Speech or DTMF Input
              5. Task 7.2.5: Branch the Responses Based on the Approver’s Action
              6. Task 7.2.6: Define Approve and Decline Actions
            3. Task 7.3: Contact the Approver by IM
              1. Task 7.3.1: Place an Outbound IM Call to the Approver
              2. Task 7.3.2: Bind the Outbound IM Call with a CommunicationsSequenceActivity
              3. Task 7.3.3: Send an Introductory IM Message
              4. Task 7.3.4: Prompt the Approver for an Action and Recognize IM Input
              5. Task 7.3.5: Branch the Responses Based on the Approver’s Input
              6. Task 7.3.6: Define Approve and Decline Actions
            4. Task 7.4: Add Commands to the Dialog
              1. Task 7.4.1: Add Commands to the Speech Dialog
              2. Task 7.4.2: Add Commands to the IM Dialog
            5. Task 7.5: Disconnecting the Call
            6. Task 7.6: Add Events to the Dialog
              1. Task 7.6.1: Add Events to the Speech Dialog
              2. Task 7.6.2: Add Events to the IM Dialog
            7. Task 7.7: Add Call Events
          8. Task 8: Running the Application
        7. Summary
        8. Additional Resources
    8. IV. Unified Communications Managed API
      1. 7. Structure of a UCMA Application
        1. Creating a UCMA Application
          1. CollaborationPlatform
            1. Creating the Collaboration Platform for a Server Application
            2. Starting the Collaboration Platform
          2. Endpoints
            1. Using ApplicationEndpoint
            2. Using UserEndpoint
          3. Conversation, Call, and Call Flow
          4. Creating Calls
            1. Creating a Call
            2. Handling Incoming Calls
            3. Handling Call Flows
            4. Handling Call State and Incoming Message Events
          5. Conferences
            1. Scheduling a Conference
            2. Joining a Conference
          6. Publish and Subscribe to Presence
            1. Publishing Presence
            2. Subscribing to Presence
              1. Self Presence
              2. Presence from Other Users
        2. Summary
        3. Additional Resources
      2. 8. Publishing Custom Presence with UCMA
        1. Creating Custom Presence Categories
        2. Common Custom Presence Application Scenario
        3. Choice of Technology
        4. Overall Code Structure
        5. Test Environment
        6. Detailed Code
        7. Summary
        8. Additional Resources
    9. V. Debugging, Tuning, and Deploying Unified Communications Applications
      1. 9. Preparing the UC Development Environment
        1. UC Application Development Environment Components
          1. AD DS for Managing a Network
          2. Office Communications Server Roles
          3. UC APIs
            1. Office Communicator Automation API
            2. UCMA Core
            3. UCMA Workflow
        2. Deploying Office Communications Server Standard Edition
          1. Building an AD DS Forest
            1. Assigning Static IP Addresses for Domain Controller and Other Computers
            2. Promoting a Computer Running Windows Server to a Domain Controller
            3. Verifying that the DNS Server Role Is Running
            4. Installing a Domain CA
          2. Preparing AD DS for UC
            1. Extending AD DS Schemas
            2. Installing Office Communications Server Administrative Tools
            3. Verifying Extended AD DS Schemas
            4. Preparing the AD DS Forest
            5. Verifying Prepared Forest Settings
            6. Preparing the AD DS Domain
            7. Verifying Prepared Domain Settings
          3. Configuring DNS for Automatic Sign-In
            1. Creating a DNS SRV Record
            2. Verifying DNS Records Creation
          4. Setting Up the Office Communications Server Host Computer
            1. Joining the Server Running Office Communications Server to the Domain
            2. Verifying Office Communications Server Host Name Resolution
          5. Installing and Configuring Office Communications Server Standard Edition
            1. Becoming a Member of the RTCUniversalServerAdmins Security Group
            2. Installing the Web Server (IIS) Server Role
            3. Installing Office Communications Server Standard Edition
            4. Configuring Office Communications Server Standard Edition
            5. Installing and Configuring TLS/MTLS Certificates for Servers Running Standard Edition
            6. Configuring IIS Certificates for the Web Components Server Role
            7. Starting Office Communications Server Services
            8. Configuring Audio/Video and Web Conferencing
          6. Configuring UC User Accounts
            1. Creating a User Account in AD DS
            2. Enabling a User for Office Communications Server
            3. Verifying Replication of Users Enabled for Office Communications Server
            4. Configuring Users for Office Communications Server
          7. Validating Server Functionality
        3. Configuring Application Development Components
          1. Configuring the Office Communicator Automation API
            1. Installing Office Communicator
            2. Installing the Office Communicator Automation API SDK
            3. Generating Class and Interface IDs for Win32/C++ Office Communicator Automation API Applications
          2. Configuring UCMA Core
            1. Installing the UCMA SDK
            2. Enabling TLS or MTLS Connections
            3. Verifying That the Certificate Is Installed on the Application Hosting Computer
            4. Installing a Computer Certificate on a UCMA Application Host
            5. Enabling a Trusted Application
          3. Configuring UCMA Workflow
            1. Installing a Language Pack
        4. Summary
        5. Additional Resources
      2. 10. Debugging a Unified Communications Application
        1. Debugging in the UC Platform
          1. Sources of Errors and Failures
          2. Error Codes and Exception Classes
          3. Session Initiation Protocol Error Codes
          4. Tracing
          5. Debugging Tools for UC Applications
            1. Using Visual Studio Debugger
            2. Using Snooper
          6. Best Practice for Debugging or Troubleshooting a UC Application
        2. Debugging Office Communicator Automation API Applications
          1. Enabling Tracing
            1. Examining the Windows Event Log
            2. Examining Log Files
          2. Handling Exceptions Using HRESULT Error Codes
          3. Troubleshooting Office Communicator Automation API Applications
            1. Troubleshooting Automation API Assembly Initialization Failures
            2. Troubleshooting COM Interop Errors
            3. Troubleshooting Common Operational Failures
              1. Common sign-in failures
              2. Sign-in operations can fail because the server is unavailable
              3. Common presence failures
              4. Common audio and phone calling failures
        3. Debugging UCMA Core Applications
          1. Enabling Tracing
            1. Enabling Tracing for UCMA Core Applications
          2. Handling Exceptions Using the UCMA Core Exception Model
          3. Debugging UCMA Core Applications
            1. Troubleshooting Application Initialization Failures
            2. Troubleshooting Endpoint Connection Failures
            3. Troubleshooting Conversation Failures
        4. Debugging UCMA Workflow Applications
          1. Enabling Tracing
          2. Handling Exceptions Using the Fault Handler Activity
          3. Debugging UCMA Workflow Applications
            1. Stepping Through the UC Workflow
            2. Catching and Handling Custom Exceptions
        5. Summary
        6. Additional Resources
    10. Glossary
    11. About the Authors
    12. Index
    13. SPECIAL OFFER: Upgrade this ebook with O’Reilly

Product information

  • Title: Programming for Unified Communications with Microsoft® Office Communications Server 2007 R2
  • Author(s): Rui Maximo, Kurt De Ding, Vishwa Ranjan, Chris Mayo, Oscar Newkerk, Micosoft Office Communications Server Team
  • Release date: May 2009
  • Publisher(s): Microsoft Press
  • ISBN: 9780735626232