目录推送
This commit is contained in:
parent
2fa97835fe
commit
90b716e404
@ -57,13 +57,11 @@ public class MessageRequestProcessor implements MessageProcessor {
|
||||
MessageDTO messageDto = XmlUtils.parse(content, MessageDTO.class, GB28181Constant.CHARSET);
|
||||
log.debug("deviceId:{}, 接收到的消息 => {}", deviceId, messageDto);
|
||||
|
||||
Response response = null;
|
||||
if(messageDto.getCmdType().equalsIgnoreCase(CmdType.CATALOG)) {
|
||||
sender.send(senderIp, okResponse(request));
|
||||
catalogCmdProcessor.process(request, content);
|
||||
} else {
|
||||
response = SipResponseBuilder.response(request, Response.NOT_IMPLEMENTED, ResponseStatus.NOT_IMPLEMENTED.getMessage());
|
||||
}
|
||||
if(response != null){
|
||||
Response response = SipResponseBuilder.response(request, Response.NOT_IMPLEMENTED, ResponseStatus.NOT_IMPLEMENTED.getMessage());
|
||||
sender.send(senderIp, response);
|
||||
}
|
||||
}
|
||||
|
@ -50,13 +50,11 @@ public class CatalogCmdProcessor {
|
||||
.sumNum(Long.valueOf(catalogDeviceListDTO.getNum()))
|
||||
.build();
|
||||
|
||||
long cSeq = request.getCSeq().getSeqNumber() + 1;
|
||||
FromHeader fromHeader = request.getFromHeader();
|
||||
|
||||
sender.sendRequest((provider, ip, port)->{
|
||||
CallIdHeader callIdHeader = provider.getNewCallId();
|
||||
return SipRequestBuilder.createMessageRequest(mockingDevice,
|
||||
ip, port, cSeq, XmlUtils.toXml(catalogResponseDTO), fromHeader.getTag(), callIdHeader);
|
||||
ip, port, 1, XmlUtils.toXml(catalogResponseDTO), fromHeader.getTag(), callIdHeader);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user