-- 2026-05-22
-- Keep the old aliyun provider and add an independent ali provider for mod_ali_asr.
DELETE FROM `sys_config`
WHERE `config_key` = 'config_asr_provider_ali';

INSERT INTO `sys_config` (`config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `remark`)
VALUES ('阿里ASR(新)', 'config_asr_provider_ali', 'ali', 'Y', 'admin', NOW(), 'ASR厂商-mod_ali_asr');

DELETE FROM `sys_role_menu`
WHERE `menu_id` = 4022;

DELETE FROM `sys_menu`
WHERE `menu_id` = 4022
   OR `perms` = 'cc:aliasrbridgeconf:view'
   OR `url` = '/cc/fsconf/aliasrbridgeconf';

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`, `remark`)
VALUES (4022, '阿里ASR配置(新)', 'aliAsrBridgeConf', 3018, 7, '/cc/fsconf/aliasrbridgeconf', 'menuItem', 'C', '0', '1', 'cc:aliasrbridgeconf:view', '#', 'admin', NOW(), 'mod_ali_asr 参数配置菜单');

INSERT INTO `sys_role_menu` (`role_id`, `menu_id`)
VALUES (2, 4022);

DELETE FROM `cc_asr_languages`
WHERE `asr_provider` = 'ali'
  AND `models` = 'fun-asr-flash-8k-realtime'
  AND `language_code` = 'zh-CN';

INSERT INTO `cc_asr_languages` (`asr_provider`, `models`, `language_code`, `language_name`)
VALUES ('ali', 'fun-asr-flash-8k-realtime', 'zh-CN', '中文');

UPDATE `cc_params`
SET `param_name` = '双向asr语音识别，使用哪个asr引擎(chinatelecom/funasr/aliyun/ali)'
WHERE `param_code` = 'fs_call_asr_engine';

UPDATE `sys_config`
SET `config_value` = 'v20260217'
WHERE `config_key` = 'sys.version';
