Receiving a Session Transfer

The recipient of a call transfer request, the transferee, receives an IRTCSessionReferredEvent notification. The application retrieves the session information, such as the URI of the party that referred the session, the cookie containing the session details, and a pointer to the session. The application accepts the transfer with the IRTCSessionReferredEvent::Accept method or rejects the transfer with the IRTCSessionReferredEvent::Reject method. The original session is still valid at this point, regardless of whether the transfer attempt was accepted or rejected.

Once the transfer has been accepted, the transferee creates a new session for the transfer. The IRTCSessionReferredEvent::get_ReferToURI method is used to obtain the URI for the new session. The session cookie contains contextual information on the session from the transfer initiator and is retrieved from the IRTCSessionReferredEvent::get_ReferCookie method. The transferee chooses whether to call IRTCSessionCallControl::put_ReferredByURI and IRTCSessionCallControl::put_ReferCookie to indicate to the transfer target that this is a referred session. The transferee then calls IRTCSession::AddParticipant with the URI obtained from IRTCSessionReferredEvent::get_ReferToURI to invite the transfer target to the new session. The transferee receives an IRTCSessionStateChangeEvent that indicates the new session is connected and calls IRTCSessionReferredEvent::SetReferredSessionState to notify the transfer initiator of the transferred session state. The original session between the transfer initiator and the transferee should be placed on hold (IRTCSessionCallControl::Hold) before the new session is created.

For details on the session transfer call flow, see the Scenario 1 and Scenario 2 topics.