优化sip回复逻辑
parent
1401ce98d4
commit
cf8e40c152
|
@ -124,6 +124,10 @@ public abstract class SIPRequestProcessorParent {
|
||||||
public void responseAck(RequestEvent evt, int statusCode) throws SipException, InvalidArgumentException, ParseException {
|
public void responseAck(RequestEvent evt, int statusCode) throws SipException, InvalidArgumentException, ParseException {
|
||||||
Response response = getMessageFactory().createResponse(statusCode, evt.getRequest());
|
Response response = getMessageFactory().createResponse(statusCode, evt.getRequest());
|
||||||
ServerTransaction serverTransaction = getServerTransaction(evt);
|
ServerTransaction serverTransaction = getServerTransaction(evt);
|
||||||
|
if (serverTransaction == null) {
|
||||||
|
logger.warn("回复失败:{}", response);
|
||||||
|
return;
|
||||||
|
}
|
||||||
serverTransaction.sendResponse(response);
|
serverTransaction.sendResponse(response);
|
||||||
if (statusCode >= 200 && !"NOTIFY".equals(evt.getRequest().getMethod())) {
|
if (statusCode >= 200 && !"NOTIFY".equals(evt.getRequest().getMethod())) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue