if (transactionErrorEvent.getErrorID() == SIPTransactionErrorEvent.TRANSPORT_ERROR) {  if (LogWriter.needsLogging) { sipStack.logMessage("TransportError occured on " + transaction); }  Object errorObject = transactionErrorEvent.getSource(); Timeout timeout = Timeout.TRANSACTION; TimeoutEvent ev = null;
if (transactionErrorEvent.getErrorID() == SIPTransactionErrorEvent.TRANSPORT_ERROR) {  if (sipStack.isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "TransportError occured on " + transaction); }  Object errorObject = transactionErrorEvent.getSource(); Timeout timeout = Timeout.TRANSACTION; TimeoutEvent ev = null;
    public void transactionErrorEvent(            SIPTransactionErrorEvent transactionErrorEvent) {        SIPTransaction transaction = (SIPTransaction) transactionErrorEvent                .getSource();        if (transactionErrorEvent.getErrorID() == SIPTransactionErrorEvent.TRANSPORT_ERROR) {            // There must be a way to inform the TU here!!            if (LogWriter.needsLogging) {                sipStack.logMessage("TransportError occured on " + transaction);            }            // Treat this like a timeout event. (Suggestion from Christophe).            Object errorObject = transactionErrorEvent.getSource();            Timeout timeout = Timeout.TRANSACTION;            TimeoutEvent ev = null;            if (errorObject instanceof SIPServerTransaction) {                ev = new TimeoutEvent(this, (ServerTransaction) errorObject,                        timeout);            } else {                ev = new TimeoutEvent(this, (ClientTransaction) errorObject,                        timeout);            }            // Handling transport error like timeout            this.handleEvent(ev, (SIPTransaction) errorObject);        } else if (transactionErrorEvent.getErrorID() == SIPTransactionErrorEvent.TIMEOUT_ERROR) {            // This is a timeout event.            Object errorObject = transactionErrorEvent.getSource();            Timeout timeout = Timeout.TRANSACTION;            TimeoutEvent ev = null;            if (errorObject instanceof SIPServerTransaction) {                ev = new TimeoutEvent(this, (ServerTransaction) errorObject,                        timeout);            } else {                ev = new TimeoutEvent(this, (ClientTransaction) errorObject,                        timeout);            }            this.handleEvent(ev, (SIPTransaction) errorObject);        } else if (transactionErrorEvent.getErrorID() == SIPTransactionErrorEvent.TIMEOUT_RETRANSMIT) {            // This is a timeout retransmit event.            // We should never get this if retransmit filter is            // enabled (ie. in that case the stack should handle.            // all retransmits.            if (sipStack.isRetransmissionFilterActive())                InternalErrorHandler.handleException("Unexpected event !");            Object errorObject = transactionErrorEvent.getSource();            Timeout timeout = Timeout.RETRANSMIT;            TimeoutEvent ev = null;            if (errorObject instanceof SIPServerTransaction) {                ev = new TimeoutEvent(this, (ServerTransaction) errorObject,                        timeout);            } else {                ev = new TimeoutEvent(this, (ClientTransaction) errorObject,                        timeout);            }            this.handleEvent(ev, (SIPTransaction) errorObject);        }    }