Merge branch '2.6.9' into wvp-28181-2.0
# Conflicts: # src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java # src/main/resources/application-dev.ymlpull/1336/head
commit
fc74ce9de4
|
@ -25,6 +25,7 @@ import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置Spring Security
|
* 配置Spring Security
|
||||||
|
@ -135,8 +136,14 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
corsConfiguration.setAllowedHeaders(Arrays.asList("*"));
|
corsConfiguration.setAllowedHeaders(Arrays.asList("*"));
|
||||||
corsConfiguration.setAllowedMethods(Arrays.asList("*"));
|
corsConfiguration.setAllowedMethods(Arrays.asList("*"));
|
||||||
corsConfiguration.setMaxAge(3600L);
|
corsConfiguration.setMaxAge(3600L);
|
||||||
|
if (userSetting.getAllowedOrigins() != null && !userSetting.getAllowedOrigins().isEmpty()) {
|
||||||
corsConfiguration.setAllowCredentials(true);
|
corsConfiguration.setAllowCredentials(true);
|
||||||
corsConfiguration.setAllowedOrigins(userSetting.getAllowedOrigins());
|
corsConfiguration.setAllowedOrigins(userSetting.getAllowedOrigins());
|
||||||
|
}else {
|
||||||
|
corsConfiguration.setAllowCredentials(false);
|
||||||
|
corsConfiguration.setAllowedOrigins(Collections.singletonList(CorsConfiguration.ALL));
|
||||||
|
}
|
||||||
|
|
||||||
corsConfiguration.setExposedHeaders(Arrays.asList(JwtUtils.getHeader()));
|
corsConfiguration.setExposedHeaders(Arrays.asList(JwtUtils.getHeader()));
|
||||||
|
|
||||||
UrlBasedCorsConfigurationSource url = new UrlBasedCorsConfigurationSource();
|
UrlBasedCorsConfigurationSource url = new UrlBasedCorsConfigurationSource();
|
||||||
|
|
|
@ -613,6 +613,10 @@ public class SIPCommander implements ISIPCommander {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void streamByeCmd(Device device, String channelId, String stream, String callId, SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException, SsrcTransactionNotFoundException {
|
public void streamByeCmd(Device device, String channelId, String stream, String callId, SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException, SsrcTransactionNotFoundException {
|
||||||
|
if (device == null) {
|
||||||
|
logger.warn("[发送BYE] device为null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
List<SsrcTransaction> ssrcTransactionList = streamSession.getSsrcTransactionForAll(device.getDeviceId(), channelId, callId, stream);
|
List<SsrcTransaction> ssrcTransactionList = streamSession.getSsrcTransactionForAll(device.getDeviceId(), channelId, callId, stream);
|
||||||
if (ssrcTransactionList == null || ssrcTransactionList.isEmpty()) {
|
if (ssrcTransactionList == null || ssrcTransactionList.isEmpty()) {
|
||||||
logger.info("[发送BYE] 未找到事务信息,设备: device: {}, channel: {}", device.getDeviceId(), channelId);
|
logger.info("[发送BYE] 未找到事务信息,设备: device: {}, channel: {}", device.getDeviceId(), channelId);
|
||||||
|
|
|
@ -818,7 +818,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||||
// 发送redis消息
|
// 发送redis消息
|
||||||
redisGbPlayMsgListener.sendMsg(streamPushItem.getServerId(), streamPushItem.getMediaServerId(),
|
redisGbPlayMsgListener.sendMsg(streamPushItem.getServerId(), streamPushItem.getMediaServerId(),
|
||||||
streamPushItem.getApp(), streamPushItem.getStream(), addressStr, port, ssrc, requesterId,
|
streamPushItem.getApp(), streamPushItem.getStream(), addressStr, port, ssrc, requesterId,
|
||||||
channelId, mediaTransmissionTCP, platform.isRtcp(),null, responseSendItemMsg -> {
|
channelId, mediaTransmissionTCP, platform.isRtcp(),platform.getName(), responseSendItemMsg -> {
|
||||||
SendRtpItem sendRtpItem = responseSendItemMsg.getSendRtpItem();
|
SendRtpItem sendRtpItem = responseSendItemMsg.getSendRtpItem();
|
||||||
if (sendRtpItem == null || responseSendItemMsg.getMediaServerItem() == null) {
|
if (sendRtpItem == null || responseSendItemMsg.getMediaServerItem() == null) {
|
||||||
logger.warn("服务器端口资源不足");
|
logger.warn("服务器端口资源不足");
|
||||||
|
|
|
@ -161,6 +161,7 @@ public class AssistRESTfulUtils {
|
||||||
if (mediaServerItem == null) {
|
if (mediaServerItem == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
logger.info("[访问assist]: {}, 参数: {}", url, param);
|
||||||
JSONObject responseJSON = new JSONObject();
|
JSONObject responseJSON = new JSONObject();
|
||||||
//-2自定义流媒体 调用错误码
|
//-2自定义流媒体 调用错误码
|
||||||
responseJSON.put("code",-2);
|
responseJSON.put("code",-2);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.genersoft.iot.vmp.storager.impl;
|
package com.genersoft.iot.vmp.storager.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.genersoft.iot.vmp.conf.SipConfig;
|
import com.genersoft.iot.vmp.conf.SipConfig;
|
||||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||||
|
@ -38,6 +39,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Component
|
@Component
|
||||||
|
@DS("master")
|
||||||
public class VideoManagerStorageImpl implements IVideoManagerStorage {
|
public class VideoManagerStorageImpl implements IVideoManagerStorage {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(VideoManagerStorageImpl.class);
|
private final Logger logger = LoggerFactory.getLogger(VideoManagerStorageImpl.class);
|
||||||
|
|
|
@ -237,7 +237,7 @@ user-settings:
|
||||||
register-again-after-time: 60
|
register-again-after-time: 60
|
||||||
# 国标续订方式,true为续订,每次注册在同一个会话里,false为重新注册,每次使用新的会话
|
# 国标续订方式,true为续订,每次注册在同一个会话里,false为重新注册,每次使用新的会话
|
||||||
register-keep-int-dialog: false
|
register-keep-int-dialog: false
|
||||||
# 跨域配置,配置你访问前端页面的地址即可, 可以配置多个
|
# 跨域配置,不配置此项则允许所有跨域请求,配置后则只允许配置的页面的地址请求, 可以配置多个
|
||||||
allowed-origins:
|
allowed-origins:
|
||||||
- http://localhost:8008
|
- http://localhost:8008
|
||||||
- http://192.168.1.3:8008
|
- http://192.168.1.3:8008
|
||||||
|
|
|
@ -110,8 +110,7 @@ user-settings:
|
||||||
auto-apply-play: true
|
auto-apply-play: true
|
||||||
# 设备/通道状态变化时发送消息
|
# 设备/通道状态变化时发送消息
|
||||||
device-status-notify: true
|
device-status-notify: true
|
||||||
# 跨域配置,配置你访问前端页面的地址即可, 可以配置多个
|
# [可选] 日志配置, 一般不需要改
|
||||||
allowed-origins:
|
logging:
|
||||||
- http://localhost:8080
|
config: classpath:logback-spring-local.xml
|
||||||
- http://127.0.0.1:8080
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue