Traversal of UPnP-Enabled NATs (Windows CE 5.0)

Send Feedback

When a client application is behind a NAT or a firewall, audio streams are transmitted using an IP address and port on the NAT or firewall.

By default, the RTC Client API supports only NATs that implement the Universal Plug and Play (UPnP) Internet Gateway Device (IGD) device control profile (DCP).

Consider these scenarios:

  • If the client is behind a NAT that does not support the UPnP IGD DCP, the RTC Client API exposes interfaces that enable application code to map IP addresses and ports on the NAT. For more information about these interfaces, see NAT Address Mapping.

  • If the client is behind a NAT with UPnP IGD DCP support, the RTC Client API uses UPnP to open a port on the NAT for the SIP session. The NAT then opens a dynamic port for the SIP session.

    In this situation, if the participants decide to initiate an audio session, the RTC Client API internally allocates two dynamic UDP ports for each stream and then uses UPnP to open external ports for each internal port. These ports are communicated in the Session Description Protocol (SDP) body of the SIP message for the audio session.

Retrieving Address and Port Information

The IRTCClient::NetworkAddresses method returns the address and port used to establish point-to-point communication sessions.

If the client is behind a NAT or firewall, the NetworkAddresses method determines the port and address on the NAT or firewall that is used for the session.

When a client calls NetworkAddresses with the fExternal parameter set to TRUE, the method returns the external address and dynamic port on the NAT. The client can communicate this address out-of-band to the called party to establish point-to-point sessions.

If a client is behind a NAT without UPnP IGD DCP support or a firewall, point-to-point communications are not possible without an application-level gateway.

See Also

Firewalls and NATs

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.