if("tls".equalsIgnoreCase(transport)) port = 5061;
if(port == -1 && "tls".equalsIgnoreCase(transport)) port = 5061;
    public HopImpl getNextHop() throws SipException {        // This is already an established dialog so dont consult the router.        // Route the request based on the request URI.        RouteList rl = this.getRouteList();        SipUri sipUri = null;        if (rl != null && !rl.isEmpty()) {            Route route = (Route) this.getRouteList().getFirst();            sipUri = (SipUri) (route.getAddress().getURI());        } else if (contactRoute != null                && contactRoute.getAddress().getURI() instanceof SipUri) {            sipUri = (SipUri) (contactRoute.getAddress().getURI());        } else            throw new SipException("No route found!");        // Use the maddr param to get the host if one exists.        String host = sipUri.getMAddrParam() != null ? sipUri.getMAddrParam()                : sipUri.getHost();        // Get the transport parameter.        String transport = sipUri.getTransportParam();        if (transport == null)            transport = "udp";        int port = sipUri.getPort();	// Added by Daniel J. Martinez Manzano <dani@dif.um.es>        // Checks if transport parameter is TLS and assigns 5061.	if("tls".equalsIgnoreCase(transport))		port = 5061;        if (port == -1)            port = 5060;        return new HopImpl(host, port, transport);    }