修复注册是数据传输模式被回复默认

This commit is contained in:
panlinlin 2021-04-26 10:48:51 +08:00
parent 689d7c0cc4
commit b92027f31e

View File

@ -116,9 +116,12 @@ public class RegisterRequestProcessor extends SIPRequestAbstractProcessor {
AddressImpl address = (AddressImpl) fromHeader.getAddress();
SipUri uri = (SipUri) address.getURI();
String deviceId = uri.getUser();
device = new Device();
device.setStreamMode("UDP");
device.setDeviceId(deviceId);
device = storager.queryVideoDevice(deviceId);
if (device == null) {
device = new Device();
device.setStreamMode("UDP");
device.setDeviceId(deviceId);
}
device.setIp(received);
device.setPort(rPort);
device.setHostAddress(received.concat(":").concat(String.valueOf(rPort)));