- Add local_net entries to PJSIP transports in LAN/VPN mode when
VLAN/VPN subnets are configured, so Asterisk recognizes VPN traffic
as local and mobile devices no longer appear offline on VPN
- Auto-detect VPN interfaces (Tailscale, WireGuard, OpenVPN) and
suggest their subnets in the VLAN/VPN configuration menu
- Add rtp_keepalive=15, rtp_timeout=120, and rtp_timeout_hold=120
to mobile device endpoints to maintain NAT mappings during
WiFi-to-cellular transitions (fixes one-way audio)
- Reduce qualify_frequency from 60s to 30s for faster re-registration
detection when mobile devices change networks
- Update README with VPN troubleshooting and one-way audio guidance
including client-side fixes for Sipnetic and Linphone
https://claude.ai/code/session_01Vm6NLaQuzM4VosAotqS1q8
Stop command improvements:
- Shows actual netstat and systemctl commands being run
- Displays output from each command
- Runs netstat checks between stop attempts
- More transparent debugging
UI improvements:
- Consistent 100px width for action selects and buttons
- Sort dropdown visible in devices header
New features:
- Rename button for rooms (uses prompt dialog)
- Rename button for categories (uses prompt dialog)
- PUT /api/rooms/{ext} endpoint for renaming
- PUT /api/categories/{id} endpoint for renaming
- Python functions: rename_room(), rename_category()
- Add sort dropdown: Extension, Name, Category, Status (Online first), Transport
- Consistent width for action selects (95px) and buttons (65px)
- Extract renderDevices() function for re-sorting without API calls
- Store statusCache globally for sort comparisons
Stop command fix:
- Use double-stop pattern (stop, check port, stop again if needed)
- Print commands being run for debugging
Web Admin UI improvements:
- Sort devices by extension number
- Add Category dropdown to change device category from device list
- Rooms page: card layout with vertical member list, delete room button
- Categories page: card layout with vertical device list, move-to dropdown
- Add Room modal and functionality
- Add Category modal and functionality
- Consistent formatting across all pages (card layout, tables)
- Remove from room/category via buttons on those pages
New API endpoints:
- PUT /api/devices/{ext}/category - change device category
- POST /api/rooms - create new room
- DELETE /api/rooms/{ext} - delete room
- POST /api/categories - create new category
- DELETE /api/categories/{id} - delete category
Python functions added:
- change_device_category()
- create_room(), delete_room()
- create_category(), delete_category()
Goal: Web admin can now fully replace the script for client management
- Fix stop command: mask service before stopping to prevent
Restart=always from respawning the process
- Add "Add to Room" dropdown on device list to add clients to rooms
- Show clickable member badges in rooms (click to remove from room)
- Categories page now displays devices grouped under each category
- Add API endpoints for room membership management (POST/DELETE)
Stop command improvements:
- Added verbose progress output
- Uses pgrep to check if process is running
- Multiple kill attempts with escalating force
- Falls back to lsof if fuser unavailable
- Verifies process is stopped
Transport detection:
- If media_encryption=sdes/dtls found without explicit transport,
assume TLS (for older device configs)
Rename functionality:
- Added rename_device() Python function
- Added do_PUT API handler
- Added rename modal in HTML
- Added showRenameModal/renameDevice JavaScript functions
- Rename button added next to Delete in device list
Status detection:
- Fixed parsing of 'pjsip show endpoints' output
- Looks for Endpoint: header then Contact: line with Avail/NonQual
- Matches bash script logic
Stop command improvements:
- Kill remaining processes with pkill after systemctl stop
- Force kill (-9) if processes still running after 1 second
- Release port with fuser -k as final cleanup
Status detection fix:
- Parse 'pjsip show endpoints' output correctly
- Look for Endpoint: header to get extension number
- Check Contact: lines for 'Avail' or 'NonQual' status
- Matches the bash script's detection logic
Previously the script was only created if it didn't exist,
so updates to the parser weren't being applied. Now the
Python script is regenerated every time to ensure the
latest version is used.
The Python parser was waiting for password= which comes much later
in the auth section. Rewrote to match the simpler bash approach:
- Find device comment line, parse name/category/AA tag
- Find next [extension] line, add device to list
- Update transport/encryption if found in following lines
This matches how show_registered_devices() works in bash.
Port persistence:
- Add WEB_ADMIN_PORT to save_config() and load_config()
- Save config when port is changed in web_admin_menu
- Remove hardcoded initialization that overrode saved config
Device listing fix:
- Rewrite get_devices() parser to properly track state across sections
- Fix regex to handle variable spacing in device comment lines
- Continue tracking device through auth section to capture password
- Devices now properly listed in web admin interface
Fixes:
- Extension deletion now properly removes all sections (endpoint, auth, aor)
using awk for reliable multi-section removal
- Extension renaming now preserves AA tags correctly
- LAN/VPN devices now explicitly use transport=transport-udp to prevent
TLS fallback issues that caused clients to go offline immediately
- LAN devices now have media_encryption=no to prevent SRTP negotiation issues
New Features:
- Web Admin interface for browser-based client management
- View device status (online/offline) in real-time
- Add/delete devices via web interface
- View rooms and categories
- HTTP Basic authentication with SHA256 password hashing
- Access at http://server:8080/clients
- Accessible via Server Settings > Web Admin menu
Verified:
- PTT is correctly disabled by default (only enabled when user configures it)