Update README.md with comprehensive documentation and cleanup test files

- Added Discord & Slack notifications section with configuration guide
- Documented multiple phone numbers per workflow feature
- Updated version to 2.1.0 with full changelog
- Enhanced configuration sections for new features
- Added database structure documentation for twp_workflow_phones table
- Removed obsolete test files (test-sdk.php, test-capabilities.php, test-ajax-response.php)
- Updated plugin header with new version and repository URL

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-08-13 11:24:29 -07:00
parent 534d343526
commit bef2259943
5 changed files with 56 additions and 149 deletions

View File

@@ -81,6 +81,14 @@ This plugin **requires** the Twilio PHP SDK v8.7.0 to function. The plugin will
- **Command System**: Text commands to manage availability
- **SMS Logging**: Complete history of all SMS interactions
### 🔔 Discord & Slack Notifications
- **Real-time Alerts**: Instant notifications to Discord channels and Slack workspaces
- **Multiple Event Types**: Incoming calls, queue timeouts, and missed calls
- **Rich Formatting**: Structured messages with caller info, queue details, and timestamps
- **Webhook Integration**: Simple configuration with webhook URLs
- **Configurable Options**: Enable/disable specific notification types
- **Automatic Monitoring**: Background checks for queue timeout situations
### 📊 Real-time Dashboard
- **Queue Monitor**: Live view of waiting calls
- **Agent Status**: Track agent availability
@@ -92,9 +100,10 @@ This plugin **requires** the Twilio PHP SDK v8.7.0 to function. The plugin will
- **Voicemail Transcription**: Automatic speech-to-text
- **Callback System**: Offer callbacks instead of long holds
- **Outbound Calling**: Click-to-call with proper caller ID
- **Multiple Phone Numbers**: Support for multiple business lines
- **Multiple Phone Numbers**: Support for multiple business lines per workflow
- **Agent Phone Management**: Store and validate agent phone numbers
- **Duplicate Prevention**: Ensures unique phone numbers per agent
- **Enhanced Notifications**: Discord and Slack integration for real-time alerts
## Recent Updates
@@ -119,6 +128,19 @@ This plugin **requires** the Twilio PHP SDK v8.7.0 to function. The plugin will
- **Queue Selection**: Proper queue routing based on digit selection
- **Voice Selection**: Fixed voice dropdown persistence issues
### Multiple Phone Numbers Support
- **Workflow Enhancement**: Workflows can now be assigned to multiple phone numbers
- **Junction Table**: New `twp_workflow_phones` table for many-to-many relationships
- **Backward Compatibility**: Existing single-number workflows continue to work
- **Validation Fixes**: Proper validation for multiple phone number selections
### Discord & Slack Notifications
- **Real-time Integration**: Instant notifications to Discord channels and Slack workspaces
- **Event Monitoring**: Automated tracking of incoming calls, queue timeouts, and missed calls
- **Rich Message Format**: Structured notifications with caller details, queue info, and timestamps
- **Configurable Settings**: Toggle notification types and set custom webhook URLs
- **Background Processing**: Cron-based monitoring for queue timeout alerts
## How It Works
### Call Flow
@@ -168,13 +190,13 @@ This plugin **requires** the Twilio PHP SDK v8.7.0 to function. The plugin will
2. **In WordPress Admin**:
- Go to **Twilio** → **Phone Numbers**
- Verify numbers are synchronized
- Assign workflows to numbers
- Assign workflows to numbers (multiple numbers per workflow supported)
### Creating Workflows
1. **Navigate to** Twilio → Workflows
2. **Create New Workflow**:
- Name your workflow
- Select phone number to assign
- Select phone numbers to assign (multiple selection supported)
- Add steps using the builder
3. **Configure Steps**:
@@ -218,6 +240,24 @@ This plugin **requires** the Twilio PHP SDK v8.7.0 to function. The plugin will
4. **Configure Call Mode**: Browser or cell phone
5. **Train Agents** on SMS commands and browser phone
### Discord & Slack Setup
1. **Discord Configuration**:
- Create a webhook URL in your Discord server settings
- Navigate to **Twilio** → **Settings** → **Notifications**
- Paste Discord webhook URL
- Enable desired notification types
2. **Slack Configuration**:
- Create a webhook URL in your Slack workspace
- Navigate to **Twilio** → **Settings** → **Notifications**
- Paste Slack webhook URL
- Configure notification preferences
3. **Notification Types**:
- **Incoming Calls**: Alert when calls enter queues
- **Queue Timeouts**: Alert when calls wait too long (configurable threshold)
- **Missed Calls**: Alert when calls are abandoned or timeout
## Voice Configuration
### ElevenLabs Integration
@@ -296,6 +336,7 @@ The plugin creates these tables:
- `twp_call_queues` - Queue configurations (uses notification_number)
- `twp_queued_calls` - Active calls in queues
- `twp_workflows` - Call flow definitions with voice persistence
- `twp_workflow_phones` - Junction table for multiple phone numbers per workflow
- `twp_call_log` - Complete call history
- `twp_sms_log` - SMS message tracking
- `twp_voicemails` - Recordings and transcriptions
@@ -338,7 +379,15 @@ All webhooks are REST API endpoints under `/wp-json/twilio-webhook/v1/`:
## Version History
### v2.0.0 (Current)
### v2.1.0 (Current)
- **Multiple Phone Numbers**: Workflows can now handle multiple phone numbers
- **Discord & Slack Integration**: Real-time notifications for call events
- **Enhanced Monitoring**: Automated queue timeout tracking and alerts
- **Notification System**: Configurable webhook-based notifications
- **Background Processing**: Cron jobs for timeout monitoring
- **Database Enhancements**: New junction table for phone number relationships
### v2.0.0
- Upgraded to Twilio Voice SDK v2 for browser phone
- Fixed queue notification_number field naming
- Enhanced voice selection persistence