Поделиться через


IRTCClient::ListenForIncomingSessions (Windows Embedded CE 6.0)

1/6/2010

This method sets or gets the listening mode that the client uses for incoming sessions.

Syntax

HRESULT put_ListenForIncomingSessions(
  RTC_LISTEN_MODE enListen
);
HRESULT get_ListenForIncomingSessions(
  RTC_LISTEN_MODE* penListen
);

Parameters

  • enListen, penListen
    [in, out] An RTC_LISTEN_MODE enumeration value specifying the listening mode.

Return Value

This method can return an RTC_E_ constant.

Remarks

If this method is called after the following methods, the RTC Client API returns an RTC_E_NOT_ALLOWED error.

The listening mode can be set to open both static and dynamic ports to listen for incoming sessions.

Unless it is required, it is best not to open static port 5060. As a well-known port, it is more susceptible to attack.

Ee501686.security(en-US,WinEmbedded.60).gifSecurity Note:
To help with securing incoming sessions, the application can set the listen mode to disallow both static and dynamic ports (RTCLM_NONE), and specify the TLS transport in the profile.

Setting the ListenForIncomingSessions method also sets the answer mode for each session type:

  • Sessions of type RTCSS_MULTIPARTY_IM and RTCSS_IM are set to accept incoming sessions (RTCAM_AUTOMATICALLY_ACCEPT).
  • All other session types offer the session to the application (RTCAM_OFFER_SESSION_EVENT).

This method returns success when called with the RTCLM_BOTH value, regardless of whether the well-known port 5060 is in use.

To find the ports that the application is listening on for SIP messages, applications should call the IRTCClient::NetworkAddresses method.

Requirements

Header rtccore.h, rtccore.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IRTCClient
IRTCClient::NetworkAddresses
IRTCClient2::AllowedPorts
IRTCClient2::AnswerMode
RTC_LISTEN_MODE