Add comprehensive call control features and web phone transfer capabilities
## 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>
This commit is contained in:
@@ -44,7 +44,8 @@ class TWP_Activator {
|
||||
'twp_agent_groups',
|
||||
'twp_group_members',
|
||||
'twp_agent_status',
|
||||
'twp_callbacks'
|
||||
'twp_callbacks',
|
||||
'twp_call_recordings'
|
||||
);
|
||||
|
||||
$missing_tables = array();
|
||||
@@ -284,6 +285,30 @@ class TWP_Activator {
|
||||
KEY queue_id (queue_id)
|
||||
) $charset_collate;";
|
||||
|
||||
// Call recordings table
|
||||
$table_recordings = $wpdb->prefix . 'twp_call_recordings';
|
||||
$sql_recordings = "CREATE TABLE $table_recordings (
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
call_sid varchar(100) NOT NULL,
|
||||
recording_sid varchar(100),
|
||||
recording_url varchar(500),
|
||||
duration int(11) DEFAULT 0,
|
||||
from_number varchar(20),
|
||||
to_number varchar(20),
|
||||
agent_id bigint(20),
|
||||
status varchar(20) DEFAULT 'recording',
|
||||
started_at datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
ended_at datetime,
|
||||
file_size int(11),
|
||||
transcription text,
|
||||
notes text,
|
||||
PRIMARY KEY (id),
|
||||
KEY call_sid (call_sid),
|
||||
KEY recording_sid (recording_sid),
|
||||
KEY agent_id (agent_id),
|
||||
KEY started_at (started_at)
|
||||
) $charset_collate;";
|
||||
|
||||
dbDelta($sql_schedules);
|
||||
dbDelta($sql_queues);
|
||||
dbDelta($sql_queued_calls);
|
||||
@@ -296,6 +321,7 @@ class TWP_Activator {
|
||||
dbDelta($sql_group_members);
|
||||
dbDelta($sql_agent_status);
|
||||
dbDelta($sql_callbacks);
|
||||
dbDelta($sql_recordings);
|
||||
|
||||
// Add missing columns for existing installations
|
||||
self::add_missing_columns();
|
||||
|
Reference in New Issue
Block a user