code: public javax.sip.address.SipURI createRecordRouteURI(boolean usePublicAddress) {		
  		try {			
  			String host = getIpAddress(usePublicAddress);
  			SipURI sipUri = SipFactoryImpl.addressFactory.createSipURI(null, host);
  			sipUri.setPort(port);
  			sipUri.setTransportParam(transport);
  			// Do we want to add an ID here?
  			return sipUri;
  		} catch (ParseException ex) {
          	logger.error ("Unexpected error while creating a record route URI",ex);
              throw new IllegalArgumentException("Unexpected exception when creating a record route URI", ex);
          }	
  	}
docs: Create a Record Route URI based on the host, port and transport of this listening point
  @param usePublicAddress if true, the host will be the global ip address found by STUN otherwise
  it will be the local network interface ipaddress
  @return the record route uri