增加对水星IPC的兼容
增加对SIP错误的订阅,刷新通道或点播或回放出现sip错误时及时返回给页面 优化UI,增加按钮loading
This commit is contained in:
@@ -8,8 +8,10 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.sip.*;
|
||||
import javax.sip.header.CallIdHeader;
|
||||
import javax.sip.message.Response;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -34,6 +36,9 @@ public class SipLayer implements SipListener {
|
||||
@Autowired
|
||||
private SIPProcessorFactory processorFactory;
|
||||
|
||||
@Autowired
|
||||
private SipSubscribe sipSubscribe;
|
||||
|
||||
private SipStack sipStack;
|
||||
|
||||
private SipFactory sipFactory;
|
||||
@@ -139,11 +144,19 @@ public class SipLayer implements SipListener {
|
||||
// 增加其它无需回复的响应,如101、180等
|
||||
} else {
|
||||
logger.warn("接收到失败的response响应!status:" + status + ",message:" + response.getReasonPhrase()/* .getContent().toString()*/);
|
||||
if (evt.getResponse() != null && sipSubscribe.getSize() > 0 ) {
|
||||
CallIdHeader callIdHeader = (CallIdHeader)evt.getResponse().getHeader(CallIdHeader.NAME);
|
||||
if (callIdHeader != null) {
|
||||
SipSubscribe.Event subscribe = sipSubscribe.getSubscribe(callIdHeader.getCallId());
|
||||
if (subscribe != null) {
|
||||
subscribe.response(evt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// trying不会回复
|
||||
// if (status == Response.TRYING) {
|
||||
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user