V5
XSwitch v5.0.2 版发布
更新和 Bug 修复
XSwitch 更新
- 使用
1.10.9-dev git cea58b1 2022-12-06 02:51:54Z 64bit
; - 推送
xswitch-1.10.8
分支至master
; mod_conference
修复会议成员播放TTS
崩溃问题;- 支持
fsctl reload_switch_conf
; mod_lua
中支持POST
获取响应headers
;
XUI 更新
- 使用
xui-lua-4.0.2-20221212130226
版本; - 修改功能码,支持
*
或#
开头设置; - 媒体文件及话单页面,表格增加列可播放录音;
- 首页工作台显示
SIP
分机注册数,如果是注册在Kamailio
,需要在xtra_config.lua
里打开参数config.cluster
和config.kamailio_servers
; - 修复分机等页面导入
xlsx
后提示,关闭对话框,显示新数据; - 媒体文件/话单页面最外层增加语音文件播放功能;
- 会议控制页面增加
结束会议
; - 优化用户/分机显示,解决当数量较多时页面显示较慢问题;
- 优化了整体布局显示;
- 在
XUI
界面中增加了核心配置
功能页面;
升级建议
可以按照部署文档重新从头搭建。
如果系统中使用的5.0.1
版本,需要修改镜像名称和版本号以及更新数据库,具体操作如下:
Linux 修改docker-compose.yml
文件,Mac 修改docker-compose-mac.yml
文件,将文件中service
为xswitch
的image
一行的版本号由5.0.1
改为5.0.2
镜像名称xswitch-lua-js-free
修改为xswitch-community
。
ccr.ccs.tencentyun.com/free/xswitch-lua-js-free:5.0.1
修改为
ccr.ccs.tencentyun.com/free/xswitch-community:5.0.2
如果用 Nginx,还需要按照上边把service
为xswitch-nginx-xui
的image
一行的镜像名称和版本号也修改为5.0.2
。
此次更新数据库操作。
CREATE TABLE switch_conf_profiles ( id SERIAL PRIMARY KEY, name VARCHAR NOT NULL, 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 switch_conf_profiles_name ON switch_conf_profiles(name); CREATE INDEX switch_conf_profiles_deleted_at ON switch_conf_profiles(deleted_at); CREATE TRIGGER t_auto_update_updated_at_on_switch_conf_profiles BEFORE UPDATE ON switch_conf_profiles FOR EACH ROW EXECUTE PROCEDURE auto_update_updated_at(); INSERT INTO switch_conf_profiles(name, description, disabled) VALUES('switch_conf', 'default', 0); --switch.conf cli-keybindings INSERT INTO params (realm, k, v) VALUES ('REALMS', 'SWITCH-CONF-CLI-KEYBINDINGS', 'Switch Cli Key Bindings'); -- switch.conf default-ptimes INSERT INTO params (realm, k, v) VALUES ('REALMS', 'SWITCH-CONF-DEFAULT-PTIMES', 'Switch Default Ptimes'); --switch.conf settings INSERT INTO params (realm, k, v) VALUES ('REALMS', 'SWITCH-CONF-SETTINGS', 'Switch Settings'); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '1', 'help', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '2', 'status', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '3', 'show channels', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '4', 'show calls', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '5', 'sofia status', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '6', 'reloadxml', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '7', 'console loglevel 0', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '8', 'console loglevel 7', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '9', 'sofia status profile internal', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '10', 'sofia profile internal siptrace on', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '11', 'sofia profile internal siptrace off', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '12', 'version', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-DEFAULT-PTIMES', 'G729', '40', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'colorize-console', 'true', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'dialplan-timestamps', 'false', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', '1ms-timer', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'switchname', 'freeswitch', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'cpu-idle-smoothing-depth', '30', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'max-db-handles', '50', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'db-handle-timeout', '10', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'min-idle-cpu', '25', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'max-sessions', '1000', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'sessions-per-second', '30', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'loglevel', 'debug', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'debug-level', '10', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'sql-buffer-len', '1m', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'max-sql-buffer-len', '2m', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'min-dtmf-duration', '400', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'max-dtmf-duration', '192000', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'default-dtmf-duration', '2000', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'mailer-app', 'msmtp', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'mailer-app-1', 'sendmail', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'mailer-app-args', '-t', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'dump-cores', 'yes', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'verbose-channel-events', 'no', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-clock-nanosleep', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-monotonic-timing', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-softtimer-timerfd', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-cond-yield', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-timer-matrix', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'threaded-system-exec', 'true', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'tipping-point', '0', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'timer-affinity', 'disabled', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'rtp-start-port', '$${rtp_start_port}', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'rtp-end-port', '$${rtp_end_port}', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'rtp-port-usage-robustness', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'rtp-enable-zrtp"', 'false', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'rtp-retain-crypto-keys', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-dsn-1', 'pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='''' options=''-c client_min_messages=NOTICE''', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-dsn', 'sqlite://memory://file:core.db?mode=memory&cache=shared', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-name', '/dev/shm/core.db', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'auto-create-schemas', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'auto-clear-sql', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-early-hangup', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-dbtype', 'MSSQL', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'multiple-registrations', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'blank-image-size', '1280x720', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'blank-image-color', '#0000ff', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'default-fps', '15', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '1', 'help', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '2', 'status', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '3', 'show channels', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '4', 'show calls', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '5', 'sofia status', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '6', 'reloadxml', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '7', 'console loglevel 0', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '8', 'console loglevel 7', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '9', 'sofia status profile internal', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '10', 'sofia profile internal siptrace on', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '11', 'sofia profile internal siptrace off', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-CLI-KEYBINDINGS', '12', 'version', 0, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-DEFAULT-PTIMES', 'G729', '40', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'colorize-console', 'true', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'dialplan-timestamps', 'false', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', '1ms-timer', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'switchname', 'freeswitch', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'cpu-idle-smoothing-depth', '30', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'max-db-handles', '50', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'db-handle-timeout', '10', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'min-idle-cpu', '25', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'max-sessions', '1000', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'sessions-per-second', '30', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'loglevel', 'debug', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'debug-level', '10', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'sql-buffer-len', '1m', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'max-sql-buffer-len', '2m', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'min-dtmf-duration', '400', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'max-dtmf-duration', '192000', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'default-dtmf-duration', '2000', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'mailer-app', 'msmtp', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'mailer-app', 'sendmail', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'mailer-app-args', '-t', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'dump-cores', 'yes', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'verbose-channel-events', 'no', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-clock-nanosleep', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-monotonic-timing', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-softtimer-timerfd', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-cond-yield', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-timer-matrix', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'threaded-system-exec', 'true', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'tipping-point', '0', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'timer-affinity', 'disabled', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'rtp-start-port', '$${rtp_start_port}', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'rtp-end-port', '$${rtp_end_port}', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'rtp-port-usage-robustness', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'rtp-enable-zrtp"', 'false', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'rtp-retain-crypto-keys', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-dsn', 'pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='''' options=''-c client_min_messages=NOTICE''', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-dsn', 'sqlite://memory://file:core.db?mode=memory&cache=shared', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-name', '/dev/shm/core.db', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'auto-create-schemas', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'auto-clear-sql', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-early-hangup', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-dbtype', 'MSSQL', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'multiple-registrations', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'blank-image-size', '1280x720', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'blank-image-color', '#0000ff', 1, 0); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'default-fps', '15', 1, 0); INSERT INTO system_menus (k, url, sort, module_id, icon) VALUES ('Switch Conf', '/settings/switch_conf', 3, (SELECT id FROM system_modules WHERE v = 'SMENUS_ADVANCE'), 'ProfileOutlined'); -- Switch Conf INSERT INTO system_buttons (k, button_no, menu_id) VALUES ('New Switch Conf', 'switch_conf_new', (SELECT id FROM system_menus WHERE url = '/settings/switch_conf')); INSERT INTO system_buttons (k, button_no, menu_id) VALUES ('Reload Switch Conf', 'switch_conf_reload', (SELECT id FROM system_menus WHERE url = '/settings/switch_conf')); INSERT INTO system_buttons (k, button_no, menu_id) VALUES ('Edit Switch Conf', 'switch_conf_edit', (SELECT id FROM system_menus WHERE url = '/settings/switch_conf')); INSERT INTO system_buttons (k, button_no, menu_id) VALUES ('Delete Switch Conf', 'switch_conf_delete', (SELECT id FROM system_menus WHERE url = '/settings/switch_conf')); INSERT INTO system_buttons (k, button_no, menu_id) VALUES ('New Switch Conf', 'switch_conf_params_new', (SELECT id FROM system_menus WHERE url = '/settings/switch_conf')); INSERT INTO system_buttons (k, button_no, menu_id) VALUES ('Edit Switch Conf Param', 'switch_conf_params_edit', (SELECT id FROM system_menus WHERE url = '/settings/switch_conf')); INSERT INTO system_buttons (k, button_no, menu_id) VALUES ('Delete Switch Conf Param', 'switch_conf_params_delete', (SELECT id FROM system_menus WHERE url = '/settings/switch_conf')); UPDATE dicts SET v = '4.0.1' WHERE realm = 'XUI' and k = 'DBVER'; INSERT INTO logs (resource, action, user_id, user_name, summary, message) VALUES('XUI', 'UPDATE', 0, 'SYSTEM', '4.0.1', '{"DEVER": "4.0.1"}'); ALTER TABLE extensions ADD COLUMN enable_cb_onbusy INTEGER DEFAULT 0; CREATE TABLE extn_callback_onbusy ( id SERIAL PRIMARY KEY, domain VARCHAR, caller_id_number VARCHAR, destination_number VARCHAR, created_at TIMESTAMP(0) DEFAULT now() ); CREATE INDEX extn_callback_onbusy_created_at ON extn_callback_onbusy(created_at); UPDATE dicts SET v = '4.0.2' WHERE realm = 'XUI' and k = 'DBVER'; INSERT INTO logs (resource, action, user_id, user_name, summary, message) VALUES('XUI', 'UPDATE', 0, 'SYSTEM', '4.0.2', '{"DEVER": "4.0.2"}'); --switch.conf variables INSERT INTO params (realm, k, v) VALUES ('REALMS', 'SWITCH-CONF-VARIABLES', 'Switch Variables'); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'odbc-skip-autocommit-flip', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'event-heartbeat-interval', '20', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'session-thread-pool', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'api-expansion', 'true', 0, 1); -- core-db-pre-trans-execute and core-db-post-trans-execute to wrap sql stmts around the core transactions -- core-db-pre-trans-execute execute sql before trans INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-pre-trans-execute', 'pre trans sql', 0, 1); -- core-db-post-trans-execute sql post trans INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-post-trans-execute', 'post trans sql', 0, 1); -- core-db-inner-pre-trans-execute inner sql pre trans, execute later than core-db-pre-trans-execute INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-inner-pre-trans-execute', 'inner pre trans sql', 0, 1); -- core-db-post-trans-execute execute inner sql post trans, execute early than core-db-post-trans-execute INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-inner-post-trans-execute', 'inner post trans sql', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-use-system-time', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'spawn-instead-of-system', 'value', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'exclude-error-log-from-xml-cdr', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'events-use-dispatch', 'true', 0, 1); -- cannot be higher than cpu_count/2 INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'initial-event-threads', '1', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'ice-resolve-candidate', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-non-sqlite-db-required', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'caller-profile-soft-variables-uses-prefix', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'caller-profile-soft-lookup-values', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'event-channel-key-separator', '.', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'event-channel-enable-hierarchy-deliver', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'event-channel-hierarchy-deliver-once', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'event-channel-log-undeliverable-json', 'true', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'max-audio-channels', '2', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-VARIABLES', 'test_key', 'test_val', 0, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'odbc-skip-autocommit-flip', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'event-heartbeat-interval', '20', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'session-thread-pool', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'api-expansion', 'true', 1, 1); -- core-db-pre-trans-execute and core-db-post-trans-execute to wrap sql stmts around the core transactions -- core-db-pre-trans-execute execute sql before trans INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-pre-trans-execute', 'pre trans sql', 1, 1); -- core-db-post-trans-execute sql post trans INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-post-trans-execute', 'post trans sql', 1, 1); -- core-db-inner-pre-trans-execute inner sql pre trans, execute later than core-db-pre-trans-execute INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-inner-pre-trans-execute', 'inner pre trans sql', 1, 1); -- core-db-post-trans-execute execute inner sql post trans, execute early than core-db-post-trans-execute INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-db-inner-post-trans-execute', 'inner post trans sql', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'enable-use-system-time', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'spawn-instead-of-system', 'value', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'exclude-error-log-from-xml-cdr', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'events-use-dispatch', 'true', 1, 1); -- cannot be higher than cpu_count/2 INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'initial-event-threads', '1', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'ice-resolve-candidate', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'core-non-sqlite-db-required', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'caller-profile-soft-variables-uses-prefix', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'caller-profile-soft-lookup-values', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'event-channel-key-separator', '.', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'event-channel-enable-hierarchy-deliver', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'event-channel-hierarchy-deliver-once', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'event-channel-log-undeliverable-json', 'true', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-SETTINGS', 'max-audio-channels', '2', 1, 1); INSERT INTO params(realm, k, v, ref_id, disabled) VALUES('SWITCH-CONF-VARIABLES', 'test_key', 'test_val', 1, 1); ALTER TABLE extensions ADD caller_display INTEGER DEFAULT 1; UPDATE dicts SET v = '4.0.3' WHERE realm = 'XUI' and k = 'DBVER'; INSERT INTO logs (resource, action, user_id, user_name, summary, message) VALUES('XUI', 'UPDATE', 0, 'SYSTEM', '4.0.3', '{"DEVER": "4.0.3"}'); INSERT INTO dicts (realm, k, v, d) VALUES ('XUI_SCRIPTS', 'Local-Extn-Gateway', 'xui/local_extn_out_gw.lua', '本地分机不存在则通过网关出局'); INSERT INTO params (realm, k, v, disabled) VALUES ('GLOBAL', 'out_call_gw_default', 'gw', 1); UPDATE dicts SET v = '4.0.4' WHERE realm = 'XUI' and k = 'DBVER'; INSERT INTO logs (resource, action, user_id, user_name, summary, message) VALUES('XUI', 'UPDATE', 0, 'SYSTEM', '4.0.4', '{"DEVER": "4.0.4"}'); ALTER TABLE acl_nodes ADD port_type INTEGER; ALTER TABLE acl_nodes ADD port VARCHAR; ALTER TABLE acl_nodes ADD ports VARCHAR; ALTER TABLE acl_nodes ADD min_port VARCHAR; ALTER TABLE acl_nodes ADD max_port VARCHAR; UPDATE dicts SET v = '4.0.5' WHERE realm = 'XUI' and k = 'DBVER'; INSERT INTO logs (resource, action, user_id, user_name, summary, message) VALUES('XUI', 'UPDATE', 0, 'SYSTEM', '4.0.5', '{"DEVER": "4.0.5"}'); UPDATE system_menus SET module_id = (SELECT id FROM system_modules WHERE v = 'SMENUS_CALLCENTER'), sort = 2, k = 'Agents Status' WHERE url = '/settings/fsagents'; UPDATE dicts SET v = '4.0.6' WHERE realm = 'XUI' and k = 'DBVER'; INSERT INTO logs (resource, action, user_id, user_name, summary, message) VALUES('XUI', 'UPDATE', 0, 'SYSTEM', '4.0.6', '{"DEVER": "4.0.6"}');
修改后,执行make down
关闭服务。
再执行make up
重新启动服务,如果想用 nginx 则执行make up-nginx
。
结语
如果您刚接触 XSwitch,可以先阅读XSwitch 快速入门。
如果大家在使用过程中遇到什么问题,可以参考https://xswitch.cn/pages/howto/trouble-shoot/。
如果大家对我们的产品有好的意见或建议,欢迎给我们反馈。感谢您使用 XSwitch。