修复bug以及日志按照,错误/sip/数据库 分割

This commit is contained in:
648540858
2022-08-26 18:03:09 +08:00
parent 938064199b
commit 9f680a2e9e
25 changed files with 187 additions and 113 deletions

View File

@@ -71,7 +71,6 @@ public class SIPProcessorObserver implements ISIPProcessorObserver {
@Override
@Async
public void processRequest(RequestEvent requestEvent) {
logger.debug("\n收到请求\n{}", requestEvent.getRequest());
String method = requestEvent.getRequest().getMethod();
ISIPRequestProcessor sipRequestProcessor = requestProcessorMap.get(method);
if (sipRequestProcessor == null) {
@@ -90,7 +89,6 @@ public class SIPProcessorObserver implements ISIPProcessorObserver {
@Async
public void processResponse(ResponseEvent responseEvent) {
Response response = responseEvent.getResponse();
logger.debug("\n收到响应\n{}", responseEvent.getResponse());
int status = response.getStatusCode();
if (((status >= 200) && (status < 300)) || status == Response.UNAUTHORIZED) { // Success!

View File

@@ -640,7 +640,7 @@ public class SIPCommander implements ISIPCommander {
hookEvent.call(new InviteStreamInfo(mediaServerItem, json, callIdHeader.getCallId(), "rtp", ssrcInfo.getStream()));
subscribe.removeSubscribe(hookSubscribe);
hookSubscribe.getContent().put("regist", false);
hookSubscribe.getContent().put("schema", "rtmp");
hookSubscribe.getContent().put("schema", "rtsp");
// 添加流注销的订阅注销了后向设备发送bye
subscribe.addSubscribe(hookSubscribe,
(MediaServerItem mediaServerItemForEnd, JSONObject jsonForEnd)->{

View File

@@ -410,6 +410,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
streamId = String.format("%s_%s", device.getDeviceId(), channelId);
}
SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, device.isSsrcCheck(), false);
logger.info(JSONObject.toJSONString(ssrcInfo));
sendRtpItem.setStreamId(ssrcInfo.getStream());
// 写入redis 超时时回复
redisCatchStorage.updateSendRTPSever(sendRtpItem);

View File

@@ -180,7 +180,6 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme
private void processNotifyCatalogList(RequestEvent evt, Element rootElement) throws SipException {
System.out.println(evt.getRequest().toString());
String platformId = SipUtils.getUserIdFromFromHeader(evt.getRequest());
String deviceId = XmlUtil.getText(rootElement, "DeviceID");
ParentPlatform platform = storager.queryParentPlatByServerGBId(platformId);

View File

@@ -164,7 +164,7 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme
}
}
if (channelId.equals(sipConfig.getId())) {
if ("7".equals(deviceAlarm.getAlarmMethod()) ) {
// 发送给平台的报警信息。 发送redis通知
AlarmChannelMessage alarmChannelMessage = new AlarmChannelMessage();
alarmChannelMessage.setAlarmSn(Integer.parseInt(deviceAlarm.getAlarmMethod()));