if (host == null) host = via.getHost();
String host = via.getReceived();
    public void sendResponse(Response response) throws SipException {        SIPResponse sipResponse = (SIPResponse) response;        Via via = sipResponse.getTopmostVia();        if (via == null)            throw new SipException("No via header in response!");        String transport = via.getTransport();        //Bug report by Shanti Kadiyala        //check to see if Via has "received paramaeter". If so        //set the host to the via parameter. Else set it to the        //Via host.        String host = via.getReceived();        if (host == null)            host = via.getHost();		// Added by Hagai Sela	// Symmetric nat support        int port = via.getrport();        if (port == -1) {	   port = via.getPort();	   if ( port == -1 ) {	       if (transport.equalsIgnoreCase("TLS")) port = 5061;	       else port = 5060;	   }	}	// Added by Daniel J. Martinez Manzano <dani@dif.um.es>	// for correct management of IPv6 addresses.	if(host.indexOf(":") > 0)		if(host.indexOf("[") < 0)			host = "[" + host + "]";	// Changed by Daniel J. Martinez Manzano <dani@dif.um.es>	// Original line called constructor with concatenated	// parameters, which didn't work for IPv6 addresses.	Hop hop = new HopImpl(host, port, transport);        try {            MessageChannel messageChannel = sipStack                    .createRawMessageChannel(this.listeningPoint.port, hop);            messageChannel.sendMessage(sipResponse);        } catch (IOException ex) {	         throw new SipException(ex.getMessage());        }    }