648540858
2022-11-25 dfb87c768538e280cf5e17d1d5ee5bbed1e1888d
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -525,17 +525,22 @@
                        if (platform != null) {
                           commanderFroPlatform.streamByeCmd(platform, sendRtpItem);
                        }else {
                           if ("talk".equals(param.getApp()) && sendRtpItem.isOnlyAudio()) {
                           if (sendRtpItem.isOnlyAudio()) {
                              AudioBroadcastCatch audioBroadcastCatch = audioBroadcastManager.get(sendRtpItem.getDeviceId(), sendRtpItem.getChannelId());
                              if (device != null && audioBroadcastCatch != null) {
//                                 cmder.streamByeCmd(device, sendRtpItem.getChannelId(), audioBroadcastCatch.getSipTransactionInfo(), null);
                              if (audioBroadcastCatch != null) {
//                                 playService.stopAudioBroadcast(device.getDeviceId(), sendRtpItem.getChannelId());
                                 if ("talk".equals(param.getApp())) {
//                                    cmder.streamByeCmd(device, sendRtpItem.getChannelId(), audioBroadcastCatch.getSipTransactionInfo(), null);
                                 }else {
//                                    cmder.streamByeCmd(device, sendRtpItem.getChannelId(), audioBroadcastCatch.getSipTransactionInfo(), null);
                                 }
                              }
                           }else {
                              cmder.streamByeCmd(device, sendRtpItem.getChannelId(), param.getStream(), sendRtpItem.getCallId());
                           }
                        }
                     } catch (SipException | InvalidArgumentException | ParseException | SsrcTransactionNotFoundException e) {
                     } catch (SipException | InvalidArgumentException | ParseException e) {
                        logger.error("[命令发送失败] 国标级联 发送BYE: {}", e.getMessage());
                     }
                  }
@@ -646,6 +651,7 @@
               // 修改数据
               streamProxyService.stop(param.getApp(), param.getStream());
            }else {
               // 无人观看不做处理
               ret.put("close", false);
            }
            return ret;
@@ -771,7 +777,7 @@
   @ResponseBody
   @PostMapping(value = "/on_rtp_server_timeout", produces = "application/json;charset=UTF-8")
   public JSONObject onRtpServerTimeout(HttpServletRequest request, @RequestBody OnRtpServerTimeoutHookParam param){
      logger.info("[ZLM HOOK] rtpServer收流超时:{}->{}({})", param.getMediaServerId(), param.getStream_id(), param.getSsrc());
      logger.info("[ZLM HOOK] rtpServer rtp超时:{}->{}({})", param.getMediaServerId(), param.getStream_id(), param.getSsrc());
      JSONObject ret = new JSONObject();
      ret.put("code", 0);