/** * Create a client transaction from a raw channel. * * @param rawChannel is the transport channel to encapsulate. */ public MessageChannel createMessageChannel(MessageChannel rawChannel) { synchronized (clientTransactions) { // New client transaction to return SIPTransaction returnChannel = createClientTransaction(rawChannel); clientTransactions.add(0, (SIPClientTransaction) returnChannel); ((SIPClientTransaction) returnChannel).setViaPort(rawChannel.getViaPort()); ((SIPClientTransaction) returnChannel).setViaHost(rawChannel.getHost()); // Add the transaction timer for the state machine. returnChannel.startTransactionTimer(); return returnChannel; } }