Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Using UCMA 3.0 BackToBackCall: Scenario Overview (Part 1 of 4)

Summary:   This is the first in a series of four articles on how to use the Microsoft Unified Communications Managed API (UCMA) 3.0 BackToBackCall class. The BackToBackCall class, which is new in UCMA 3.0, is the heart of a Helpdesk-type application. By using this class, you can create an application that presents a single Helpdesk entry point to your customers, which provides anonymity to the Helpdesk agents. A customer’s call can be routed to a single agent or to a conference consisting of multiple agents.

Applies to:   Microsoft Unified Communications Managed API 3.0 Core SDK | Microsoft Lync Server 2010

Published:   May 2011 | Provided by:   Mark Parker, Microsoft | About the Author

Contents

Download code   Download code

This article is the first in a four-part series of articles on how to use the BackToBackCall class.

One scenario that is supported by the BackToBackCall class is the Incoming-Idle scenario. Another scenario, Click-to-Call, is not discussed in this series of articles. In the Incoming-Idle scenario, a back-to-back (B2B) user agent waits for an incoming call to arrive. When the incoming call is received, the back-to-back user agent completes an outgoing call to an agent or a conference with multiple agents. In this scenario the outgoing call to the agent is in the Idle state (the call has not yet been established) when the incoming call arrives. The incoming call and the outgoing call form the two call legs of the back-to-back call, with the back-to-back user agent (represented by a BackToBackCall object) in the middle.

The call flow for an Incoming-Idle back-to-back call appears in Figure 1. The back-to-back user agent acts as the calling endpoint on the outgoing call leg, and as the receiving endpoint on the incoming call leg.

Figure 1. Incoming-Idle back-to-back call flow

BackToBackCall: Incoming-Idle Scenario
  1. Bob, a customer, calls the application. Bob’s incoming call is connected to the back-to-back user agent.

  2. The back-to-back user agent places an outgoing call to Carl, the agent, and instructs Carl to set up a media (audio) path between himself and Bob.

  3. Carl agrees to send audio to Bob.

  4. The back-to-back user agent instructs Bob to send audio to Carl.

  5. Audio is transferred directly between the customer and the agent, but SIP messages are transferred through the back-to-back user agent.

In the back-to-back call implementation that is discussed in these articles, a single customer is connected to a single agent. A BackToBackCall object can also be used to connect multiple customers to a single agent, or to connect a customer to multiple agents. In these situations the outgoing call leg connects the BackToBackCall object to a conference session. A conference session on the agent side can enable a manager to listen in on customer-agent interchanges to ensure quality, or can enable an expert to whisper advice (inaudible to the customer) to the agent.

The steps that are required to create a BackToBackCall instance appear in this section.

  1. Create a CollaborationPlatform instance.

  2. Create and establish an endpoint, by using the CollaborationPlatform instance that is created in step 1 and the appropriate endpoint settings.

  3. Call the RegisterForIncomingCall<TCall> method on the endpoint. This registers a delegate that will be called when an incoming call of the specified type arrives.

  4. Create a Conversation instance for the outgoing call (the call going to the agent).

  5. Create an AudioVideoCall instance for the outgoing leg.

    Important note Important

    Do not establish the outgoing call. When the BackToBackCall instance is created, the outgoing call must be in the Idle state (a member of the CallState enumeration). The outgoing call is established automatically when the BackToBackCall instance is established.

  6. Create a BackToBackCallSettings instance for the outgoing call leg. The BackToBackCallSettings instance for the incoming call leg can be created in the method that is called when an incoming call is received. This is the delegate that is registered in step 3.

  7. Define the delegate that will be called when an incoming call arrives. This method should perform the following tasks.

    1. Create a Conversation for the incoming call.

    2. Create the BackToBackCallSettings instance for the incoming call.

    3. Call the BackToBackCall constructor, passing the BackToBackCallSettings instances for the two call legs.

    4. Call the BeginEstablish method on the BackToBackCall instance.

      When the BackToBackCall enters the Established state, the BackToBackCall instance is ready to be used.

  8. Close the application by terminating both calls (using BeginTerminate on each call) and the conversation (using BeginTerminate), and shutting down the platform (using BeginShutdown).

The steps that are pertinent to creating a BackToBackCall instance appear in Using UCMA 3.0 BackToBackCall: Application Details (Part 2 of 4). All of the code for the application discussed in this series of articles appears in Using UCMA 3.0 BackToBackCall: Code Listing (Part 3 of 4).

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

Show:
© 2015 Microsoft