return; }    if (this.eventPending) { this.pendingResponses.add(new PendingResponse(transactionResponse,sourceChannel));
	public synchronized void processResponse(		SIPResponse transactionResponse,		MessageChannel sourceChannel)		throws SIPServerException {		// Log the incoming response in our log file.		if (parentStack			.serverLog			.needsLogging(ServerLog.TRACE_MESSAGES))			this.logResponse(transactionResponse,//ifdef SIMULATION/*			SimSystem.currentTimeMillis(),//else*/			System.currentTimeMillis(),//endif//			"normal processing");		// If the state has not yet been assigned then this is a		// spurious response.		if (getState() == null)			return;		// Ignore 1xx 		if (TransactionState.COMPLETED == this.getState()			&& transactionResponse.getStatusCode() / 100 == 1) {			return;		} else if (TransactionState.PROCEEDING == this.getState()			 && transactionResponse.getStatusCode() == 100 ) { 			// Ignore 100 if received after 180			// bug report from Peter Parnes.			return;		}		if (LogWriter.needsLogging)			parentStack.logWriter.logMessage(				"processing "					+ transactionResponse.getFirstLine()					+ "current state = "					+ getState());		this.lastResponse = transactionResponse;		if (dialog != null) {			// add the route before you process the response.			// Bug noticed by Brad Templeton.			dialog.addRoute(transactionResponse);		}		String method = transactionResponse.getCSeq().getMethod();		if (dialog != null) {			boolean added = false;			SIPTransactionStack sipStackImpl =				(SIPTransactionStack) getSIPStack();			// A tag just got assigned  or changed.			if (dialog.getRemoteTag() == null				&& transactionResponse.getTo().getTag() != null) {				// Dont assign tag on provisional response				if (transactionResponse.getStatusCode() != 100) {					dialog.setRemoteTag(transactionResponse.getToTag());				}				String dialogId = transactionResponse.getDialogId(false);				dialog.setDialogId(dialogId);				if (sipStackImpl.isDialogCreated(method)					&& transactionResponse.getStatusCode() != 100) {					sipStackImpl.putDialog(dialog);					if (transactionResponse.getStatusCode() / 100 == 1)						dialog.setState(DialogImpl.EARLY_STATE);					else if (transactionResponse.getStatusCode() / 100 == 2)						dialog.setState(DialogImpl.CONFIRMED_STATE);					added = true;				}			} else if (				dialog.getRemoteTag() != null					&& transactionResponse.getToTag() != null					&& !dialog.getRemoteTag().equals(						transactionResponse.getToTag())) {				String dialogId = transactionResponse.getDialogId(false);				dialog.setRemoteTag(transactionResponse.getToTag());				dialog.setDialogId(dialogId);				if (sipStackImpl.isDialogCreated(method)) {					sipStackImpl.putDialog(dialog);					added = true;				}			}			if (sipStackImpl.isDialogCreated(method)) {				// Make  a final tag assignment.				if (transactionResponse.getToTag() != null					&& transactionResponse.getStatusCode() / 100 == 2) {					// This is a dialog creating method (such as INVITE).					// 2xx response -- set the state to the confirmed					// state.					dialog.setRemoteTag(transactionResponse.getToTag());					dialog.setState(DialogImpl.CONFIRMED_STATE);				} else if (					(transactionResponse.getStatusCode() == 487						|| transactionResponse.getStatusCode() / 100 == 5						|| transactionResponse.getStatusCode() / 100 == 6)						&& (dialog.getState() == null							|| dialog.getState().getValue()								== DialogImpl.EARLY_STATE)) {					// Invite transaction generated an error.					dialog.setState(DialogImpl.TERMINATED_STATE);				}			}			// Only terminate the dialog on 200 OK response to BYE			if ( this.getMethod().equals(Request.BYE) && 				transactionResponse.getStatusCode() == 200 ) {				dialog.setState(DialogImpl.TERMINATED_STATE);			}		}		try {			if (isInviteTransaction())				inviteClientTransaction(transactionResponse, sourceChannel);			else				nonInviteClientTransaction(transactionResponse, sourceChannel);		} catch (IOException ex) {			this.setState(TransactionState.TERMINATED);			raiseErrorEvent(SIPTransactionErrorEvent.TRANSPORT_ERROR);		}	}