| File was renamed from src/main/java/com/genersoft/iot/vmp/gb28181/transmit/response/impl/RegisterResponseProcessor.java |
| | |
| | | package com.genersoft.iot.vmp.gb28181.transmit.response.impl; |
| | | package com.genersoft.iot.vmp.gb28181.transmit.event.response.impl; |
| | | |
| | | import com.genersoft.iot.vmp.conf.SipConfig; |
| | | import com.genersoft.iot.vmp.gb28181.SipLayer; |
| | | import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; |
| | | import com.genersoft.iot.vmp.gb28181.bean.ParentPlatformCatch; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.response.ISIPResponseProcessor; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.event.response.SIPResponseProcessorAbstract; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| | | import org.slf4j.Logger; |
| | |
| | | import javax.sip.message.Response; |
| | | |
| | | /** |
| | | * @Description:Register响应处理器 |
| | | * @description:Register响应处理器 |
| | | * @author: swwheihei |
| | | * @date: 2020年5月3日 下午5:32:23 |
| | | */ |
| | | @Component |
| | | public class RegisterResponseProcessor implements ISIPResponseProcessor { |
| | | public class RegisterResponseProcessor extends SIPResponseProcessorAbstract { |
| | | |
| | | private Logger logger = LoggerFactory.getLogger(RegisterResponseProcessor.class); |
| | | private String method = "REGISTER"; |
| | | |
| | | @Autowired |
| | | private ISIPCommanderForPlatform sipCommanderForPlatform; |
| | |
| | | @Autowired |
| | | private IRedisCatchStorage redisCatchStorage; |
| | | |
| | | public RegisterResponseProcessor() { |
| | | @Autowired |
| | | private SIPProcessorObserver sipProcessorObserver; |
| | | |
| | | @Override |
| | | public void afterPropertiesSet() throws Exception { |
| | | // 添加消息处理的订阅 |
| | | sipProcessorObserver.addResponseProcessor(method, this); |
| | | } |
| | | |
| | | /** |
| | | * 处理Register响应 |
| | | * |
| | | * @param evt |
| | | * @param layer |
| | | * @param config |
| | | * @param evt 事件 |
| | | */ |
| | | @Override |
| | | public void process(ResponseEvent evt, SipLayer layer, SipConfig config) { |
| | | public void process(ResponseEvent evt) { |
| | | Response response = evt.getResponse(); |
| | | CallIdHeader callIdHeader = (CallIdHeader) response.getHeader(CallIdHeader.NAME); |
| | | String callId = callIdHeader.getCallId(); |