-- 2026-02-28
INSERT INTO `cc_params` VALUES ('101', 'freeswitch根目录', 'freeswitch_root', '/home/freeswitch', 'sys', '0', '1');

-- 2026-03-16
INSERT INTO `cc_llm_agent_provider` VALUES ('8', 'ChatGPT', '对接openai的ChatGPT模型');
INSERT INTO `cc_llm_agent_provider` VALUES ('9', 'ClaudeChat', '对接anthropic的Claude模型');

-- 2026-03-19
INSERT  INTO `sys_menu`(`menu_id`,`menu_name`,`menu_code`,`parent_id`,`order_num`,`url`,`target`,`menu_type`,`visible`,`is_refresh`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES (4010,'亚马逊ASR配置','awsAsrConf',3018,6,'/cc/fsconf/awsasrconf','menuItem','C','0','1','cc:awsasrconf:view','#','admin',NOW(),'admin',NOW(),'');

INSERT  INTO `sys_menu`(`menu_id`,`menu_name`,`menu_code`,`parent_id`,`order_num`,`url`,`target`,`menu_type`,`visible`,`is_refresh`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES (4011,'亚马逊TTS配置','awsTtsConf',3019,6,'/cc/fsconf/awsttsconf','menuItem','C','0','1','cc:awsttsconf:view','#','admin',NOW(),'admin',NOW(),'');

INSERT INTO `sys_config` VALUES ('25', '亚马逊', 'config_asr_provider_aws', 'aws', 'Y', 'admin', NOW(), '', NULL, 'ASR厂商-亚马逊');
INSERT INTO `sys_config` VALUES ('34', '亚马逊', 'config_tts_provider_aws', 'aws_tts', 'Y', 'admin', NOW(), '', NULL, 'TTS厂商-亚马逊');

ALTER TABLE cc_tts_aliyun ADD COLUMN language_code VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Language of the voice';
UPDATE cc_tts_aliyun SET language_code = 'zh-CN' WHERE language_code = '';
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Danielle','Danielle','1','aws_tts','1','aws', 'en-US') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Gregory','Gregory','1','aws_tts','1','aws', 'en-US') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Ivy','Ivy','1','aws_tts','1','aws', 'en-US') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Kendra','Kendra','1','aws_tts','1','aws', 'en-US') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Kimberly','Kimberly','1','aws_tts','1','aws', 'en-US') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Céline/Celine','Céline/Celine','1','aws_tts','1','aws', 'fr-FR') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Léa','Léa','1','aws_tts','1','aws', 'fr-FR') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Mathieu','Mathieu','1','aws_tts','1','aws', 'fr-FR') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Rémi','Rémi','1','aws_tts','1','aws', 'fr-FR') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Conchita','Conchita','1','aws_tts','1','aws', 'es-ES') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Lucia','Lucia','1','aws_tts','1','aws', 'es-ES') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Alba','Alba','1','aws_tts','1','aws', 'es-ES') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Enrique','Enrique','1','aws_tts','1','aws', 'es-ES') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Sergio','Sergio','1','aws_tts','1','aws', 'es-ES') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Zhiyu','Zhiyu','1','aws_tts','1','aws', 'cmn-CN') ;
INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('Hiujin','Hiujin','1','aws_tts','1','aws', 'yue-CN') ;

INSERT INTO `sys_config` VALUES ('41', '阿里云tts语言设置', 'config_tts_language_aliyun_tts', '{"zh-CN":"中文"}', 'Y', 'admin', NOW(), '', NULL, '阿里云tts语言设置');
INSERT INTO `sys_config` VALUES ('42', '豆包tts语言设置', 'config_tts_language_doubao_vcl_tts', '{"zh-CN":"中文"}', 'Y', 'admin', NOW(), '', NULL, '豆包tts语言设置');
INSERT INTO `sys_config` VALUES ('43', '亚马逊tts语言设置', 'config_tts_language_aws_tts', '{"en-US":"English(en-US)", "fr-FR":"French(fr-FR)", "es-ES":"Spanish(es-ES)", "cmn-CN":"Chinese(cmn-CN)"}', 'Y', 'admin', NOW(), '', NULL, '亚马逊tts语言设置');

INSERT INTO `sys_config` VALUES ('51', '阿里云asr语言设置', 'config_asr_language_aliyun', '{"zh-CN":"中文"}', 'Y', 'admin', NOW(), '', NULL, '阿里云asr语言设置');
INSERT INTO `sys_config` VALUES ('52', '亚马逊asr语言设置', 'config_asr_language_aws', '{"en-US":"English(en-US)", "fr-FR":"French(fr-FR)", "es-ES":"Spanish(es-ES)", "zh-CN":"Chinese(zh-CN)"}', 'Y', 'admin', NOW(), '', NULL, '亚马逊asr语言设置');

