Compare commits

...

3 Commits

Author SHA1 Message Date
山海守门人
1e9f2a859a
Pre Merge pull request !45 from 山海守门人/dev260107_2 2026-03-30 03:10:41 +00:00
lin
60b1c687ea 添加异步处理的心跳回复方法 2026-03-30 11:05:51 +08:00
紫穹
8e32f17e6e fix: 添加80端口映射,否则无法播放推送的流 2026-01-07 07:51:54 +08:00
3 changed files with 10 additions and 4 deletions

View File

@ -59,7 +59,7 @@ services:
networks:
- media-net
ports:
#- "6080:80/tcp" # [播流]HTTP 安全考虑-非测试阶段需要注释掉改为由nginx代理播流地址
- "80:80/tcp" # [播流]HTTP 安全考虑-非测试阶段需要注释掉改为由nginx代理播流地址
#- "4443:443/tcp" # [播流]HTTPS 安全考虑-非测试阶段需要注释掉改为由nginx代理播流地址
- "${MediaRtmp:-10935}:${MediaRtmp:-10935}/tcp" # [收流]RTMP
- "${MediaRtmp:-10935}:${MediaRtmp:-10935}/udp" # [收流]RTMP

View File

@ -13,6 +13,7 @@ import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.util.ObjectUtils;
import javax.sip.*;
@ -30,10 +31,10 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
/**
* @description:处理接收IPCamera发来的SIP协议请求消息
* @author: songww
* @date: 2020年5月3日 下午4:42:22
* @date: 2020年5月3日 下午4:42:22
*/
@Slf4j
public abstract class SIPRequestProcessorParent {
@ -77,6 +78,11 @@ public abstract class SIPRequestProcessorParent {
return responseAck(sipRequest, statusCode, null);
}
@Async("taskExecutor")
public void responseAckAsync(SIPRequest sipRequest, int statusCode) throws SipException, InvalidArgumentException, ParseException {
responseAck(sipRequest, statusCode, null);
}
public SIPResponse responseAck(SIPRequest sipRequest, int statusCode, String msg) throws SipException, InvalidArgumentException, ParseException {
return responseAck(sipRequest, statusCode, msg, null);
}

View File

@ -96,7 +96,7 @@ public class KeepaliveNotifyMessageHandler extends SIPRequestProcessorParent imp
RequestEvent evt = sipMsgInfo.getEvt();
// 回复200 OK
try {
responseAck((SIPRequest) evt.getRequest(), Response.OK);
responseAckAsync((SIPRequest) evt.getRequest(), Response.OK);
} catch (SipException | InvalidArgumentException | ParseException e) {
log.error("[命令发送失败] 心跳回复: {}", e.getMessage());
}