修改默认为 udp
This commit is contained in:
parent
46359028ff
commit
5bda3a2d51
@ -133,6 +133,7 @@ public class RegisterRequestProcessor implements MessageProcessor {
|
|||||||
|
|
||||||
private void registerDevice(String deviceId, DockingDevice device, SIPRequest request, String senderIp, RemoteInfo remoteInfo) {
|
private void registerDevice(String deviceId, DockingDevice device, SIPRequest request, String senderIp, RemoteInfo remoteInfo) {
|
||||||
Response response = generateRegisterResponse(request);
|
Response response = generateRegisterResponse(request);
|
||||||
|
log.debug("response.getStatusCode {}", response.getStatusCode());
|
||||||
if(response.getStatusCode() != Response.OK){
|
if(response.getStatusCode() != Response.OK){
|
||||||
sender.send(senderIp, response);
|
sender.send(senderIp, response);
|
||||||
return;
|
return;
|
||||||
@ -140,14 +141,14 @@ public class RegisterRequestProcessor implements MessageProcessor {
|
|||||||
|
|
||||||
if (device == null) {
|
if (device == null) {
|
||||||
device = new DockingDevice();
|
device = new DockingDevice();
|
||||||
device.setStreamMode(MediaStreamMode.TCP_PASSIVE.getMode());
|
device.setStreamMode(MediaStreamMode.UDP.getMode());
|
||||||
device.setCharset(GB28181Constant.CHARSET);
|
device.setCharset(GB28181Constant.CHARSET);
|
||||||
device.setGeoCoordSys(GB28181Constant.GEO_COORD_SYS);
|
device.setGeoCoordSys(GB28181Constant.GEO_COORD_SYS);
|
||||||
device.setDeviceId(deviceId);
|
device.setDeviceId(deviceId);
|
||||||
device.setOnLine(false);
|
device.setOnLine(false);
|
||||||
} else {
|
} else {
|
||||||
if (ObjectUtils.isEmpty(device.getStreamMode())) {
|
if (ObjectUtils.isEmpty(device.getStreamMode())) {
|
||||||
device.setStreamMode(MediaStreamMode.TCP_PASSIVE.getMode());
|
device.setStreamMode(MediaStreamMode.UDP.getMode());
|
||||||
}
|
}
|
||||||
if (ObjectUtils.isEmpty(device.getCharset())) {
|
if (ObjectUtils.isEmpty(device.getCharset())) {
|
||||||
device.setCharset(GB28181Constant.CHARSET);
|
device.setCharset(GB28181Constant.CHARSET);
|
||||||
|
Loading…
Reference in New Issue
Block a user