Testing NAT traversal is not an easy task. You can test with some friends behind the Internet, calling your server on a public IP address. For a test bench, the easiest setup is to have two IP phones behind two NAT devices.
Step 1: Download and compile RTP Proxy with the instructions provided earlier in this chapter.
Step 2: Start your RTP Proxy.
./rtpproxy –l theipaddressofyourserver –s udp:127.0.0.1:7890 –F
Step 3: Start making calls from the phones behind the NAT devices. Use ngrep
to capture the packets and troubleshoot any problems.
STUN allows for better scalability and the endpoints can communicate directly. With Media Relay Server (MRS), if a UAC wants to communicate to another UAC, they will have to use your server to relay the RTP packets. This will consume your bandwidth and by consequence, your money. Additionally, the payload is twice of a normal PSTN call, because you have to relay the RTP session from two...