ALTER TABLE cc_inbound_llm_account DROP COLUMN language_code;
ALTER TABLE cc_inbound_llm_account ADD COLUMN asr_language_code VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Language of the asr';
UPDATE cc_inbound_llm_account SET asr_language_code = 'zh-CN' WHERE asr_language_code = '';
ALTER TABLE cc_inbound_llm_account ADD COLUMN tts_language_code VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Language of the tts';
UPDATE cc_inbound_llm_account SET tts_language_code = 'zh-CN' WHERE tts_language_code = '';

ALTER TABLE cc_ivr DROP COLUMN language_code;
ALTER TABLE cc_ivr ADD COLUMN tts_language_code VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Language of the tts';
UPDATE cc_ivr SET tts_language_code = 'zh-CN' WHERE tts_language_code = '';

ALTER TABLE cc_call_task DROP COLUMN language_code;
ALTER TABLE cc_call_task ADD COLUMN asr_language_code VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Language of the asr';
UPDATE cc_call_task SET asr_language_code = 'zh-CN' WHERE asr_language_code = '';
ALTER TABLE cc_call_task ADD COLUMN tts_language_code VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Language of the tts';
UPDATE cc_call_task SET tts_language_code = 'zh-CN' WHERE tts_language_code = '';

-- 2026-03-22
INSERT INTO `cc_llm_agent_provider` VALUES ('10', 'LocalWavFile', '对接本地模型接口-播放录音文件');

-- 2026-03-25
insert  into `sys_menu`(`menu_id`,`menu_name`,`menu_code`,`parent_id`,`order_num`,`url`,`target`,`menu_type`,`visible`,`is_refresh`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`) values (4001,'防火墙管理','firewalld',2000,0,'/system/firewalld','menuItem','C','0','1','system:firewalld:view','#','admin','2025-04-21 16:08:39','admin','2025-05-05 13:00:39','');
insert  into `sys_menu`(`menu_id`,`menu_name`,`menu_code`,`parent_id`,`order_num`,`url`,`target`,`menu_type`,`visible`,`is_refresh`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`) values (4002,'防火墙管理-添加','firewalldAdd',4001,1,'#','','F','0','1','system:firewalld:add','#','admin','2025-04-21 16:08:41','',NULL,'');
insert  into `sys_menu`(`menu_id`,`menu_name`,`menu_code`,`parent_id`,`order_num`,`url`,`target`,`menu_type`,`visible`,`is_refresh`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`) values (4003,'防火墙管理-修改','firewalldEdit',4001,2,'#','','F','0','1','system:firewalld:edit','#','admin','2025-04-21 16:08:44','',NULL,'');
insert  into `sys_menu`(`menu_id`,`menu_name`,`menu_code`,`parent_id`,`order_num`,`url`,`target`,`menu_type`,`visible`,`is_refresh`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`) values (4004,'防火墙管理-删除','firewalldDel',4001,3,'#','','F','0','1','system:firewalld:remove','#','admin','2025-04-21 16:08:45','',NULL,'');


-- 2026-03-31
INSERT INTO `cc_params` VALUES ('102', '客户未说话静默时长', 'max-wait-time-customer-speaking', '7000', 'sys', '0', '1');

