Commit Graph

8 Commits

Author SHA1 Message Date
4baa8f539a Add queue timeout voicemail and Amazon SNS SMS provider support
This update adds two major features:

1. Queue Timeout Voicemail
   - Callers can now leave voicemail when queue timeout is reached
   - Configurable per-queue voicemail prompts with TTS support
   - Automatic transcription and urgent keyword detection
   - Admin setting to choose between voicemail or callback on timeout

2. Amazon SNS SMS Provider
   - Alternative SMS provider to Twilio for sending text messages
   - Useful when Twilio SMS approval is difficult to obtain
   - Provider abstraction layer allows switching between Twilio/SNS
   - Full AWS SNS configuration in admin settings
   - Supports custom sender IDs in compatible countries
   - Lower cost per SMS compared to Twilio

New Files:
- includes/class-twp-voicemail-handler.php - Voicemail recording handler
- includes/interface-twp-sms-provider.php - SMS provider interface
- includes/class-twp-sms-provider-twilio.php - Twilio SMS implementation
- includes/class-twp-sms-provider-sns.php - Amazon SNS implementation
- includes/class-twp-sms-manager.php - SMS provider abstraction manager
- QUEUE_VOICEMAIL_SMS_FEATURES.md - Complete feature documentation

Modified Files:
- includes/class-twp-call-queue.php - Added voicemail option to timeout handler
- includes/class-twp-twilio-api.php - Updated send_sms() to use provider abstraction
- admin/class-twp-admin.php - Added SMS provider and timeout action settings
- composer.json - Added AWS SDK dependency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 11:13:54 -07:00
7cd7f036ff Fix extension transfer system and browser phone compatibility
Major Fixes:
- Fixed extension transfers going directly to voicemail for available agents
- Resolved browser phone call disconnections during transfers
- Fixed voicemail transcription placeholder text issue
- Added Firefox compatibility with automatic media permissions

Extension Transfer Improvements:
- Changed from active client dialing to proper queue-based system
- Fixed client name generation consistency (user_login vs display_name)
- Added 2-minute timeout with automatic voicemail fallback
- Enhanced agent availability detection for browser phone users

Browser Phone Enhancements:
- Added automatic microphone/speaker permission requests
- Improved Firefox compatibility with explicit getUserMedia calls
- Fixed client naming consistency across capability tokens and call acceptance
- Added comprehensive error handling for permission denials

Database & System Updates:
- Added auto_busy_at column for automatic agent status reversion
- Implemented 1-minute auto-revert system for busy agents with cron job
- Updated database version to 1.6.2 for automatic migration
- Fixed voicemail user_id association for extension voicemails

Call Statistics & Logging:
- Fixed browser phone calls not appearing in agent statistics
- Enhanced call logging with proper agent_id association in JSON format
- Improved customer number detection for complex call topologies
- Added comprehensive debugging for call leg detection

Voicemail & Transcription:
- Replaced placeholder transcription with real Twilio API integration
- Added manual transcription request capability for existing voicemails
- Enhanced voicemail callback handling with user_id support
- Fixed transcription webhook processing for extension voicemails

Technical Improvements:
- Standardized client name generation across all components
- Added ElevenLabs TTS integration to agent connection messages
- Enhanced error handling and logging throughout transfer system
- Fixed TwiML generation syntax errors in dial() methods

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-02 11:03:33 -07:00
c0f0ea8158 Fix browser phone client name to be alphanumeric only
- Removed underscores and hyphens from client name generation
- Using preg_replace to strip all non-alphanumeric characters
- Twilio requires client names to contain only alphanumeric characters

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 10:15:39 -07:00
51dd3077d2 testing progress 2025-08-12 07:05:47 -07:00
304b5de40b progress made 2025-08-11 20:31:48 -07:00
805af2f199 Fix Number display 2025-08-07 16:46:51 -07:00
3b499e2074 code push 2025-08-07 15:24:29 -07:00
c6edbbeba7 code revision 2025-08-06 15:25:47 -07:00