Three Real-World NAT Pitfalls We Fixed
1) Without explicit relay-ip in coturn, Port 443 edge forwarding looks like 127.0.0.1 traffic and relays media back to loopback instead of Asterisk — causing silent calls. 2) When an external IP is configured, AiPBX writes [ice_host_candidates] (private => public, include_local_address=yes) in rtp.conf. 3) Asterisk stunaddr was intentionally turned off because STUN resolution stalled every WebRTC call setup by ~6 seconds.
HMAC-SHA1 Ephemeral Credentials
Static long-term TURN passwords are never shipped in client bundles. The web softphone refreshes session-scoped HMAC-SHA1 TURN credentials in-place every 30 minutes via /api/sip_credentials.php so all-day agent shifts never hit token expiry.