SIPDialog dialog = (SIPDialog) this.dialog; if (((SIPTransactionStack) getSIPStack()).isDialogCreated(this .getOriginalRequest().getMethod()) && (TransactionState.CALLING == this.getRealState() || TransactionState.TRYING == this .getRealState())) { dialog.setState(SIPDialog.TERMINATED_STATE); } else if (getOriginalRequest().getMethod().equals(Request.BYE)) { if (dialog != null) dialog.setState(SIPDialog.TERMINATED_STATE); }
SIPDialog dialog = (SIPDialog) this.dialog; if (((SIPTransactionStack) getSIPStack()).isDialogCreated(this .getOriginalRequest().getMethod()) && (TransactionState.CALLING == this.getRealState() || TransactionState.TRYING == this .getRealState())) { dialog.setState(SIPDialog.TERMINATED_STATE); } else if (getOriginalRequest().getMethod().equals(Request.BYE)) { if (dialog != null && dialog.isTerminatedOnBye()) dialog.setState(SIPDialog.TERMINATED_STATE); }
    protected void fireTimeoutTimer() {        if (LogWriter.needsLogging)            sipStack.logWriter                    .logMessage("SIPServerTransaction.fireTimeoutTimer "                            + this.getRealState() + " method = "                            + this.getOriginalRequest().getMethod());        SIPDialog dialog = (SIPDialog) this.dialog;        if (((SIPTransactionStack) getSIPStack()).isDialogCreated(this                .getOriginalRequest().getMethod())                && (TransactionState.CALLING == this.getRealState() || TransactionState.TRYING == this                        .getRealState())) {            dialog.setState(SIPDialog.TERMINATED_STATE);        } else if (getOriginalRequest().getMethod().equals(Request.BYE)) {            if (dialog != null)                dialog.setState(SIPDialog.TERMINATED_STATE);        }        if (TransactionState.COMPLETED == this.getRealState()                && isInviteTransaction()) {            raiseErrorEvent(SIPTransactionErrorEvent.TIMEOUT_ERROR);            this.setState(TransactionState.TERMINATED);        } else if (TransactionState.CONFIRMED == this.getRealState()                && isInviteTransaction()) {            // TIMER_I should not generate a timeout            // exception to the application when the            // Invite transaction is in Confirmed state.            // Just transition to Terminated state.            this.setState(TransactionState.TERMINATED);        } else if (!isInviteTransaction()                && (TransactionState.COMPLETED == this.getRealState() || TransactionState.CONFIRMED == this                        .getRealState())) {            this.setState(TransactionState.TERMINATED);        } else if (isInviteTransaction()                && TransactionState.TERMINATED == this.getRealState()) {            // This state could be reached when retransmitting            // Bug report sent in by Christophe            raiseErrorEvent(SIPTransactionErrorEvent.TIMEOUT_ERROR);            if (dialog != null)                dialog.setState(SIPDialog.TERMINATED_STATE);        }    }