CRITICAL FIXES:
1. Function name bug: rebuild_pjsip_config() → generate_pjsip_conf()
- Was calling non-existent function in VLAN toggle feature
- Would cause errors when enabling/disabling VLAN traversal
2. Uninstall logic: Now adapts to what's installed
- "Remove Everything" option now works when only server OR client installed
- Menu dynamically shows relevant options
- Fixes user-reported issue with uninstall flow
IMPROVEMENTS:
3. Better Asterisk failure diagnostics:
- Shows 20 recent journal entries (was 10)
- Checks certificate file existence
- Provides "sudo asterisk -cvvv" debug command
- Helps users troubleshoot startup failures
4. Port forwarding text updated:
- Changed "OPNsense router" to "router"
- Made path hint generic: "(Usually found in: ...)"
- Works for all router brands
TESTING:
- Syntax validated with bash -n
- Addresses user-reported issues from installation attempts
- No breaking changes to existing functionality
Version: 1.37 → 1.37.1 (patch release)
PROBLEM:
Devices on VLANs couldn't connect to Asterisk server without
inter-VLAN routing because SIP headers contained VLAN IPs
that the server couldn't route back to.
SOLUTION:
Added toggleable VLAN/NAT traversal feature that:
- Treats VLAN traffic like NAT traversal
- Uses symmetric RTP (already in place at endpoint level)
- Adds transport-level local_net configuration
- Responds to source address instead of header IPs
- Supports optional VLAN subnet configuration
CHANGES:
- New menu option: Server Tools > 8) VLAN/NAT traversal
- New config vars: VLAN_NAT_TRAVERSAL, VLAN_SUBNETS
- Modified rebuild_pjsip_config() to apply NAT settings when enabled
- Updated version: v1.36 -> v1.37
- Backward compatible: defaults to disabled (flat network mode)
FEATURES:
✓ Works with flat networks (disabled by default)
✓ Toggle on/off without breaking existing setup
✓ Optional VLAN subnet configuration
✓ Compatible with FQDN/external device modes
✓ No changes needed to existing endpoints
USER TESTING:
User can enable via: Server Tools > VLAN/NAT traversal > Enable
Then optionally add VLAN subnets if basic mode doesn't work.