-- 2026-04-02
INSERT  INTO `sys_menu`(`menu_id`,`menu_name`,`menu_code`,`parent_id`,`order_num`,`url`,`target`,`menu_type`,`visible`,`is_refresh`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES (4020,'Deepgram ASR配置','deepgramAsrConf',3018,6,'/cc/fsconf/deepgramasrconf','menuItem','C','0','1','cc:deepgramasrconf:view','#','admin',NOW(),'admin',NOW(),'');

INSERT  INTO `sys_menu`(`menu_id`,`menu_name`,`menu_code`,`parent_id`,`order_num`,`url`,`target`,`menu_type`,`visible`,`is_refresh`,`perms`,`icon`,`create_by`,`create_time`,`update_by`,`update_time`,`remark`)
VALUES (4021,'Deepgram TTS配置','deepgramTtsConf',3019,6,'/cc/fsconf/deepgramttsconf','menuItem','C','0','1','cc:deepgramttsconf:view','#','admin',NOW(),'admin',NOW(),'');

INSERT INTO `sys_config` VALUES ('26', 'Deepgram', 'config_asr_provider_deepgram', 'deepgram', 'Y', 'admin', NOW(), '', NULL, 'ASR厂商-deepgram');
INSERT INTO `sys_config` VALUES ('35', 'Deepgram', 'config_tts_provider_deepgram', 'deepgram_tts', 'Y', 'admin', NOW(), '', NULL, 'TTS厂商-deepgram');

INSERT INTO `sys_config` VALUES ('44', 'Deepgramtts语言设置', 'config_tts_language_deepgram_tts', '{"en-us":"English(en-us)", "es-es":"Spanish(es-es)", "fr-fr":"French(fr-fr)", "ja-jp":"Japanese(ja-jp)"}', 'Y', 'admin', NOW(), '', NULL, 'Deepgram tts语言设置');
INSERT INTO `sys_config` VALUES ('53', 'Deepgramasr语言设置', 'config_asr_language_deepgram', '{"en-US":"English(en-US)", "zh-CN":"Chinese(zh-CN)", "es":"Spanish(es)", "fr":"French(fr)", "ja":"Japanese(ja)"}', 'Y', 'admin', NOW(), '', NULL, 'Deepgram asr语言设置');

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('thalia','thalia','1','deepgram_tts','1','deepgram', 'en-us') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('andromeda','andromeda','1','deepgram_tts','1','deepgram', 'en-us') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('helena','helena','1','deepgram_tts','1','deepgram', 'en-us') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('apollo','apollo','1','deepgram_tts','1','deepgram', 'en-us') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('arcas','arcas','1','deepgram_tts','1','deepgram', 'en-us') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('aries','aries','1','deepgram_tts','1','deepgram', 'en-us') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('nestor','nestor','1','deepgram_tts','1','deepgram', 'es-es') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('carina','carina','1','deepgram_tts','1','deepgram', 'es-es') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('alvaro','alvaro','1','deepgram_tts','1','deepgram', 'es-es') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('diana','diana','1','deepgram_tts','1','deepgram', 'es-es') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('agathe','agathe','1','deepgram_tts','1','deepgram', 'fr-fr') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('hector','hector','1','deepgram_tts','1','deepgram', 'fr-fr') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('uzume','uzume','1','deepgram_tts','1','deepgram', 'ja-jp') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('ebisu','ebisu','1','deepgram_tts','1','deepgram', 'ja-jp') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('fujin','fujin','1','deepgram_tts','1','deepgram', 'ja-jp') ;

INSERT INTO `cc_tts_aliyun` ( `voice_name`, `voice_code`, `voice_enabled`, `voice_source`, `priority`, `provider`, language_code)
VALUES ('izanami','izanami','1','deepgram_tts','1','deepgram', 'ja-jp') ;



-- 2026-04-07
ALTER TABLE cc_tts_aliyun ADD COLUMN language_name VARCHAR(255) DEFAULT '' NOT NULL COMMENT 'Language name of the voice';
ALTER TABLE cc_tts_aliyun ADD COLUMN tts_models VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Models of the voice';
UPDATE cc_tts_aliyun SET language_name = '中文' WHERE language_code = 'zh-CN';

ALTER TABLE cc_inbound_llm_account ADD COLUMN asr_models VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Models of the asr';
ALTER TABLE cc_inbound_llm_account ADD COLUMN tts_models VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Models of the tts';

ALTER TABLE cc_ivr ADD COLUMN tts_models VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Models of the tts';

ALTER TABLE cc_call_task ADD COLUMN asr_models VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Models of the asr';
ALTER TABLE cc_call_task ADD COLUMN tts_models VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Models of the tts';

ALTER TABLE his_cc_call_task ADD COLUMN asr_language_code VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Language of the asr';
ALTER TABLE his_cc_call_task ADD COLUMN tts_language_code VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Language of the tts';
ALTER TABLE his_cc_call_task ADD COLUMN asr_models VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Models of the asr';
ALTER TABLE his_cc_call_task ADD COLUMN tts_models VARCHAR(32) DEFAULT '' NOT NULL COMMENT 'Models of the tts';


DROP TABLE IF EXISTS cc_asr_languages;
CREATE TABLE `cc_asr_languages` (
                                    `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT 'id',
                                    `asr_provider` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'provider of asr',
                                    `models` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'models of asr',
                                    `language_code` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'language code',
                                    `language_name` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'language name',
                                    PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


INSERT  INTO `cc_params`(`id`,`param_name`,`param_code`,`param_value`,`param_type`,`hide_value`,`allow_edit`) VALUES (1231316,'firewalld 防火墙配置文件路径','firewalld-config-path','/etc/firewalld/zones/public.xml','sys',0,1);
INSERT  INTO `cc_params`(`id`,`param_name`,`param_code`,`param_value`,`param_type`,`hide_value`,`allow_edit`) VALUES (1231317,'重启firewalld防火墙的命令','firewalld-restart-cmd','/usr/bin/systemctl  restart firewalld','sys',0,1);
INSERT  INTO `cc_params`(`id`,`param_name`,`param_code`,`param_value`,`param_type`,`hide_value`,`allow_edit`) VALUES (1231318,'是否启用firewalld防护墙','firewalld-enabled','true','sys',0,1);
INSERT  INTO `cc_params`(`id`,`param_name`,`param_code`,`param_value`,`param_type`,`hide_value`,`allow_edit`) VALUES (1231319,'呼入ip白名单(用于外部线路呼入)','fs-inbound-allow-ip-list','192.168.67.110\r\n192.168.67.120','sys',0,1);
INSERT  INTO `cc_params`(`id`,`param_name`,`param_code`,`param_value`,`param_type`,`hide_value`,`allow_edit`) VALUES (1231320,'分机注册的白名单 ','fs-register-allow-ip-list','192.168.67.110\r\n192.168.67.120','sys',0,1);
INSERT  INTO `cc_params`(`id`,`param_name`,`param_code`,`param_value`,`param_type`,`hide_value`,`allow_edit`) VALUES (1231321,'是否启用freeswitch的分机注册防护','fs-register-acl-enabled','true','sys',0,1);



