优化sip回复逻辑

This commit is contained in:
648540858 2021-12-17 15:47:14 +08:00
parent ff284e98db
commit a1af232c21

View File

@ -124,6 +124,10 @@ public abstract class SIPRequestProcessorParent {
public void responseAck(RequestEvent evt, int statusCode) throws SipException, InvalidArgumentException, ParseException {
Response response = getMessageFactory().createResponse(statusCode, evt.getRequest());
ServerTransaction serverTransaction = getServerTransaction(evt);
if (serverTransaction == null) {
logger.warn("回复失败:{}", response);
return;
}
serverTransaction.sendResponse(response);
if (statusCode >= 200 && !"NOTIFY".equals(evt.getRequest().getMethod())) {