Remove stunaddr/turnaddr from rtp.conf — fixes STUN timeout causing 27s delay

Asterisk doesn't need STUN/TURN in rtp.conf for this setup because:
- It already knows its public IP via external_media_address in pjsip.conf
- Its RTP ports are port-forwarded, so host ICE candidates are sufficient
- stunaddr/turnaddr caused STUN gather timeouts (~27s) on every call,
  whether pointing at the FQDN (DNS TTL=0 bug) or localhost (UDP timeout)

coturn is for SIP *clients* behind strict NAT — they configure TURN in
their own app settings, independently of Asterisk's rtp.conf.

ICE support remains enabled so Asterisk participates in ICE negotiation.

https://claude.ai/code/session_01KWVtEt9MmZdywcu7WmgchX
This commit is contained in:
Claude
2026-02-24 22:18:55 +00:00
parent de46202ab4
commit e6ef37b6bc
3 changed files with 25 additions and 29 deletions
+6 -5
View File
@@ -17,7 +17,7 @@
# - All SIP clients connect to DOMAIN_NAME:5061 (TLS)
# - coturn handles NAT traversal (STUN) and media relay (TURN)
# - Works from any network: LAN, cellular, Proton VPN, hotel WiFi
# - TURN credentials are auto-generated if TURN_PASSWORD is empty
# - Set TURN_PASSWORD below (generate one: openssl rand -base64 18)
# ================================================================
# ── Domain Name (REQUIRED) ────────────────────────────────────
@@ -60,11 +60,12 @@ VLAN_SUBNETS=
# ── TURN/STUN Settings ──────────────────────────────────────
# Used by coturn for TURN relay authentication.
# Both coturn and Asterisk must use the SAME password.
# If empty, both default to "changeme" — set a real password here.
# If empty, defaults to "changeme" — set a real password for security.
# Generate one with: openssl rand -base64 18
#
# These credentials are shared between coturn and Asterisk.
# SIP clients do NOT need these - only the server uses them.
# These credentials are for coturn only. SIP clients that need TURN
# relay (behind strict NAT) must configure the same credentials in
# their SIP app settings.
TURN_USERNAME=easyasterisk
TURN_PASSWORD=