IRTCSession::Answer

The Answer method answers an incoming session. It may be called only on a session in the RTCSS_INCOMING state and causes the session to transition into the RTCSS_ANSWERING state.

HRESULT Answer();

Parameters

This method has no parameters.

Return Values

RTC methods may return an RTC_E_ constant.

Value Meaning
RTC_E_INVALID_SESSION_STATE Session can be answered only in the RTCSS_INCOMING state.

Remarks

If the application has previously called IRTCClient::put_ListenForIncomingSessions, the answer mode is RTCAM_AUTOMATICALLY_ACCEPT for IM and MIM sessions, and the answer mode is RTCAM_OFFER_SESSION_EVENT for all other session types. If the application calls IRTCSession::Answer on a session with the answer mode set to automatically accept incoming sessions, it will fail with an RTC_E_INVALID_SESSION_STATE error. If the application has previously called IRTCClient2::put_AnswerMode specifying the RTCAM_AUTOMATICALLY_ACCEPT mode for a particular session type, the application should not call IRTCSession::Answer for incoming sessions of that type.

This function may send data over the wire in unencrypted form; therefore, someone eavesdropping on the network may be able to read the data. The security risk of sending the data in clear text should be considered before using this method in an unencrypted session. An RTC session can be encrypted by specifying TLS in the profile used for the session.

If the application wants to accept only a subset of the available media types for incoming calls, call the IRTCClient::SetPreferredMediaTypes method with the desired media types.

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, IRTCSession::Terminate, Answer a Call, Receive an Incoming Session When the Client is Behind a NAT