V4

XSwitch v4.0.6 版发布

更新和 Bug 修复

XSwitch 更新内容

  • 使用 1.10.8-dev git ebdbc4c 2022-09-20 01:04:04Z 64bit 版本;
  • 修复 loopback 模块音频呼叫中崩溃问题;
  • 修复录像花屏问题;

XUI 更新

  • 使用 xui-lua-3.0.6-20220928150622-d2e0e63d 版本;
  • 修改会议 pin 输入限制;
  • 添加媒体文件获取 uuid
  • 修复分机彩铃不生效 Bug;
  • 增加会议旁听者;
  • 会议邀请增加“即将进入会议”提示音;
  • 修复路由到分配器呼叫字符串不存在 Bug;
  • 增加会议中如果修改会议容量立即生效功能;
  • 修复查询分机注册状态接口返回数据不对问题;

XCC 更新

  • 增加坐席抢话 API 功能;
  • 调整 Accept 接口 ctrl_uuid 优先级,优先将消息发送给 ctrl_uuid
  • 在挂断通道变量中添加数据;
  • 重构 STARTTRACK 的事件发送逻辑;
  • 修复 takeover 错误问题;

升级建议

可以按照部署文档重新从头搭建。

如果系统中使用的4.0.5版本,需要修改镜像名称和版本号以及更新数据库,具体操作如下:

Linux 修改docker-compose.yml文件,Mac 修改docker-compose-mac.yml文件,将文件中servicexswitchimage一行的版本号由4.0.5改为4.0.6

ccr.ccs.tencentyun.com/free/xswitch-lua-js-free:4.0.5

修改为

ccr.ccs.tencentyun.com/free/xswitch-lua-js-free:4.0.6

如果用 Nginx,还需要按照上边把servicexswitch-nginx-xuiimage一行的镜像名称和版本号也修改为4.0.6

更新数据库操作,首先登录数据库。

docker exec -it xswitch-pg bash
psql -U xui

导入数据库语句,从版本3.0.5升级到3.0.7

ALTER TABLE meetings ADD helpers_user_name VARCHAR;
UPDATE system_menus SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_USERS'),sort = 2 WHERE url = '/settings/extensions';
UPDATE system_modules SET sort = 1 WHERE v = 'SMENUS_USERS';
UPDATE system_menus SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_CONFERENCE'),sort = 7 WHERE url = '/settings/conference_cdrs';
UPDATE system_menus SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_CALLCENTER'),sort = 3 WHERE url = '/settings/callcenter_cdrs';
UPDATE system_menus SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_CALLCENTER'),sort = 4 WHERE url = '/settings/fifo_cdrs';
UPDATE system_modules SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_ADVANCE'), sort = 4, level = 1, leaf_flag = 1 WHERE v = 'SMENUS_BILL';
UPDATE system_modules SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_ADVANCE'), sort = 5, level = 1, leaf_flag = 1 WHERE v = 'SMENUS_AI';
INSERT INTO system_modules (k, v, icon, level, sort, leaf_flag) VALUES ('Modules Configuration', 'SMENUS_Modules', 'DatabaseOutlined', 1, 6, 1);
UPDATE system_menus SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_Modules'),sort = 1 WHERE url = '/settings/module';
UPDATE system_menus SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_Modules'),sort = 2 WHERE url = '/settings/xcc';
UPDATE system_menus SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_Modules'),sort = 3 WHERE url = '/settings/xcc_rtc';
UPDATE system_menus SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_Modules'),sort = 4 WHERE url = '/settings/wxapp';
UPDATE system_menus SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_Modules'),sort = 5 WHERE url = '/settings/xui_profile';
UPDATE system_menus SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_Modules'),sort = 6 WHERE url = '/settings/eventsocket';
UPDATE system_modules set module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_ADVANCE') WHERE v = 'SMENUS_Modules';
DELETE FROM system_menus WHERE url = '/settings/mcasts' AND module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_SYSTEM_SETTINGS');

UPDATE dicts SET v = '3.0.6' WHERE realm = 'XUI' and k = 'DBVER';
INSERT INTO logs (resource, action, user_id, user_name, summary, message)
	VALUES('XUI', 'UPDATE', 0, 'SYSTEM', '3.0.6', '{"DEVER": "3.0.6"}');

-- 功能码
CREATE TABLE func_codes (
	id SERIAL PRIMARY KEY,
	func_code VARCHAR NOT NULL,		-- 功能码号码
	func_type VARCHAR,				-- 功能列表类型
	description VARCHAR,
	disabled INTEGER DEFAULT 0,     -- 是否启用
	created_at TIMESTAMP(0) DEFAULT now(),
	updated_at TIMESTAMP(0) DEFAULT now(),
	deleted_at TIMESTAMP(0)
);
CREATE UNIQUE INDEX func_codes_func_code ON func_codes(func_code);

