IRTCSession::Redirect

The Redirect method is called when an outgoing call is redirected. It enables the user to change the type of session and profile for the redirected call. It is used only when the session was created using the RTCCS_FAIL_ON_REDIRECT flag.

To initiate the redirected call or messaging session, you must call the AddParticipant method with the redirected address.

HRESULT Redirect(RTC_SESSION_TYPEenType,
BSTRbstrLocalPhoneURI,
IRTCProfile*pProfile,
longlFlags);

Parameters

  • enType
    [in] An RTC_SESSION_TYPE enumeration containing the type of session.
  • bstrLocalPhoneURI
    [in] A BSTR containing the TEL URI for the local user. This field is used only for phone-phone calls and must be NULL otherwise. The TEL URI specifies which phone the local user will be called at.
  • 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, it must be set to NULL and the 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] RTCCS_ flags to set the profile used and the behavior for redirected users.

Return Values

RTC methods may return an RTC_E_ constant.

Value Meaning
RTE_E_INVALID_SESSION_STATE The session was not disconnected due to 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. An IRTCProfile can be obtained from EnumerateProfiles.

Requirements

Client: Requires Windows XP.
Server: Requires Windows Server 2003.
Redistributable: Requires Rtcdll.dll on Windows 2000, and Windows Me/98.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCSession is defined as 387c8086-99be-42fb-9973-7c0fc0ca9fa8.

See Also

IRTCSession, IRTCProfile, RTC_SESSION_TYPE, RTCCS_, IRTCSession::get_RedirectedUserURI, IRTCSession::get_RedirectedUserName