mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-26 15:07:49 +08:00
Compare commits
3 Commits
8cfa5902be
...
0725b97a2b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0725b97a2b | ||
|
|
a83a48e40e | ||
|
|
da98101aac |
@ -1,19 +0,0 @@
|
|||||||
package com.genersoft.iot.vmp.gb28181.bean;
|
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class SipSendFailEvent extends SipSubscribe.EventResult<String> {
|
|
||||||
|
|
||||||
private String callId;
|
|
||||||
|
|
||||||
private String msg;
|
|
||||||
|
|
||||||
public static SipSendFailEvent getInstance(String callId, String msg){
|
|
||||||
SipSendFailEvent sipSendFailEvent = new SipSendFailEvent();
|
|
||||||
sipSendFailEvent.setMsg(msg);
|
|
||||||
sipSendFailEvent.setCallId(callId);
|
|
||||||
return sipSendFailEvent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,7 +1,6 @@
|
|||||||
package com.genersoft.iot.vmp.gb28181.event;
|
package com.genersoft.iot.vmp.gb28181.event;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceNotFoundEvent;
|
import com.genersoft.iot.vmp.gb28181.bean.DeviceNotFoundEvent;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.SipSendFailEvent;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.event.sip.SipEvent;
|
import com.genersoft.iot.vmp.gb28181.event.sip.SipEvent;
|
||||||
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;
|
||||||
@ -150,12 +149,6 @@ public class SipSubscribe {
|
|||||||
this.msg = "设备未找到";
|
this.msg = "设备未找到";
|
||||||
this.statusCode = -1024;
|
this.statusCode = -1024;
|
||||||
this.callId = ((DeviceNotFoundEvent) event).getCallId();
|
this.callId = ((DeviceNotFoundEvent) event).getCallId();
|
||||||
}else if (event instanceof SipSendFailEvent) {
|
|
||||||
SipSendFailEvent sipSendFailEvent = (SipSendFailEvent) event;
|
|
||||||
this.type = EventResultType.deviceNotFoundEvent;
|
|
||||||
this.msg = sipSendFailEvent.getMsg();
|
|
||||||
this.statusCode = -1024;
|
|
||||||
this.callId = ((SipSendFailEvent) event).getCallId();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,6 @@ package com.genersoft.iot.vmp.gb28181.transmit;
|
|||||||
|
|
||||||
import com.genersoft.iot.vmp.conf.SipConfig;
|
import com.genersoft.iot.vmp.conf.SipConfig;
|
||||||
import com.genersoft.iot.vmp.gb28181.SipLayer;
|
import com.genersoft.iot.vmp.gb28181.SipLayer;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.SipSendFailEvent;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
|
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
|
||||||
import com.genersoft.iot.vmp.gb28181.event.sip.SipEvent;
|
import com.genersoft.iot.vmp.gb28181.event.sip.SipEvent;
|
||||||
import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
|
import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
|
||||||
@ -13,7 +12,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
import javax.sip.ResponseEvent;
|
|
||||||
import javax.sip.SipException;
|
import javax.sip.SipException;
|
||||||
import javax.sip.header.CSeqHeader;
|
import javax.sip.header.CSeqHeader;
|
||||||
import javax.sip.header.CallIdHeader;
|
import javax.sip.header.CallIdHeader;
|
||||||
@ -115,14 +113,9 @@ public class SIPSender {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch (SipException e) {
|
}catch (SipException e) {
|
||||||
log.error("[发送信息失败] ", e);
|
|
||||||
SipSendFailEvent sipSendFailEvent = SipSendFailEvent.getInstance(callIdHeader.getCallId(), e.getMessage());
|
|
||||||
SipSubscribe.EventResult<SipSendFailEvent> eventResult = new SipSubscribe.EventResult<>(sipSendFailEvent);
|
|
||||||
SipEvent subscribe = sipSubscribe.getSubscribe(key);
|
|
||||||
subscribe.getErrorEvent().response(eventResult);
|
|
||||||
sipSubscribe.removeSubscribe(key);
|
sipSubscribe.removeSubscribe(key);
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CallIdHeader getNewCallIdHeader(String ip, String transport) {
|
public CallIdHeader getNewCallIdHeader(String ip, String transport) {
|
||||||
|
|||||||
@ -861,7 +861,7 @@
|
|||||||
320623,如东县,3206
|
320623,如东县,3206
|
||||||
320681,启东市,3206
|
320681,启东市,3206
|
||||||
320682,如皋市,3206
|
320682,如皋市,3206
|
||||||
320684,海门市,3206
|
320684,海门区,3206
|
||||||
320685,海安市,3206
|
320685,海安市,3206
|
||||||
3207,连云港市,32
|
3207,连云港市,32
|
||||||
320703,连云区,3207
|
320703,连云区,3207
|
||||||
@ -918,8 +918,6 @@
|
|||||||
33,浙江省,
|
33,浙江省,
|
||||||
3301,杭州市,33
|
3301,杭州市,33
|
||||||
330102,上城区,3301
|
330102,上城区,3301
|
||||||
330103,下城区,3301
|
|
||||||
330104,江干区,3301
|
|
||||||
330105,拱墅区,3301
|
330105,拱墅区,3301
|
||||||
330106,西湖区,3301
|
330106,西湖区,3301
|
||||||
330108,滨江区,3301
|
330108,滨江区,3301
|
||||||
@ -927,6 +925,8 @@
|
|||||||
330110,余杭区,3301
|
330110,余杭区,3301
|
||||||
330111,富阳区,3301
|
330111,富阳区,3301
|
||||||
330112,临安区,3301
|
330112,临安区,3301
|
||||||
|
330113,临平区,3301
|
||||||
|
330114,钱塘区,3301
|
||||||
330122,桐庐县,3301
|
330122,桐庐县,3301
|
||||||
330127,淳安县,3301
|
330127,淳安县,3301
|
||||||
330182,建德市,3301
|
330182,建德市,3301
|
||||||
|
|||||||
|
Loading…
Reference in New Issue
Block a user