diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderPlarformProvider.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderPlarformProvider.java
index 5bf9236a..7767a78b 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderPlarformProvider.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderPlarformProvider.java
@@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.gb28181.transmit.cmd;
import com.genersoft.iot.vmp.conf.SipConfig;
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
+import gov.nist.javax.sip.message.MessageFactoryImpl;
import org.springframework.beans.factory.annotation.Autowired;
// import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
@@ -205,8 +206,10 @@ public class SIPRequestHeaderPlarformProvider {
MaxForwardsHeader maxForwards = sipFactory.createHeaderFactory().createMaxForwardsHeader(70);
// ceq
CSeqHeader cSeqHeader = sipFactory.createHeaderFactory().createCSeqHeader(1L, Request.MESSAGE);
-
- request = sipFactory.createMessageFactory().createRequest(requestURI, Request.MESSAGE, callIdHeader, cSeqHeader, fromHeader,
+ MessageFactoryImpl messageFactory = (MessageFactoryImpl) sipFactory.createMessageFactory();
+ // 设置编码, 防止中文乱码
+ messageFactory.setDefaultContentEncodingCharset("gb2312");
+ request = messageFactory.createRequest(requestURI, Request.MESSAGE, callIdHeader, cSeqHeader, fromHeader,
toHeader, viaHeaders, maxForwards);
ContentTypeHeader contentTypeHeader = sipFactory.createHeaderFactory().createContentTypeHeader("APPLICATION", "MANSCDP+xml");
request.setContent(content, contentTypeHeader);
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
index 7945dcd0..3789771c 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
@@ -172,6 +172,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
private void transmitRequest(ParentPlatform parentPlatform, Request request, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws SipException {
if("TCP".equals(parentPlatform.getTransport())) {
tcpSipProvider.sendRequest(request);
+
} else if("UDP".equals(parentPlatform.getTransport())) {
udpSipProvider.sendRequest(request);
}
@@ -264,9 +265,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
deviceInfoXml.append("DeviceInfo\r\n");
deviceInfoXml.append("" +sn + "\r\n");
deviceInfoXml.append("" + parentPlatform.getDeviceGBId() + "\r\n");
- deviceInfoXml.append("GB28181 Video Platform\r\n");
- deviceInfoXml.append("Manufacturer\r\n");
- deviceInfoXml.append("wvp-28181\r\n");
+ deviceInfoXml.append("WVP-GB28181\r\n");
+ deviceInfoXml.append("WVP\r\n");
+ deviceInfoXml.append("wvp-28181-2.0\r\n");
deviceInfoXml.append("2.0.202103\r\n");
deviceInfoXml.append("OK\r\n");
deviceInfoXml.append("\r\n");
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/AckRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/AckRequestProcessor.java
index 00f1f7da..c1e43e89 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/AckRequestProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/AckRequestProcessor.java
@@ -78,7 +78,7 @@ public class AckRequestProcessor extends SIPRequestAbstractProcessor {
zlmrtpServerFactory.startSendRtpStream(param);
} else {
System.out.println("等待设备推流.......");
- Thread.sleep(2000);
+ Thread.sleep(1000);
continue;
}
} else {
diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
index 49d06adc..940a4550 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -220,7 +220,7 @@ public class ZLMHttpHookListener {
// String app = json.getString("app");
// String stream = json.getString("stream");
- ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_publish, json);
+ ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_shell_login, json);
if (subscribe != null) subscribe.response(json);
JSONObject ret = new JSONObject();