Export (0) Print
Expand All

Transferring a Call (UCMA 3.0 Core SDK)

This topic discusses attended, supervised, and unattended call transfers for a two-party audio/video conversation.

Note Note

Only the AudioVideoCall class provides call transfer functionality.

The process of a call transfer involves three participants:

  • The Transferor is the participant who initiates the transfer.

  • The Transferee is the participant who is transferred from the primary call to the transferred call.

  • The Transfer Target is the participant to whom the Transferee is transferred.

After the primary call is established, either participant can transfer the call. To accomplish a transfer, the Transferor sends a REFER message to the Transferee, causing the Transferee to send an INVITE to the Transfer Target participant.

The platform monitors the progress of an attended transfer and completes the transfer only after receiving a successful REFER notification.

The following code demonstrates an attended call transfer (also known as a basic transfer).


CallTransferOptions basicTransferOptions = new CallTransferOptions(CallTransferType.Attended);
call.BeginTransfer(target, basicTransferOptions, userCallback, state);

A supervised transfer is a type of attended transfer in which the transferor establishes a call to the number being transferred to, and then provides that call as an argument to BeginTransfer. For a supervised transfer, the REFER message contains a Replaces header that specifies the call to be replaced. The following code demonstrates a supervised call transfer.

Note Note

Because the default CallTransferType is Attended, call transfers of this type can pass null as the second parameter of the BeginTransfer(Call, CallTransferOptions, AsyncCallback, Object) call.


CallTransferOptions supervisedTransferOptions = new CallTransferOptions(CallTransferType.Attended);
call.BeginTransfer(callToReplace, supervisedTransferOptions, userCallback, state);

For an unattended transfer, the platform completes the transfer and terminates the primary call immediately after receiving a "REFER Accepted" message from the Transferee. At this time, the Transferee has already sent an INVITE to the Transfer Target specified by the REFER message, and must independently go through the process of establishing a new call with the Transfer Target. The platform terminates the primary call without waiting for an INVITE success or failure notification from the Transfer Target. The following code demonstrates the unattended transfer (also known as a blind transfer).


CallTransferOptions unattendedTransferOptions = new CallTransferOptions(CallTransferType.UnAttended);
call.BeginTransfer(target, unattendedTransferOptions, userCallback, state);

The Call base class exposes protected methods to handle the incoming transfer and monitor the progress of the transfer. Derived classes can support transfer functionality by overriding the methods and exposing the event handler to the application.

Transfer method

Description

HandleTransferReceived(CallTransferReceivedEventArgs)

Handles a transfer received event in a class derived from the Call class.

protected abstract void HandleTransferReceived(CallTransferReceivedData e)

HandleTransferNotificationReceived(TransferStateChangedEventArgs)

Handles a transfer notification received event in a class derived from the Call class.

protected abstract void HandleTransferNotification(ReferStateChangedEventArgs e)

BeginTransfer(Call, CallTransferOptions, AsyncCallback, Object)

Initiates a transfer request to the remote participant of the current call to replace an existing call in Attended mode.

protected IAsyncResult BeginTransfer(Call callToReplace, CallTransferOptions callTransferOptions, AsyncCallback userCallback, object state)

BeginTransfer(String, CallTransferOptions, AsyncCallback, Object)

Initiates a transfer request to the remote participant to transfer the given transfer target in Attended or Unattended mode.

protected IAsyncResult BeginTransfer(string targetUri, CallTransferOptions callTransferOptions, AsyncCallback userCallback, object state)

EndTransfer(IAsyncResult)

Determines whether the corresponding transfer operation completed successfully.

This method waits if the operation has not yet completed.

CallMessageData EndTransfer(IAsyncResult)

Show:
© 2014 Microsoft