INSERT INTO system_menus (k, url, sort, module_id, icon) VALUES ('Function code', '/settings/function_codes', 9, (SELECT id FROM system_modules WHERE v = 'SMENUS_CALL'), 'HddOutlined');
INSERT INTO dicts (realm, k, v, d) VALUES ('REALMS', 'FUNC_CODE', 'Func Code', '功能码');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_FUNC_CALL_FORWARDING', 'CALL_FORWARDING', '1');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_FUNC_CALL_FORWARDING_CANCEL', 'CALL_FORWARDING_CANCEL', '2');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_FUNC_CALL_FORWARD_BUSY', 'CALL_FORWARD_BUSY', '3');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_FUNC_CALL_FORWARD_BUSY_CANCEL', 'CALL_FORWARD_BUSY_CANCEL', '4');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_FUNC_CALL_FORWARD_WITHOUT_RESPONSE', 'CALL_FORWARD_WITHOUT_RESPONSE', '5');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_FUNC_CALL_FORWARD_WITHOUT_RESPONSE_CANCEL', 'CALL_FORWARD_WITHOUT_RESPONSE_CANCEL', '6');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_FUNC_CALL_DND', 'CALL_DND', '7');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_FUNC_CALL_DND_CANCEL', 'CALL_DND_CANCEL', '8');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_FORCE_INSERT', 'FORCE_INSERT', '9');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_FORCE_BREAKDOWN', 'FORCE_BREAKDOWN', '10');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_EAVESDROP', 'EAVESDROP', '17');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_LAST_INTERCEPT', 'LAST_INTERCEPT', '11');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE', 'FS_DEST_DEST_INTERCEPT', 'DEST_INTERCEPT', '12');
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE','FS_DEST_FUNC_CALL_VOICEMAIL','VOICEMAIL',13);
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE','FS_DEST_FUNC_CALL_FIFO_BACK','FIFO_BACK',14);
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE','FS_DEST_FUNC_CALL_RECORD','RECORD',15);
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE','FS_DEST_TIMELY_MEETING','TIMELY_MEETING',16);
INSERT INTO dicts (realm, k, v, o) VALUES ('FUNC_CODE','FS_DEST_MCASTS','MCASTS',17);
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*57*','FS_DEST_FUNC_CALL_FORWARDING','设置无条件前转');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*57#','FS_DEST_FUNC_CALL_FORWARDING_CANCEL','取消无条件前转');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*40*','FS_DEST_FUNC_CALL_FORWARD_BUSY','设置遇忙前转');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*40#','FS_DEST_FUNC_CALL_FORWARD_BUSY_CANCEL','取消遇忙前转');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*41*','FS_DEST_FUNC_CALL_FORWARD_WITHOUT_RESPONSE','设置无应答前转');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*41#','FS_DEST_FUNC_CALL_FORWARD_WITHOUT_RESPONSE_CANCEL','取消无应答前转');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*97','FS_DEST_FUNC_CALL_DND','设置免打扰');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*98','FS_DEST_FUNC_CALL_DND_CANCEL','取消免打扰');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*62','FS_DEST_FORCE_INSERT','强插');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*63','FS_DEST_FORCE_BREAKDOWN','强拆');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*78','FS_DEST_EAVESDROP','监听');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*75','FS_DEST_LAST_INTERCEPT','代答最近号码');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*76','FS_DEST_DEST_INTERCEPT','代答指定号码');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*85','FS_DEST_FUNC_CALL_VOICEMAIL','听取留言');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*77','FS_DEST_FUNC_CALL_FIFO_BACK','取回停泊号码');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*99','FS_DEST_FUNC_CALL_RECORD','录音');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*86','FS_DEST_TIMELY_MEETING','立即会议接入码');
INSERT INTO func_codes (func_code, func_type, description) VALUES ('*79','FS_DEST_MCASTS','组播');

UPDATE dicts SET v = '3.0.7' WHERE realm = 'XUI' and k = 'DBVER';
INSERT INTO logs (resource, action, user_id, user_name, summary, message)
	VALUES('XUI', 'UPDATE', 0, 'SYSTEM', '3.0.7', '{"DEVER": "3.0.7"}');

修改后,执行make down关闭服务。

再执行make up重新启动服务,如果想用 nginx 则执行make up-nginx

结语

如果您刚接触 XSwitch,可以先阅读XSwitch 快速入门

如果大家在使用过程中遇到什么问题,可以参考https://xswitch.cn/pages/howto/trouble-shoot/

如果大家对我们的产品有好的意见或建议,欢迎给我们反馈。感谢您使用 XSwitch。

4.0.7