From 335916f1f15eb9d0b34dea38cacee2300eac0606 Mon Sep 17 00:00:00 2001
From: 李防 <liguofang0703@126.com>
Date: 星期一, 07 三月 2022 14:20:27 +0800
Subject: [PATCH] InviteRequestProcessor类中,channelid从invite消息的header subject获取,不再从第一行request line获取。原因是和第三方平台对接时,发送的invite消息第一行为国标平台编码而不是设备通道编码,导致报错通道不存在,返回404。

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java
index 79cb5cc..9d0e354 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java
@@ -63,10 +63,9 @@
             mediaServerService.addToDatabase(mediaConfig.getMediaSerItem());
         }else {
             MediaServerItem mediaSerItem = mediaConfig.getMediaSerItem();
-            mediaSerItem.setId(defaultMediaServer.getId());
             mediaServerService.updateToDatabase(mediaSerItem);
         }
-
+        mediaServerService.syncCatchFromDatabase();
         // 璁㈤槄 zlm鍚姩浜嬩欢, 鏂扮殑zlm涔熶細浠庤繖閲岃繘鍏ョ郴缁�
         hookSubscribe.addSubscribe(ZLMHttpHookSubscribe.HookType.on_server_started,null,
                 (MediaServerItem mediaServerItem, JSONObject response)->{
@@ -89,10 +88,11 @@
                 });
 
         // 鑾峰彇zlm淇℃伅
-        logger.info("绛夊緟榛樿zlm鎺ュ叆...");
+        logger.info("[zlm鎺ュ叆]绛夊緟榛樿zlm涓�...");
 
         // 鑾峰彇鎵�鏈夌殑zlm锛� 骞跺紑鍚富鍔ㄨ繛鎺�
         List<MediaServerItem> all = mediaServerService.getAllFromDatabase();
+        mediaServerService.updateVmServer(all);
         if (all.size() == 0) {
             all.add(mediaConfig.getMediaSerItem());
         }
@@ -145,7 +145,6 @@
             JSONArray data = responseJSON.getJSONArray("data");
             if (data != null && data.size() > 0) {
                 ZLMServerConfig = JSON.parseObject(JSON.toJSONString(data.get(0)), ZLMServerConfig.class);
-                ZLMServerConfig.setIp(mediaServerItem.getIp());
             }
         } else {
             logger.error("[ {} ]-[ {}:{} ]绗瑊}娆′富鍔ㄨ繛鎺ュけ璐�, 2s鍚庨噸璇�",

--
Gitblit v1.8.0