|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @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)) { // Success! | 
|---|
|  |  |  | if (((status >= 200) && (status < 300)) || status == 401) { // Success! | 
|---|
|  |  |  | ISIPResponseProcessor processor = processorFactory.createResponseProcessor(evt); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | processor.process(evt, this, sipConfig); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // } else if (status == Response.TRYING) { | 
|---|
|  |  |  | // trying不会回复 | 
|---|
|  |  |  | } else if ((status >= 100) && (status < 200)) { | 
|---|
|  |  |  | // 增加其它无需回复的响应,如101、180等 | 
|---|
|  |  |  | } else { | 
|---|