|  |  | 
 |  |  | import com.genersoft.iot.vmp.gb28181.transmit.cmd.SIPRequestHeaderProvider;
 | 
 |  |  | import com.genersoft.iot.vmp.gb28181.utils.NumericUtil;
 | 
 |  |  | import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
 | 
 |  |  | import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory;
 | 
 |  |  | import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
 | 
 |  |  | import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
 | 
 |  |  | import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeFactory;
 | 
 |  |  | import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeForStreamChange;
 | 
 |  |  | 
 |  |  | import com.genersoft.iot.vmp.service.IMediaServerService;
 | 
 |  |  | import com.genersoft.iot.vmp.service.bean.SSRCInfo;
 | 
 |  |  | import com.genersoft.iot.vmp.utils.DateUtil;
 | 
 |  |  | import com.genersoft.iot.vmp.utils.GitUtil;
 | 
 |  |  | import gov.nist.javax.sip.message.SIPRequest;
 | 
 |  |  | import gov.nist.javax.sip.message.SIPResponse;
 | 
 |  |  | import org.slf4j.Logger;
 | 
 |  |  | 
 |  |  |     private ZlmHttpHookSubscribe subscribe;
 | 
 |  |  | 
 | 
 |  |  |     @Autowired
 | 
 |  |  |     private GitUtil gitUtil;
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  |     @Autowired
 | 
 |  |  |     private IMediaServerService mediaServerService;
 | 
 |  |  | 
 | 
 |  |  |     @Autowired
 | 
 |  |  |     private ZLMRTPServerFactory zlmrtpServerFactory;
 | 
 |  |  |     private ZLMServerFactory zlmServerFactory;
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  |     /**
 | 
 |  |  | 
 |  |  |      * @return true = 命令发送成功
 | 
 |  |  |      */
 | 
 |  |  |     @Override
 | 
 |  |  |     public void alarmSubscribe(Device device, int expires, String startPriority, String endPriority, String alarmMethod, String alarmType, String startTime, String endTime) throws InvalidArgumentException, SipException, ParseException {
 | 
 |  |  |     public void alarmSubscribe(Device device, int expires, String startPriority, String endPriority, String alarmMethod, String startTime, String endTime) throws InvalidArgumentException, SipException, ParseException {
 | 
 |  |  | 
 | 
 |  |  |         StringBuffer cmdXml = new StringBuffer(200);
 | 
 |  |  |         String charset = device.getCharset();
 | 
 |  |  | 
 |  |  |         }
 | 
 |  |  |         if (!ObjectUtils.isEmpty(alarmMethod)) {
 | 
 |  |  |             cmdXml.append("<AlarmMethod>" + alarmMethod + "</AlarmMethod>\r\n");
 | 
 |  |  |         }
 | 
 |  |  |         if (!ObjectUtils.isEmpty(alarmType)) {
 | 
 |  |  |             cmdXml.append("<AlarmType>" + alarmType + "</AlarmType>\r\n");
 | 
 |  |  |         }
 | 
 |  |  |         if (!ObjectUtils.isEmpty(startTime)) {
 | 
 |  |  |             cmdXml.append("<StartAlarmTime>" + startTime + "</StartAlarmTime>\r\n");
 |