## Recording Issues Fixed
- Enhanced Call SID detection for browser phone calls
- Try multiple methods to get Call SID: parameters.CallSid, customParameters.CallSid, outgoingConnectionId, sid
- Added comprehensive console logging for debugging recording issues
- Better error handling and user feedback
## Backend Improvements
- Verify call exists and is in-progress before attempting recording
- Enhanced error logging with call status and details
- Improved AJAX error responses with specific error messages
- Database insert error checking and logging
## Frontend Improvements
- Multiple Call SID detection methods for browser phone compatibility
- Console logging of call object and Call SID for debugging
- Enhanced error handling with xhr response details
- Validation of active call before recording attempt
## Debugging Features
- Detailed error logs in PHP error log
- Console logging in browser for JavaScript debugging
- Specific error messages for different failure scenarios
- Call status validation to ensure recording is possible
These changes should resolve the "recording not working" issue by properly detecting the Call SID for browser phone calls and providing detailed debugging information.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
## New Call Control Features
- Call hold/unhold with music playback
- Call transfer with agent selection dialog
- Call requeue to different queues
- Call recording with start/stop controls
- Real-time recording status tracking
## Enhanced Transfer System
- Transfer to agents with cell phones (direct)
- Transfer to web phone agents via personal queues
- Automatic queue creation for each user
- Real-time agent availability status
- Visual agent selection with status indicators (📱 phone, 💻 web)
## Call Recordings Management
- New database table for call recordings
- Recordings tab in voicemail interface
- Play/download recordings functionality
- Admin-only delete capability
- Integration with Twilio recording webhooks
## Agent Queue System
- Personal queues (agent_[user_id]) for web phone transfers
- Automatic polling for incoming transfers
- Transfer notifications with browser alerts
- Agent status tracking (available/busy/offline)
## Technical Enhancements
- 8 new AJAX endpoints for call controls
- Recording status webhooks
- Enhanced transfer dialogs with agent selection
- Improved error handling and user feedback
- Mobile-responsive call control interface
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix notification button text overflow on tablet devices
- Add tablet-specific media queries for button sizing and layout
- Shorten button text from "Enable Notifications" to "Enable Alerts"
- Add responsive button constraints with min/max width and text overflow handling
- Stack queue action buttons vertically on tablets for better fit
- Bump plugin version from 2.1.0 to 2.2.0 to include all recent enhancements
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Background Notification Features:
- Implement Web Push Notifications for alerts when browser is minimized
- Add Service Worker for persistent background notification support
- Integrate Page Visibility API to detect when page is in background
- Add browser notification permission request with user consent flow
- Create more aggressive background polling (10 seconds) when page hidden
- Add vibration patterns for mobile device alerts
Bug Fixes:
- Fix Discord/Slack notification parameter order bug preventing delivery
- Add comprehensive logging for notification debugging
- Correct webhook function signatures for proper data passing
Mobile Enhancements:
- Support system notifications on Android browsers
- Add click-to-focus functionality for notifications
- Implement background alert system for multitasking
- Add notification button with visual feedback
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Enhance checkForNewCalls to monitor queue emptiness and auto-stop alerts
- Update startAlert to verify waiting calls exist before starting
- Add continuous monitoring to stop alerts when no calls remain
- Prevent false alerts when calls disconnect before pickup
- Add console logging for better alert behavior tracking
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix 403 Forbidden error in voicemail AJAX by correcting nonce validation
- Create accordion-style collapsible voicemail section with persistent state
- Restructure queue controls to show alert toggle button consistently
- Add global queue actions always visible when user has assigned queues
- Implement smooth slide animations and localStorage state management
- Update dark mode support for new UI elements and improved accessibility
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add AJAX endpoint for fetching user voicemails with stats and recent list
- Create voicemail display section with counts, transcriptions, and playback
- Implement click-to-play functionality for voicemail audio
- Add refresh and view-all buttons with admin page integration
- Style voicemail section with consistent design and dark mode support
- Include visual indicators for recordings and formatted durations
- Add mobile responsive design and hover effects
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Implement proactive token refresh 5 minutes before expiry (1-hour tokens)
- Add call-safe refresh logic that postpones refresh during active calls
- Replace fixed-interval refresh with smart scheduling based on token expiry
- Add proper cleanup on page unload to prevent memory leaks
- Enhance error handling with retry mechanisms for network failures
- Apply to both admin browser phone page and frontend shortcode
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update makeCall function to use async/await with new SDK
- Wrap connect params in {params: params} object as required by SDK v2
- Make setupTwilioDevice async and await device.register()
- Add proper error handling for Promise-based API calls
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
SDK Loading Improvements:
- Increased timeout from 5 to 15 seconds for slower connections
- Added progressive status messages during SDK loading
- Enhanced console logging for debugging
- Added fallback SDK loading mechanism with inline script
- Better error diagnostics showing Twilio object status
Text Contrast Fixes:
- Updated all #333 colors to #212529 for better readability
- Fixed browser phone title, dial buttons, timer, queue headings
- Enhanced dark mode support for all text elements
- Improved readability on both light and dark backgrounds
Technical Changes:
- waitForTwilioSDK() now waits 150 attempts (15 seconds)
- Progressive status updates at 3s, 6s, 10s intervals
- Backup SDK loading via document.createElement
- Comprehensive dark mode color coverage
- Better error messaging for network issues
Accessibility Improvements:
- Higher contrast ratios for WCAG compliance
- Consistent text color hierarchy
- Better visibility in all lighting conditions
- Enhanced mobile readability
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Features Added:
- Queue display showing all assigned queues for the current user
- Real-time queue statistics (waiting calls, capacity)
- Visual indicators for queues with waiting calls (green border, pulse animation)
- Queue selection with click interaction
- Accept next call from selected queue functionality
- Auto-refresh of queue data every 30 seconds
- Mobile-responsive queue interface
Backend Changes:
- New ajax_get_agent_queues() handler to fetch user's assigned queues
- Enhanced ajax_get_waiting_calls() to return structured data
- Proper permission checking for twp_access_agent_queue capability
Frontend Enhancements:
- Interactive queue list with selection states
- Queue controls panel showing selected queue info
- Refresh button for manual queue updates
- Visual feedback for queues with active calls
- Mobile-optimized layout for smaller screens
UI/UX Improvements:
- Queues with waiting calls highlighted with green accent
- Pulsing indicator for active queues
- Auto-selection of first queue with calls
- Responsive design for mobile devices
- Dark mode support for queue elements
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created TWP_Shortcodes class with [twp_browser_phone] shortcode
- Mobile-first responsive CSS design with touch-friendly interface
- Frontend JavaScript integration with Twilio Voice SDK v2
- Permission checks for logged-in users with twp_access_browser_phone capability
- Haptic feedback and dark mode support
- Configurable shortcode parameters (title, show_title, compact)
- Updated plugin version to 2.1.0 in main file
- Added comprehensive documentation to README.md
Features:
- Visual dialpad with DTMF support
- Real-time connection status indicators
- Call timer and queue management
- Auto-scaling for mobile devices (320px+)
- Optimized for both desktop and mobile use
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Updated workflow save validation to check for phone_numbers[] array
instead of the old single phone_number field. Now properly validates
that at least one phone number is selected before allowing save.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Database Changes:
- Added twp_workflow_phones junction table for many-to-many relationship
- Updated activator to create and manage new table
- Maintained backward compatibility with existing phone_number field
Workflow Management:
- Added set_workflow_phone_numbers() and get_workflow_phone_numbers() methods
- Updated get_workflow_by_phone_number() to check both old and new structures
- Enhanced save/update handlers to support phone_numbers array
- Added AJAX endpoint for retrieving workflow phone numbers
User Interface:
- Replaced single phone number select with dynamic multi-select interface
- Added "Add Number" and "Remove" buttons for managing multiple numbers
- Updated workflow listing to display all assigned phone numbers
- Enhanced JavaScript for phone number management and validation
The webhook routing already supports multiple numbers since get_workflow_by_phone_number()
was updated to check both structures. This feature allows users to assign multiple
Twilio phone numbers to trigger the same workflow.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed phone agents getting 'Unauthorized' error when accessing voicemails by checking for twp_access_voicemails capability
- Fixed missing ElevenLabs parameter in queue TwiML generation that prevented announcement messages
- Fixed IVR voicemail messages not being saved correctly - now properly assigns message field based on action type
- Added proper permission checks for both ajax_get_voicemail and ajax_get_voicemail_audio functions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed create_voicemail_twiml() from private to public method to fix fatal error when accessing voicemail from IVR
- Added auto-loading of ElevenLabs voices when switching to TTS option for new workflow steps
- Voices now load automatically when user selects "Use Text-to-Speech" radio button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>