@Synchronized fun processResponse( transactionResponse: SIPResponse, sourceChannel: MessageChannel?, dialog: SIPDialog ) { if (getState() == null) return if ((TransactionState.COMPLETED === this.getState() || TransactionState.TERMINATED === this.getState()) && transactionResponse.getStatusCode() / 100 === 1) { return } if (sipStack.isLoggingEnabled()) { sipStack.getStackLogger().logDebug( "processing " + transactionResponse.getFirstLine() .toString() + "current state = " + getState() ) sipStack.getStackLogger().logDebug("dialog = $dialog") } this.lastResponse = transactionResponse try { if (isInviteTransaction()) inviteClientTransaction( transactionResponse, sourceChannel, dialog ) else nonInviteClientTransaction(transactionResponse, sourceChannel, dialog) } catch (ex: IOException) { if (sipStack.isLoggingEnabled()) sipStack.getStackLogger().logException(ex) this.setState(TransactionState.TERMINATED) raiseErrorEvent(SIPTransactionErrorEvent.TRANSPORT_ERROR) } }
Process a new response message through this transaction . If necessary , this message will also be passed onto the TU .