if (via == null) {
via = new MultiLineHeader(Header.VIA, true);
}
TargetTuple ttToUse = selectTTToUse(req);
if (log.isLoggable(Level.FINEST)) {
log.log(Level.FINEST, "Via header transport: " +
ttToUse.getIP()+":"+ttToUse.getPort()+" Transport="+
ttToUse.getProtocol().name());
}
ViaImpl v = new ViaImpl(req.getProtocol(),
req.getTransport().toUpperCase(), ttToUse.getIP(),
ttToUse.getPort());
String id = Transaction.generateBranch();
v.setParameter(ViaImpl.PARAM_BRANCH, id);
if (log.isLoggable(Level.FINE)) {
log.log(Level.FINE, "Adding via = " + v);