Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The put_ListenForIncomingSessions property sets the way that the Client listens for incoming sessions. This method sets the listen mode retrieved in IRTCClient::get_ListenForIncomingSessions.
HRESULT put_ListenForIncomingSessions(RTC_LISTEN_MODEnfListen);
Parameters
- nfListen
[in] The RTC_LISTEN_MODE enumeration containing the listening mode.
Return Values
RTC methods may return an RTC_E_ constant.
Value | Meaning |
---|---|
RTC_E_CLIENT_NOT_INITIALIZED | The client has not been initialized. |
Remarks
The client can be set to open both static and dynamic ports to listen for incoming sessions. Unless required, it is best not to open static port 5060. As a well-known port, it is more susceptible to attack.
If this method is called after any of the following methods, the RTC Client API will return an RTC_E_NOT_ALLOWED error.
- IRTCClient2::put_AllowedPorts
- IRTCClient2::put_AnswerMode
- IRTCClient2::get_AllowedPorts
- IRTCClient2::get_AnswerMode
Note Incoming sessions will not be secure unless the application sets the listen mode to disallow both static and dynamic ports (RTCLM_NONE), and the TLS transport is specified in the profile.
A call to the put_ListenForIncomingSessions method also sets the answer mode for each session type. Sessions of type RTCSS_MULTIPARTY_IM and RTCSS_IM are set to automatically accept incoming sessions (RTCAM_AUTOMATICALLY_ACCEPT). All other session types will offer the session to the application (RTCAM_OFFER_SESSION_EVENT).
If the application sets the listen mode to RTCLM_BOTH, it is not guaranteed that the RTC Client API will be listening on port 5060. If another application is already listening on port 5060, this application will not be listening on port 5060 for SIP messages. This method will return success when RTCLM_BOTH is specified regardless of whether port 5060 is available. Applications should call the IRTCClient::get_NetworkAddresses method to find the ports on which the application is listening for SIP messages.
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_IRTCClient is defined as 07829e45-9a34-408e-a011-bddf13487cd1.
See Also
IRTCClient, IRTCClient::get_ListenForIncomingSessions, IRTCSession, Register to Receive Events, RTC_LISTEN_MODE, IRTCClient2::put_AllowedPorts, IRTCClient2::put_AnswerMode