forgedResponse = messageFactory.createResponse(receivedResponse.getStatusCode(), origServerTransaction.getRequest());
} catch (ParseException e) {
throw new SipException("Failed to forge message", e);
}
final DialogState dialogState = incomingDialog.getState();
if ((dialogState == null || dialogState == DialogState.EARLY) && localTag != null && incomingDialog.isServer()) {
// no tag set in the response, since the dialog creating transaction didn't had it
try {
((ToHeader)forgedResponse.getHeader(ToHeader.NAME)).setTag(localTag);
} catch (ParseException e) {