// or if the state of the dialog needs to be changed.
if (dialog != null && response.getStatusCode() != 100) {
if (!dialog.checkResponseTags(sipResponse))
throw new SipException("Response tags dont match with Dialog tags");
DialogState oldState = dialog.getState();
dialog.setLastResponse(this, (SIPResponse) response);
if (oldState == null && dialog.getState() == DialogState.TERMINATED) {
DialogTerminatedEvent event = new DialogTerminatedEvent(dialog
.getSipProvider(), dialog);