Partager via


IRTCSession::Redirect

This method changes the type of session and profile for a redirected call. The application calls this method when an outgoing call is redirected. The method is used only when the session was created using the RTCCS_FAIL_ON_REDIRECT flag.

HRESULT Redirect(
  RTC_SESSION_TYPE enType,
  BSTR bstrLocalPhoneURI,
  IRTCProfile* pProfile,
  long lFlags
);

Parameters

  • enType
    [in] An RTC_SESSION_TYPE enumeration value specifying the type of session.
  • bstrLocalPhoneURI
    [in] The TEL Universal Resource Identifier (URI), which specifies the phone at which the local user will be called. This parameter is used only for phone-to-phone calls and must be NULL otherwise.
  • pProfile
    [in] Pointer to an IRTCProfile interface that specifies a provisioning profile to use for this session. It is used only when the RTCCS_FORCE_PROFILE flag is specified in lFlags. Otherwise, this parameter must be set to NULL, and the RTC API automatically chooses the best profile. If the RTCCS_FORCE_PROFILE flag is set and the parameter is NULL, no profile is used.
  • lFlags
    [in] An RTCCS_ constant specifying the profile used and the behavior for redirected users.

Return Values

This method can return an RTC_E_ constant. The following table shows the possible return values.

Value Description
RTC_E_INVALID_SESSION_STATE The session was not disconnected due to a redirect.

Remarks

The RTC Client API chooses the best profile from the list of enabled profiles. The profile that supports the session type and destination address is chosen. The application can obtain a pointer to IRTCProfile from IRTCClientProvisioning::EnumerateProfiles.

To initiate the redirected call or messaging session, the application must call the IRTCSession::AddParticipant method with the redirected address.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Rtccore.h, Rtccore.idl.
Link Library: Uuid.lib.

See Also

IRTCClientProvisioning::EnumerateProfiles | IRTCProfile | IRTCSession::AddParticipant | RTC_SESSION_TYPE

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.