Commit e9e4e8d44a885b98e23c159015772c8d82a4878f
1 parent
1f48ec21
增加对invite其它响应的应对,如101 Dialog Establishement等
Showing
1 changed file
with
11 additions
and
3 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181; |
| 2 | 2 | |
| 3 | +import java.text.ParseException; | |
| 3 | 4 | import java.util.Properties; |
| 4 | 5 | |
| 5 | 6 | import javax.annotation.PostConstruct; |
| ... | ... | @@ -128,11 +129,18 @@ public class SipLayer implements SipListener, Runnable { |
| 128 | 129 | int status = response.getStatusCode(); |
| 129 | 130 | if ((status >= 200) && (status < 300)) { // Success! |
| 130 | 131 | ISIPResponseProcessor processor = processorFactory.createResponseProcessor(evt); |
| 131 | - processor.process(evt, this, sipConfig); | |
| 132 | - } else if (status == Response.TRYING) { | |
| 132 | + try { | |
| 133 | + processor.process(evt, this, sipConfig); | |
| 134 | + } catch (ParseException e) { | |
| 135 | + // TODO Auto-generated catch block | |
| 136 | + e.printStackTrace(); | |
| 137 | + } | |
| 138 | + // } else if (status == Response.TRYING) { | |
| 133 | 139 | // trying不会回复 |
| 140 | + } else if ((status >= 100) && (status < 200)) { | |
| 141 | + // 增加其它无需回复的响应,如101、180等 | |
| 134 | 142 | } else { |
| 135 | - logger.warn("接收到失败的response响应!status:" + status + ",message:" + response.getContent().toString()); | |
| 143 | + logger.warn("接收到失败的response响应!status:" + status + ",message:" + response.getReasonPhrase()/* .getContent().toString()*/); | |
| 136 | 144 | } |
| 137 | 145 | // trying不会回复 |
| 138 | 146 | // if (status == Response.TRYING) { | ... | ... |