How to configure STUN in R2x

1.What is STUN

STUN (Session Traversal Utilities for NAT )is a standardized set of methods, including a network protocol, for traversal of network address translator (NAT) gateways in applications of real-time voice, video, messaging, and other interactive communications.

STUN is a tool used by other protocols, such as Interactive Connectivity Establishment (ICE), the Session Initiation Protocol (SIP), or WebRTC. It provides a tool for hosts to discover the presence of a network address translator, and to discover the mapped, usually public, Internet Protocol (IP) address and port number that the NAT has allocated for the application's User Datagram Protocol (UDP) flows to remote hosts. The protocol requires assistance from a third-party network server (STUN server) located on the opposing (public) side of the NAT, usually the public Internet.

2. How STUN work in R2X:


The testing environment is as below:

STUN

3. How to configure:


Go to Account - Basic - NAT to configure the STUN server address of intercom A&B to the IP address of laptop A, which is 192.168.1.70.

STUN

4. How it work:


Mode 1: If users disabled the NAT, when intercom A make a call to intercom B through SIP accounts, B pick up the call, B can hear what A talks but A can not hear what B talks, and after B hang up the call, A will not hang up the call.

STUN
Mode 2: If users configure the NAT to be STUN, when intercom A make a call to intercom B through SIP accounts, B pick up the call, they can communicate normally.


So users need to configure like Mode 2 when need to enable the stun feature.