国标级联支持制定200OK中sdp的IP
parent
aeb75c0df1
commit
48351c875e
|
@ -189,6 +189,9 @@ public class ParentPlatform {
|
||||||
@Schema(description = "是否作为消息通道")
|
@Schema(description = "是否作为消息通道")
|
||||||
private boolean autoPushChannel;
|
private boolean autoPushChannel;
|
||||||
|
|
||||||
|
@Schema(description = "点播回复200OK使用次IP")
|
||||||
|
private String sendStreamIp;
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
@ -436,4 +439,12 @@ public class ParentPlatform {
|
||||||
public void setAutoPushChannel(boolean autoPushChannel) {
|
public void setAutoPushChannel(boolean autoPushChannel) {
|
||||||
this.autoPushChannel = autoPushChannel;
|
this.autoPushChannel = autoPushChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getSendStreamIp() {
|
||||||
|
return sendStreamIp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendStreamIp(String sendStreamIp) {
|
||||||
|
this.sendStreamIp = sendStreamIp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ import gov.nist.javax.sdp.fields.TimeField;
|
||||||
import gov.nist.javax.sdp.fields.URIField;
|
import gov.nist.javax.sdp.fields.URIField;
|
||||||
import gov.nist.javax.sip.message.SIPRequest;
|
import gov.nist.javax.sip.message.SIPRequest;
|
||||||
import gov.nist.javax.sip.message.SIPResponse;
|
import gov.nist.javax.sip.message.SIPResponse;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -404,12 +405,15 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||||
// * 2 推流中
|
// * 2 推流中
|
||||||
sendRtpItem.setStatus(1);
|
sendRtpItem.setStatus(1);
|
||||||
redisCatchStorage.updateSendRTPSever(sendRtpItem);
|
redisCatchStorage.updateSendRTPSever(sendRtpItem);
|
||||||
|
String sdpIp = mediaServerItemInUSe.getSdpIp();
|
||||||
|
if (!ObjectUtils.isEmpty(platform.getSendStreamIp())) {
|
||||||
|
sdpIp = platform.getSendStreamIp();
|
||||||
|
}
|
||||||
StringBuffer content = new StringBuffer(200);
|
StringBuffer content = new StringBuffer(200);
|
||||||
content.append("v=0\r\n");
|
content.append("v=0\r\n");
|
||||||
content.append("o=" + channelId + " 0 0 IN IP4 " + mediaServerItemInUSe.getSdpIp() + "\r\n");
|
content.append("o=" + channelId + " 0 0 IN IP4 " + sdpIp + "\r\n");
|
||||||
content.append("s=" + sessionName + "\r\n");
|
content.append("s=" + sessionName + "\r\n");
|
||||||
content.append("c=IN IP4 " + mediaServerItemInUSe.getSdpIp() + "\r\n");
|
content.append("c=IN IP4 " + sdpIp + "\r\n");
|
||||||
if ("Playback".equalsIgnoreCase(sessionName)) {
|
if ("Playback".equalsIgnoreCase(sessionName)) {
|
||||||
content.append("t=" + finalStartTime + " " + finalStopTime + "\r\n");
|
content.append("t=" + finalStartTime + " " + finalStopTime + "\r\n");
|
||||||
} else {
|
} else {
|
||||||
|
@ -907,11 +911,15 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||||
|
|
||||||
public SIPResponse sendStreamAck(MediaServerItem mediaServerItem, SIPRequest request, SendRtpItem sendRtpItem, ParentPlatform platform, RequestEvent evt) {
|
public SIPResponse sendStreamAck(MediaServerItem mediaServerItem, SIPRequest request, SendRtpItem sendRtpItem, ParentPlatform platform, RequestEvent evt) {
|
||||||
|
|
||||||
|
String sdpIp = mediaServerItem.getSdpIp();
|
||||||
|
if (!ObjectUtils.isEmpty(platform.getSendStreamIp())) {
|
||||||
|
sdpIp = platform.getSendStreamIp();
|
||||||
|
}
|
||||||
StringBuffer content = new StringBuffer(200);
|
StringBuffer content = new StringBuffer(200);
|
||||||
content.append("v=0\r\n");
|
content.append("v=0\r\n");
|
||||||
content.append("o=" + sendRtpItem.getChannelId() + " 0 0 IN IP4 " + mediaServerItem.getSdpIp() + "\r\n");
|
content.append("o=" + sendRtpItem.getChannelId() + " 0 0 IN IP4 " + sdpIp + "\r\n");
|
||||||
content.append("s=Play\r\n");
|
content.append("s=Play\r\n");
|
||||||
content.append("c=IN IP4 " + mediaServerItem.getSdpIp() + "\r\n");
|
content.append("c=IN IP4 " + sdpIp + "\r\n");
|
||||||
content.append("t=0 0\r\n");
|
content.append("t=0 0\r\n");
|
||||||
// 非严格模式端口不统一, 增加兼容性,修改为一个不为0的端口
|
// 非严格模式端口不统一, 增加兼容性,修改为一个不为0的端口
|
||||||
int localPort = sendRtpItem.getLocalPort();
|
int localPort = sendRtpItem.getLocalPort();
|
||||||
|
|
|
@ -17,10 +17,10 @@ public interface ParentPlatformMapper {
|
||||||
|
|
||||||
@Insert("INSERT INTO wvp_platform (enable, name, server_gb_id, server_gb_domain, server_ip, server_port,device_gb_id,device_ip,"+
|
@Insert("INSERT INTO wvp_platform (enable, name, server_gb_id, server_gb_domain, server_ip, server_port,device_gb_id,device_ip,"+
|
||||||
"device_port,username,password,expires,keep_timeout,transport,character_set,ptz,rtcp,as_message_channel,auto_push_channel,"+
|
"device_port,username,password,expires,keep_timeout,transport,character_set,ptz,rtcp,as_message_channel,auto_push_channel,"+
|
||||||
"status,start_offline_push,catalog_id,administrative_division,catalog_group,create_time,update_time) " +
|
"status,start_offline_push,catalog_id,administrative_division,catalog_group,create_time,update_time,send_stream_ip) " +
|
||||||
" VALUES (#{enable}, #{name}, #{serverGBId}, #{serverGBDomain}, #{serverIP}, #{serverPort}, #{deviceGBId}, #{deviceIp}, " +
|
" VALUES (#{enable}, #{name}, #{serverGBId}, #{serverGBDomain}, #{serverIP}, #{serverPort}, #{deviceGBId}, #{deviceIp}, " +
|
||||||
" #{devicePort}, #{username}, #{password}, #{expires}, #{keepTimeout}, #{transport}, #{characterSet}, #{ptz}, #{rtcp}, #{asMessageChannel}, #{autoPushChannel}, " +
|
" #{devicePort}, #{username}, #{password}, #{expires}, #{keepTimeout}, #{transport}, #{characterSet}, #{ptz}, #{rtcp}, #{asMessageChannel}, #{autoPushChannel}, " +
|
||||||
" #{status}, #{startOfflinePush}, #{catalogId}, #{administrativeDivision}, #{catalogGroup}, #{createTime}, #{updateTime})")
|
" #{status}, #{startOfflinePush}, #{catalogId}, #{administrativeDivision}, #{catalogGroup}, #{createTime}, #{updateTime}, #{sendStreamIp})")
|
||||||
int addParentPlatform(ParentPlatform parentPlatform);
|
int addParentPlatform(ParentPlatform parentPlatform);
|
||||||
|
|
||||||
@Update("UPDATE wvp_platform " +
|
@Update("UPDATE wvp_platform " +
|
||||||
|
@ -49,6 +49,7 @@ public interface ParentPlatformMapper {
|
||||||
"administrative_division=#{administrativeDivision}, " +
|
"administrative_division=#{administrativeDivision}, " +
|
||||||
"create_time=#{createTime}, " +
|
"create_time=#{createTime}, " +
|
||||||
"update_time=#{updateTime}, " +
|
"update_time=#{updateTime}, " +
|
||||||
|
"send_stream_ip=#{sendStreamIp}, " +
|
||||||
"catalog_id=#{catalogId} " +
|
"catalog_id=#{catalogId} " +
|
||||||
"WHERE id=#{id}")
|
"WHERE id=#{id}")
|
||||||
int updateParentPlatform(ParentPlatform parentPlatform);
|
int updateParentPlatform(ParentPlatform parentPlatform);
|
||||||
|
|
|
@ -37,8 +37,8 @@
|
||||||
<el-form-item label="本地端口" prop="devicePort">
|
<el-form-item label="本地端口" prop="devicePort">
|
||||||
<el-input v-model="platform.devicePort" :disabled="true" type="number"></el-input>
|
<el-input v-model="platform.devicePort" :disabled="true" type="number"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="SIP认证用户名" prop="username">
|
<el-form-item label="SDP发流IP" prop="sendStreamIp">
|
||||||
<el-input v-model="platform.username"></el-input>
|
<el-input v-model="platform.sendStreamIp"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -47,6 +47,9 @@
|
||||||
<el-form-item label="行政区划" prop="administrativeDivision">
|
<el-form-item label="行政区划" prop="administrativeDivision">
|
||||||
<el-input v-model="platform.administrativeDivision" clearable></el-input>
|
<el-input v-model="platform.administrativeDivision" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="SIP认证用户名" prop="username">
|
||||||
|
<el-input v-model="platform.username"></el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="SIP认证密码" prop="password">
|
<el-form-item label="SIP认证密码" prop="password">
|
||||||
<el-input v-model="platform.password" ></el-input>
|
<el-input v-model="platform.password" ></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -159,7 +162,8 @@ export default {
|
||||||
characterSet: "GB2312",
|
characterSet: "GB2312",
|
||||||
startOfflinePush: false,
|
startOfflinePush: false,
|
||||||
catalogGroup: 1,
|
catalogGroup: 1,
|
||||||
administrativeDivision: null,
|
administrativeDivision: "",
|
||||||
|
sendStreamIp: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, message: "请输入平台名称", trigger: "blur" }],
|
name: [{ required: true, message: "请输入平台名称", trigger: "blur" }],
|
||||||
|
@ -198,6 +202,7 @@ export default {
|
||||||
that.platform.devicePort = res.data.data.devicePort;
|
that.platform.devicePort = res.data.data.devicePort;
|
||||||
that.platform.username = res.data.data.username;
|
that.platform.username = res.data.data.username;
|
||||||
that.platform.password = res.data.data.password;
|
that.platform.password = res.data.data.password;
|
||||||
|
that.platform.sendStreamIp = res.data.data.sendStreamIp;
|
||||||
that.platform.administrativeDivision = res.data.data.username.substr(0, 6);
|
that.platform.administrativeDivision = res.data.data.username.substr(0, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,6 +233,7 @@ export default {
|
||||||
this.platform.catalogId = platform.catalogId;
|
this.platform.catalogId = platform.catalogId;
|
||||||
this.platform.startOfflinePush = platform.startOfflinePush;
|
this.platform.startOfflinePush = platform.startOfflinePush;
|
||||||
this.platform.catalogGroup = platform.catalogGroup;
|
this.platform.catalogGroup = platform.catalogGroup;
|
||||||
|
this.platform.sendStreamIp = platform.sendStreamIp;
|
||||||
this.platform.administrativeDivision = platform.administrativeDivision;
|
this.platform.administrativeDivision = platform.administrativeDivision;
|
||||||
this.onSubmit_text = "保存";
|
this.onSubmit_text = "保存";
|
||||||
this.saveUrl = "/api/platform/save";
|
this.saveUrl = "/api/platform/save";
|
||||||
|
|
|
@ -198,6 +198,7 @@ create table wvp_platform (
|
||||||
update_time character varying(50),
|
update_time character varying(50),
|
||||||
as_message_channel bool default false,
|
as_message_channel bool default false,
|
||||||
auto_push_channel bool default false,
|
auto_push_channel bool default false,
|
||||||
|
send_stream_ip character varying(50),
|
||||||
constraint uk_platform_unique_server_gb_id unique (server_gb_id)
|
constraint uk_platform_unique_server_gb_id unique (server_gb_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -198,6 +198,7 @@ create table wvp_platform (
|
||||||
update_time character varying(50),
|
update_time character varying(50),
|
||||||
as_message_channel bool default false,
|
as_message_channel bool default false,
|
||||||
auto_push_channel bool default false,
|
auto_push_channel bool default false,
|
||||||
|
send_stream_ip character varying(50),
|
||||||
constraint uk_platform_unique_server_gb_id unique (server_gb_id)
|
constraint uk_platform_unique_server_gb_id unique (server_gb_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -3,3 +3,6 @@ alter table wvp_device_channel
|
||||||
|
|
||||||
alter table wvp_device
|
alter table wvp_device
|
||||||
drop switch_primary_sub_stream;
|
drop switch_primary_sub_stream;
|
||||||
|
|
||||||
|
alter table wvp_platform
|
||||||
|
add send_stream_ip character varying(50);
|
|
@ -3,3 +3,6 @@ alter table wvp_device_channel
|
||||||
|
|
||||||
alter table wvp_device
|
alter table wvp_device
|
||||||
drop switch_primary_sub_stream;
|
drop switch_primary_sub_stream;
|
||||||
|
|
||||||
|
alter table wvp_platform
|
||||||
|
add send_stream_ip character varying(50);
|
Loading…
Reference in New Issue