2.7 KiB
2.7 KiB
FreeSWITCH 媒体模式说明
当前 FreeSWITCH 仅作为媒体通道使用,默认不启用 MySQL/PostgreSQL core-db,也不再根据 mysql/postgresql 场景切换 FreeSWITCH conf。
说明:
start.sh仍会自动确保 bytedesk 应用数据库存在,即MYSQL_DATABASE/POSTGRES_DB/ORACLE_DATABASE/KINGBASE_DATABASE。call/call webrtc组合下,FreeSWITCH 不再依赖FREESWITCH_DATABASE、FS_CORE_DB_MODULE、FS_CORE_DB_DSN。- 历史文件
compose-call-db-mysql.yaml、compose-call-db-postgresql.yaml已删除,启动脚本不会再加载。
向 bytedesk_freeswitch 插入测试数据
推荐使用脚本(更短、更不易输错):
cd deploy/docker
# MySQL + Artemis
./insert-freeswitch-input.sh mysql "hello-freeswitch" artemis
# PostgreSQL + RabbitMQ
./insert-freeswitch-input.sh postgresql "hello-freeswitch" rabbitmq
参数说明:./insert-freeswitch-input.sh <db> <message> [mq]
db:mysql | postgresql | pgmessage: 要插入的文本内容mq:artemis | rabbitmq(默认artemis)
常见问题排查
cd deploy/docker
./stop.sh postgresql call middleware down
./start.sh postgresql call middleware
docker inspect --format 'Status={{.State.Status}} Health={{if .State.Health}}{{.State.Health.Status}}{{else}}none{{end}} RestartCount={{.RestartCount}}' freeswitch-bytedesk
docker logs --tail 200 freeswitch-bytedesk 2>&1 | grep -E "NO SUITABLE DATABASE INTERFACE|Cannot load modules" || true
- 预期结果:
Health=healthy,且日志不再出现上述错误关键字。
docker compose --env-file .env -p bytedesk \
-f compose/compose-redis.yaml \
-f compose/compose-elasticsearch.yaml \
-f compose/compose-postgresql.yaml \
-f compose/compose-artemis.yaml \
-f compose/compose-freeswitch.yaml \
-f compose/compose-mrcp.yaml \
up -d --force-recreate --remove-orphans bytedesk-postgresql bytedesk-freeswitch
- 验证 FreeSWITCH 是否就绪:
docker exec freeswitch-bytedesk bash -lc "(echo >/dev/tcp/127.0.0.1/8021) >/dev/null 2>&1 && echo TCP_8021_OPEN || echo TCP_8021_CLOSED"
docker exec freeswitch-bytedesk fs_cli -H 127.0.0.1 -P 8021 -p bytedesk123 -x "status"