mirror of
https://github.com/itflow-org/itflow
synced 2026-11-23 21:07:22 +00:00
Add phone system integration with FusionPBX: Admin Phone Systems with setup lines for mod_xml_cdr and mod_cidlookup, domains linked to clients with suggestions, a Calls page per client and contact with calls matched to contacts, Add to Ticket with talk time as time worked, and caller ID names from ITFlow on desk phones
This commit is contained in:
136
db.sql
136
db.sql
@@ -2612,6 +2612,141 @@ CREATE TABLE `payments` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `phone_calls`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `phone_calls`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `phone_calls` (
|
||||
`phone_call_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`phone_call_system_id` int(11) NOT NULL,
|
||||
`phone_call_uuid` varchar(64) NOT NULL,
|
||||
`phone_call_domain_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_call_client_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_call_contact_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_call_direction` varchar(10) NOT NULL DEFAULT '',
|
||||
`phone_call_number` varchar(32) NOT NULL DEFAULT '',
|
||||
`phone_call_name` varchar(100) NOT NULL DEFAULT '',
|
||||
`phone_call_dialed` varchar(32) NOT NULL DEFAULT '',
|
||||
`phone_call_extension` varchar(32) NOT NULL DEFAULT '',
|
||||
`phone_call_user_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_call_status` varchar(20) NOT NULL DEFAULT '',
|
||||
`phone_call_started_at` datetime NOT NULL,
|
||||
`phone_call_answered_at` datetime DEFAULT NULL,
|
||||
`phone_call_seconds` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_call_talk_seconds` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_call_hangup_cause` varchar(50) NOT NULL DEFAULT '',
|
||||
`phone_call_recording` varchar(500) DEFAULT NULL,
|
||||
`phone_call_ticket_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_call_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`phone_call_id`),
|
||||
UNIQUE KEY `phone_call_uuid` (`phone_call_system_id`,`phone_call_uuid`),
|
||||
KEY `phone_call_client_id` (`phone_call_client_id`,`phone_call_started_at`),
|
||||
KEY `phone_call_contact_id` (`phone_call_contact_id`,`phone_call_started_at`),
|
||||
KEY `phone_call_started_at` (`phone_call_started_at`),
|
||||
KEY `phone_call_ticket_id` (`phone_call_ticket_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `phone_devices`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `phone_devices`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `phone_devices` (
|
||||
`phone_device_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`phone_device_system_id` int(11) NOT NULL,
|
||||
`phone_device_mac` varchar(12) NOT NULL,
|
||||
`phone_device_vendor` varchar(30) NOT NULL DEFAULT '',
|
||||
`phone_device_model` varchar(100) NOT NULL DEFAULT '',
|
||||
`phone_device_firmware` varchar(100) NOT NULL DEFAULT '',
|
||||
`phone_device_ip` varchar(64) NOT NULL DEFAULT '',
|
||||
`phone_device_line` varchar(100) NOT NULL DEFAULT '',
|
||||
`phone_device_domain_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_device_client_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_device_asset_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_device_status` varchar(20) NOT NULL DEFAULT '',
|
||||
`phone_device_status_at` datetime DEFAULT NULL,
|
||||
`phone_device_heard_at` datetime DEFAULT NULL,
|
||||
`phone_device_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`phone_device_id`),
|
||||
UNIQUE KEY `phone_device_mac` (`phone_device_system_id`,`phone_device_mac`),
|
||||
KEY `phone_device_asset_id` (`phone_device_asset_id`),
|
||||
KEY `phone_device_client_id` (`phone_device_client_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `phone_domains`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `phone_domains`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `phone_domains` (
|
||||
`phone_domain_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`phone_domain_system_id` int(11) NOT NULL,
|
||||
`phone_domain_name` varchar(255) NOT NULL,
|
||||
`phone_domain_client_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_domain_seen_at` datetime DEFAULT NULL,
|
||||
`phone_domain_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`phone_domain_id`),
|
||||
UNIQUE KEY `phone_domain_name` (`phone_domain_system_id`,`phone_domain_name`),
|
||||
KEY `phone_domain_client_id` (`phone_domain_client_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `phone_events`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `phone_events`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `phone_events` (
|
||||
`phone_event_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`phone_event_system_id` int(11) NOT NULL,
|
||||
`phone_event_domain_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_event_line` varchar(100) NOT NULL DEFAULT '',
|
||||
`phone_event_user_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_event_kind` varchar(20) NOT NULL,
|
||||
`phone_event_call` varchar(100) NOT NULL DEFAULT '',
|
||||
`phone_event_number` varchar(32) NOT NULL DEFAULT '',
|
||||
`phone_event_name` varchar(100) NOT NULL DEFAULT '',
|
||||
`phone_event_contact_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_event_client_id` int(11) NOT NULL DEFAULT 0,
|
||||
`phone_event_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`phone_event_id`),
|
||||
KEY `phone_event_user_id` (`phone_event_user_id`,`phone_event_id`),
|
||||
KEY `phone_event_at` (`phone_event_at`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `phone_systems`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `phone_systems`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `phone_systems` (
|
||||
`phone_system_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`phone_system_kind` varchar(50) NOT NULL,
|
||||
`phone_system_name` varchar(100) NOT NULL,
|
||||
`phone_system_web_url` varchar(500) NOT NULL DEFAULT '',
|
||||
`phone_system_key` varchar(100) NOT NULL,
|
||||
`phone_system_active` tinyint(1) NOT NULL DEFAULT 1,
|
||||
`phone_system_heard_at` datetime DEFAULT NULL,
|
||||
`phone_system_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`phone_system_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
PRIMARY KEY (`phone_system_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `po_items`
|
||||
--
|
||||
@@ -5118,6 +5253,7 @@ CREATE TABLE `user_settings` (
|
||||
`user_config_compact_rows` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`user_config_booking_reminder` int(11) DEFAULT NULL,
|
||||
`user_config_reminder_email` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`user_config_phone_line` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`user_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
Reference in New Issue
Block a user