修改 前端菜单 管理菜单,角色前后端分配 及通道创建失败的问题
This commit is contained in:
@@ -82,7 +82,18 @@ public class SipLayer {
|
||||
SipProvider startUdpListener() throws Exception {
|
||||
if (sipConfig.isEnabled()) {
|
||||
log.info("startUdpListener");
|
||||
ListeningPoint udpListeningPoint = sipStack.createListeningPoint(sipConfig.getIp(), sipConfig.getPort(), "UDP");
|
||||
// ListeningPoint udpListeningPoint = sipStack.createListeningPoint(sipConfig.getIp(), sipConfig.getPort(), "UDP");
|
||||
ListeningPoint udpListeningPoint;
|
||||
try {
|
||||
udpListeningPoint = sipStack.createListeningPoint(sipConfig.getIp(), sipConfig.getPort(), "UDP");
|
||||
} catch (Exception e) {
|
||||
log.error("Bind failed on {}:{}, trying backup IP",sipConfig.getIp(), sipConfig.getPort());
|
||||
udpListeningPoint = sipStack.createListeningPoint(
|
||||
"0.0.0.0",
|
||||
sipConfig.getPort(),
|
||||
"UDP"
|
||||
);
|
||||
}
|
||||
SipProvider udpSipProvider = sipStack.createSipProvider(udpListeningPoint);
|
||||
udpSipProvider.addSipListener(gbSIPListener);
|
||||
log.info("Sip Server UDP 启动成功 port {}", sipConfig.getPort());
|
||||
|
||||
@@ -65,7 +65,7 @@ public class SipDeviceChannelServiceImpl implements ISipDeviceChannelService {
|
||||
if (deviceChannel == null) {
|
||||
Product product = productService.getProductBySerialNumber(deviceId);
|
||||
if (product != null) {
|
||||
insertSipDeviceChannel(channel);
|
||||
insertSipDeviceChannelNew(channel);
|
||||
} else {
|
||||
log.error("未注册设备:{}", deviceId);
|
||||
}
|
||||
@@ -196,6 +196,18 @@ public class SipDeviceChannelServiceImpl implements ISipDeviceChannelService {
|
||||
return sipDeviceChannelMapper.insertSipDeviceChannel(sipDeviceChannel);
|
||||
}
|
||||
|
||||
public int insertSipDeviceChannelNew(SipDeviceChannel sipDeviceChannel) {
|
||||
|
||||
Product product = productService.getProductBySerialNumber(sipDeviceChannel.getDeviceSipId());
|
||||
if (product != null) {
|
||||
sipDeviceChannel.setTenantName(product.getTenantName());
|
||||
sipDeviceChannel.setProductId(product.getProductId());
|
||||
sipDeviceChannel.setProductName(product.getProductName());
|
||||
}
|
||||
sipDeviceChannel.setCreateTime(DateUtils.getNowDate());
|
||||
return sipDeviceChannelMapper.insertSipDeviceChannel(sipDeviceChannel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控设备通道信息
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user