回复正确的 MediaStatus 内容
parent
03033e6ac9
commit
a43a98e185
|
@ -7,6 +7,7 @@ import com.genersoft.iot.vmp.conf.UserSetting;
|
||||||
import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException;
|
import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException;
|
||||||
import com.genersoft.iot.vmp.gb28181.SipLayer;
|
import com.genersoft.iot.vmp.gb28181.SipLayer;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.dao.CommonGBChannelMapper;
|
||||||
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
|
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
|
||||||
import com.genersoft.iot.vmp.gb28181.session.SipInviteSessionManager;
|
import com.genersoft.iot.vmp.gb28181.session.SipInviteSessionManager;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.SIPSender;
|
import com.genersoft.iot.vmp.gb28181.transmit.SIPSender;
|
||||||
|
@ -84,6 +85,9 @@ public class SIPCommanderForPlatform implements ISIPCommanderForPlatform {
|
||||||
@Autowired
|
@Autowired
|
||||||
private GitUtil gitUtil;
|
private GitUtil gitUtil;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CommonGBChannelMapper commonGBChannelMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void register(Platform parentPlatform, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws InvalidArgumentException, ParseException, SipException {
|
public void register(Platform parentPlatform, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws InvalidArgumentException, ParseException, SipException {
|
||||||
register(parentPlatform, null, null, errorEvent, okEvent, true);
|
register(parentPlatform, null, null, errorEvent, okEvent, true);
|
||||||
|
@ -604,6 +608,11 @@ public class SIPCommanderForPlatform implements ISIPCommanderForPlatform {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CommonGBChannel channel = commonGBChannelMapper.queryById(sendRtpItem.getChannelId());
|
||||||
|
|
||||||
|
if (channel == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String characterSet = parentPlatform.getCharacterSet();
|
String characterSet = parentPlatform.getCharacterSet();
|
||||||
StringBuffer mediaStatusXml = new StringBuffer(200);
|
StringBuffer mediaStatusXml = new StringBuffer(200);
|
||||||
|
@ -611,7 +620,7 @@ public class SIPCommanderForPlatform implements ISIPCommanderForPlatform {
|
||||||
.append("<Notify>\r\n")
|
.append("<Notify>\r\n")
|
||||||
.append("<CmdType>MediaStatus</CmdType>\r\n")
|
.append("<CmdType>MediaStatus</CmdType>\r\n")
|
||||||
.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n")
|
.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n")
|
||||||
.append("<DeviceID>" + sendRtpItem.getChannelId() + "</DeviceID>\r\n")
|
.append("<DeviceID>" + channel.getGbDeviceId() + "</DeviceID>\r\n")
|
||||||
.append("<NotifyType>121</NotifyType>\r\n")
|
.append("<NotifyType>121</NotifyType>\r\n")
|
||||||
.append("</Notify>\r\n");
|
.append("</Notify>\r\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue