IRTCClient2::CreateSessionWithDescription
The CreateSessionWithDescription method allows the client application to control the session and specify the body and content type of the session INVITE request. The application is responsible for all media negotiations on the session.
HRESULT CreateSessionWithDescription(BSTRbstrContentType,
BSTRbstrSessionDescription,
IRTCProfile*pProfile,
longlFlags,
IRTCSession2**ppSession2);
Parameters
- bstrContentType
[in] BSTR specifying the content type for the INVITE request. - bstrSessionDescription
[in] BSTR specifying the session description for the INVITE request. - pProfile
[in] Pointer to the IRTCProfile interface of the profile to use for the session. - lFlags
[in] RTCCS_ flags specifying the force profile and fail on redirect settings. A value of zero is valid for this parameter and indicates that the default profile is used for this session. The RTC Client API will automatically allow redirections to occur (for more information, see the Remarks section). - ppSession2
[out] Pointer to the IRTCSession2 interface for the newly created session. This call adds a reference to the interface, which the caller is responsible for releasing.
Return Values
RTC methods may return an RTC_E_ constant.
Value | Meaning |
---|---|
E_FAIL | The media could not be disabled for this session, or the local session description could not be set, or there is insufficient memory to perform this operation. |
RTC_E_PLATFORM_NOT_SUPPORTED | This operation is not supported on this platform. |
Remarks
The application can use this method if it wants to use its own media manager for an RTCST_PC_TO_PC session and not the one included in the RTC API implementation. Using this method, the application can create a PC-to-PC session and generate its own media description to be sent out in the body of the SIP INVITE message. Any media description received in a response from the called entity will be given directly to the application by the RTC API. The application is responsible for negotiating and handling media.
The CreateSessionWithDescription method is required to create a media session when the media has been globally disabled. The media is disabled by initializing the Client object via the IRTCClient2::InitializeEx method with the RTCIF_DISABLE_MEDIA flag set.
For more information on creating sessions with application-dependent media negotiations, see Session Negotiation.
Note The content type is application specific. Applications should ensure that the called party is able to decipher the content type of the session description.
Requirements
Redistributable: Requires Rtcdll.dll on Windows 2000, Windows XP, and Windows Server 2003.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCClient2 is defined as 0C91D71D-1064-42da-BFA5-572BEB8EEA84.
See Also
IRTCClient2, IRTCProfile2, IRTCProfile, IRTCSession2, Session Negotiation, Create an Outgoing Application Session