diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java index 4ddbc22be..63c66516e 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java @@ -628,8 +628,13 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements request.getCallIdHeader().getCallId(), sendRtpItem.getApp(), sendRtpItem.getStream(), sendRtpItem.getSsrc(), sendRtpItem.getMediaServerId(), sipResponse, InviteSessionType.BROADCAST); sessionManager.put(ssrcTransaction); // 开启发流,大华在收到200OK后就会开始建立连接 - if (!device.isBroadcastPushAfterAck()) { - log.info("[语音喊话] 回复200OK后发现 BroadcastPushAfterAck为False,现在开始推流"); + if (sendRtpItem.isTcpActive() || !device.isBroadcastPushAfterAck()) { + if (sendRtpItem.isTcpActive()) { + log.info("[语音喊话] 监听端口等待设备连接后推流"); + }else { + log.info("[语音喊话] 回复200OK后发现 BroadcastPushAfterAck为False,现在开始推流"); + } + playService.startPushStream(sendRtpItem, channel, sipResponse, parentPlatform, request.getCallIdHeader()); } diff --git a/数据库/2.7.3/初始化-mysql-2.7.3.sql b/数据库/2.7.3/初始化-mysql-2.7.3.sql index 0d0a4f2c7..284c2d712 100644 --- a/数据库/2.7.3/初始化-mysql-2.7.3.sql +++ b/数据库/2.7.3/初始化-mysql-2.7.3.sql @@ -159,6 +159,8 @@ create table IF NOT EXISTS wvp_device_channel gps_speed double precision, gps_altitude double precision, gps_direction double precision, + index (data_type), + index (data_device_id), constraint uk_wvp_unique_channel unique (gb_device_id) ); diff --git a/数据库/2.7.3/初始化-postgresql-kingbase-2.7.3.sql b/数据库/2.7.3/初始化-postgresql-kingbase-2.7.3.sql index 05d04538e..762a9ccf4 100644 --- a/数据库/2.7.3/初始化-postgresql-kingbase-2.7.3.sql +++ b/数据库/2.7.3/初始化-postgresql-kingbase-2.7.3.sql @@ -159,6 +159,8 @@ create table IF NOT EXISTS wvp_device_channel gps_speed double precision, gps_altitude double precision, gps_direction double precision, + index (data_type), + index (data_device_id), constraint uk_wvp_unique_channel unique (gb_device_id) ); diff --git a/数据库/2.7.3/更新-mysql-2.7.1升级到2.7.3.sql b/数据库/2.7.3/更新-mysql-2.7.1升级到2.7.3.sql index e5c83a89c..da2d0f6e2 100644 --- a/数据库/2.7.3/更新-mysql-2.7.1升级到2.7.3.sql +++ b/数据库/2.7.3/更新-mysql-2.7.1升级到2.7.3.sql @@ -171,6 +171,8 @@ create table IF NOT EXISTS wvp_device_channel gps_speed double precision, gps_altitude double precision, gps_direction double precision, + index (data_type), + index (data_device_id), constraint uk_wvp_unique_channel unique (gb_device_id) ); diff --git a/数据库/2.7.3/更新-mysql-2.7.3.sql b/数据库/2.7.3/更新-mysql-2.7.3.sql index 515fb9844..6115ef1ac 100644 --- a/数据库/2.7.3/更新-mysql-2.7.3.sql +++ b/数据库/2.7.3/更新-mysql-2.7.3.sql @@ -267,5 +267,27 @@ call wvp_20250319(); DROP PROCEDURE wvp_20250319; DELIMITER ; +/* +* 20250402 +*/ +DELIMITER // -- 重定义分隔符避免分号冲突 +CREATE PROCEDURE `wvp_20250402`() +BEGIN + IF NOT EXISTS (SELECT column_name FROM information_schema.STATISTICS + WHERE TABLE_SCHEMA = (SELECT DATABASE()) and table_name = 'wvp_device_channel' and INDEX_NAME = 'data_type') + THEN + create index data_type on wvp_device_channel (data_type); + END IF; + IF NOT EXISTS (SELECT column_name FROM information_schema.STATISTICS + WHERE TABLE_SCHEMA = (SELECT DATABASE()) and table_name = 'wvp_device_channel' and INDEX_NAME = 'data_device_id') + THEN + create index data_device_id on wvp_device_channel (data_device_id); + END IF; + +END; // +call wvp_20250402(); +DROP PROCEDURE wvp_20250402; +DELIMITER ; + diff --git a/数据库/2.7.3/更新-postgresql-kingbase-2.7.1升级到2.7.3.sql b/数据库/2.7.3/更新-postgresql-kingbase-2.7.1升级到2.7.3.sql index b312323f2..e7ca6887f 100644 --- a/数据库/2.7.3/更新-postgresql-kingbase-2.7.1升级到2.7.3.sql +++ b/数据库/2.7.3/更新-postgresql-kingbase-2.7.1升级到2.7.3.sql @@ -137,6 +137,8 @@ create table IF NOT EXISTS wvp_device_channel gps_speed double precision, gps_altitude double precision, gps_direction double precision, + index (data_type), + index (data_device_id), constraint uk_wvp_unique_channel unique (gb_device_id) ); diff --git a/数据库/2.7.3/更新-postgresql-kingbase-2.7.3.sql b/数据库/2.7.3/更新-postgresql-kingbase-2.7.3.sql index 2de2d1efe..334dc8dcf 100644 --- a/数据库/2.7.3/更新-postgresql-kingbase-2.7.3.sql +++ b/数据库/2.7.3/更新-postgresql-kingbase-2.7.3.sql @@ -102,4 +102,10 @@ alter table wvp_device_channel add column if not exists gps_speed double precisi alter table wvp_device_channel add column if not exists gps_altitude double precision; alter table wvp_device_channel add column if not exists gps_direction double precision; +/* +* 20250402 +*/ +create index if not exists data_type on wvp_device_channel (data_type); +create index if not exists data_device_id on wvp_device_channel (data_device_id); +