| | |
| | | import org.slf4j.LoggerFactory;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.context.annotation.Bean;
|
| | | import org.springframework.context.annotation.ComponentScan;
|
| | | import org.springframework.context.annotation.DependsOn;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | |
| | | private SipStack createSipStack() throws PeerUnavailableException {
|
| | | Properties properties = new Properties();
|
| | | properties.setProperty("javax.sip.STACK_NAME", "GB28181_SIP");
|
| | | properties.setProperty("javax.sip.IP_ADDRESS", sipConfig.getSipIp());
|
| | | properties.setProperty("javax.sip.IP_ADDRESS", sipConfig.getMonitorIp());
|
| | | properties.setProperty("gov.nist.javax.sip.LOG_MESSAGE_CONTENT", "false");
|
| | | /**
|
| | | * sip_server_log.log 和 sip_debug_log.log public static final int TRACE_NONE =
|
| | |
| | | */
|
| | | @Override
|
| | | public void processRequest(RequestEvent evt) {
|
| | | logger.debug(evt.getRequest().toString());
|
| | | // logger.debug(evt.getRequest().toString());
|
| | | // 由于jainsip是单线程程序,为提高性能并发处理
|
| | | processThreadPool.execute(() -> {
|
| | | if (processorFactory != null) {
|
| | |
| | | @Override
|
| | | public void processResponse(ResponseEvent evt) {
|
| | | Response response = evt.getResponse();
|
| | | logger.debug(evt.getResponse().toString());
|
| | | // logger.debug(evt.getResponse().toString());
|
| | | int status = response.getStatusCode();
|
| | | if (((status >= 200) && (status < 300)) || status == 401) { // Success!
|
| | | ISIPResponseProcessor processor = processorFactory.createResponseProcessor(evt);
|