Make the call to a specified IP address.

@param request
The request to send.
@param response
A response to hold the returned data.
@param ipAddress
The IP address to use for communication.
@throws RpcException
511486
public void callRpcNaked(S request, T response, String ipAddress) throws RpcException {
        Xdr xdr = new Xdr(_maximumRequestSize);
        request.marshalling(xdr);
        response.unmarshalling(callRpc(ipAddress, xdr, request.isUsePrivilegedPort()));
    }
250422
protected void releaseIpAddress( String ip ) {
		this.logger.fine( "Releasing IP address: " + ip );
		this.usedIps.remove( ip );
		save( this );
	}
627077
def send_ip(self, ipaddr, apikey):
        
        url = self.base_url + "ip-address/report"
        parameters = {"ip": ipaddr, "apikey": apikey}
        rate_limit_clear = self.rate_limit()
        if rate_limit_clear:
            response = requests.get(url, params=parameters)
            if response.status_code == self.HTTP_OK:
                json_response = response.json()
                return json_response
            elif response.status_code == self.HTTP_RATE_EXCEEDED:
                    time.sleep(20)
            else:
                self.logger.error("sent: %s, HTTP: %d", ipaddr, response.status_code)
            time.sleep(self.public_api_sleep_time)
1001291
public boolean setKeepAliveTimeout(String ipAddress, int port, long timeout) throws Exception {
    	MBeanServer mbeanServer = getMBeanServer();
		
		Set<ObjectName> queryNames = mbeanServer.queryNames(new ObjectName("*:type=Service,*"), null);
		boolean changed = false; 
		for(ObjectName objectName : queryNames) {								
			changed = (Boolean) mbeanServer.invoke(objectName, "setKeepAliveTimeout", new Object[]{this, ipAddress, port, timeout}, new String[] {SipConnector.class.getName() , String.class.getName(), "int" , "long"});
			if(changed) {
				return changed;
			}
		}		
		return false;
    }
127333
public static base_responses disable(nitro_service client, String ipaddress[]) throws Exception {
		base_responses result = null;
		if (ipaddress != null && ipaddress.length > 0) {
			nsip disableresources[] = new nsip[ipaddress.length];
			for (int i=0;i<ipaddress.length;i++){
				disableresources[i] = new nsip();
				disableresources[i].ipaddress = ipaddress[i];
			}
			result = perform_operation_bulk_request(client, disableresources,"disable");
		}
		return result;
	}
161429
public static base_responses delete(nitro_service client, String ipaddress[]) throws Exception {
		base_responses result = null;
		if (ipaddress != null && ipaddress.length > 0) {
			cacheforwardproxy deleteresources[] = new cacheforwardproxy[ipaddress.length];
			for (int i=0;i<ipaddress.length;i++){
				deleteresources[i] = new cacheforwardproxy();
				deleteresources[i].ipaddress = ipaddress[i];
			}
			result = delete_bulk_request(client, deleteresources);
		}
		return result;
	}
1191302
private void setIP(final int startIndex, final String address) {
        final String[] parts = address.split("\\.");
        this.headers.setByte(startIndex + 0, (byte) Integer.parseInt(parts[0]));
        this.headers.setByte(startIndex + 1, (byte) Integer.parseInt(parts[1]));
        this.headers.setByte(startIndex + 2, (byte) Integer.parseInt(parts[2]));
        this.headers.setByte(startIndex + 3, (byte) Integer.parseInt(parts[3]));
        reCalculateChecksum();
    }
1200450
public IPAddress asAddress(IPVersion version) {
		if(isAddress(version)) {
			return parsedHost.asAddress(version);
		}
		return null;
	}
663374
public void callRpcNaked(S request, T response) throws IOException {
        callRpcNaked(request, response, chooseIP(request.getIpKey()));
    }
802930
@Override
	public void addSipConnector(String ipAddress, int port, String transport) throws LifecycleException
	{
		SipConnector sipConnector = mssContainer.createSipConnector(ipAddress, port, transport);
		mssContainer.addSipConnector(sipConnector);
	}
359833
public Response api(Request request) throws IOException {
    Request req = new Request();
    req.setMethod(request.getMethod());
    req.setBaseUri(this.host);
    req.setEndpoint("/" + version + "/" + request.getEndpoint());
    req.setBody(request.getBody());
    for (Map.Entry<String, String> header : this.requestHeaders.entrySet()) {
      req.addHeader(header.getKey(), header.getValue());
    }
    for (Map.Entry<String, String> queryParam : request.getQueryParams().entrySet()) {
      req.addQueryParam(queryParam.getKey(), queryParam.getValue());
    }

    return makeCall(req);
  }
1224159
public void doGet (HttpServletRequest request,
            	   HttpServletResponse response)
    throws ServletException, IOException
    {
    	String access = request.getParameter("access");
    	String callAuthCode = getServletContext().getInitParameter("call.code");
    	if (callAuthCode.equals(access)) {

			String toAddr = "sip:+" + request.getParameter("to").trim() + "@"
					+ getServletContext().getInitParameter("domain.name");

			String fromAddr = "sip:"
					+ getServletContext().getInitParameter("user1") + "@"
					+ getServletContext().getInitParameter("domain.name");

			String secondParty = "sip:+" + request.getParameter("from").trim()
					+ "@" + getServletContext().getInitParameter("domain.name");

			URI to = toAddr == null ? null : sipFactory.createAddress(toAddr)
					.getURI();
			URI from = fromAddr == null ? null : sipFactory.createAddress(
					fromAddr).getURI();

			// Create app session and request
			SipApplicationSession appSession =
			// ((ConvergedHttpSession)request.getSession()).getApplicationSession();
			sipFactory.createApplicationSession();

			SipServletRequest req = sipFactory.createRequest(appSession,
					"INVITE", from, to);

			// Set some attribute
			req.getSession().setAttribute("SecondPartyAddress",
					sipFactory.createAddress(secondParty));
			req.getSession().setAttribute("FromAddr",
					sipFactory.createAddress(fromAddr));
			req.getSession().setAttribute("user",
					getServletContext().getInitParameter("user1"));
			req.getSession().setAttribute("pass",
					getServletContext().getInitParameter("pass1"));

			logger.info("Sending request" + req);
			// Send the INVITE request
			req.send();

		}
        // Write the output html
    	PrintWriter	out;
        response.setContentType("text/html");
        out = response.getWriter();
        
        // Just redirect to the index
        out.println("<HTML><META HTTP-EQUIV=\"Refresh\"CONTENT=\"0; URL=index.jsp\"><HEAD><TITLE></HTML>");
        out.close();
    }
1091491
public void doPost (HttpServletRequest request, HttpServletResponse response)
    		throws ServletException, IOException {
        String alertId = request.getParameter("alertId");
        String tel = request.getParameter("tel");
        String alertText = request.getParameter("alertText");        
        if(alertText == null || alertText.length() < 1) {
	        // Get the content of the request as the text to parse
	        byte[] content = new byte[request.getContentLength()];
	        request.getInputStream().read(content,0, request.getContentLength());        
	        alertText = new String(content);
	        // Fix from Rafael Soares http://groups.google.com/group/mobicents-public/browse_thread/thread/16015a2e2c034806
	        // remove '\n' and ',' chars to avoid problems with TTS
	        alertText = alertText.replace('\n', ' ').replace(',', ' ');
	        if(logger.isInfoEnabled()) {
	        	logger.info("Got an alert : \n alertID : " + alertId + " \n tel : " + tel + " \n text : " +alertText);
	        }
        }
        alertText = "Hello Admin; the server 0.0.0.0:2999 you're monitoring is running out of memory";
		// Create app session and request
        SipApplicationSession appSession = 
        	((ConvergedHttpSession)request.getSession()).getApplicationSession();
        URI fromURI = sipFactory.createAddress(FROM).getURI();
        URI toURI = sipFactory.createAddress(tel).getURI();
        SipServletRequest sipServletRequest = sipFactory.createRequest(appSession, INVITE, fromURI, toURI);        
        sipServletRequest.setRequestURI(toURI);
		
        sipServletRequest.getSession().setAttribute("speechUri",
				java.net.URI.create("data:" + URLEncoder.encode("ts("+ alertText +")", "UTF-8")));
		try {
			// Media Server Control Creation
			MediaSession mediaSession = MMSUtil.getMsControl().createMediaSession();
			NetworkConnection connection = mediaSession
			.createNetworkConnection(NetworkConnection.BASIC);

			SdpPortManager sdpManag = connection.getSdpPortManager();
			sdpManag.generateSdpOffer();
			
			byte[] sdpOffer = null;
			int numTimes = 0;
			while(sdpOffer == null && numTimes<10) {
				sdpOffer = sdpManag.getMediaServerSessionDescription();
				Thread.sleep(500);
				numTimes++;
			}
			
			sipServletRequest.setContentLength(sdpOffer.length);
			sipServletRequest.setContent(sdpOffer, "application/sdp");	
			
			MediaGroup mg = mediaSession.createMediaGroup(MediaGroup.PLAYER_SIGNALDETECTOR);
			
			// storing helpful info for later during the call
			SipSession sipSession = sipServletRequest.getSession();
			sipSession.setAttribute("connection", connection);
			sipSession.setAttribute("alertId", alertId);
			sipSession.setAttribute("tel", tel);
			sipSession.setAttribute("alertText", alertText);
			sipSession.setAttribute("connection", connection);
			sipSession.setAttribute("mediaGroup", mg);
			sipSession.setAttribute("mediaSession", mediaSession);
			sipSession.setAttribute("feedbackUrl", (String)getServletContext().getAttribute("alert.feedback.url"));
			sipServletRequest.send();
			mg.getSignalDetector().addListener(new DTMFListener(alertId, (String)getServletContext().getAttribute("alert.feedback.url")));
			connection.join(Direction.DUPLEX, mg);
		} catch (Exception e) {
			// Should not happen
			logger.error("Unexpected exception while trying to send the SIP Request", e);
			response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
			String errorBody = "<HTML><BODY>Phone Alert not Sent, could not find Media Libraries !</BODY></HTML>";
			sendHttpResponse(response, errorBody);
			return;
		}
				
        sendHttpResponse(response, OK_BODY);
    }
134727
def request(self, method, uri, headers=None, bodyProducer=None):
        """"""
        hostname = urlparse(uri).hostname
        ip_str = yield self.resolve(hostname)
        # `ipaddress` takes a Unicode string and I don't really care to
        # handle `UnicodeDecodeError` separately.
        ip = ipaddress.ip_address(ip_str.decode('ascii', 'replace'))
        if ip.is_private or ip.is_loopback or ip.is_link_local:
            raise BlacklistedHost(hostname, ip)
        response = yield self.agent.request(method, uri, headers, bodyProducer)
        returnValue(response)
1309272
function(ip) {
    this.connectionparams = {
        host: ip,
        port: 23,
        timeout: 1000, //  The RESPONSE should be sent within 200ms of receiving the request COMMAND. (plus network delay)
        sendTimeout: 1200,
        negotiationMandatory: false,
        ors: '\r', // Set outbound record separator
        irs: '\r'
    };
    this.cmdCue = [];
    this.connection = null;
}
1202776
private String ipAddressFromURL(String url, String name) {
    String ipAddr = null;

    if (_urlValidator.isValid(url)) {
      WebTarget resolver = ClientBuilder.newClient().target(url);
      try {
        ipAddr = resolver.request().get(String.class);
      } catch (Exception e) {
        warn("URL Cannot Resolve for resolveIP named [" + name + "]. The requested URL is invalid  [" + url + "].");
      }
    } else {
      warn("The requested URL for resolveIP named [" + name + "] is invalid  [" + url + "].");
    }
    return ipAddr;
  }
1346119
public HttpResponse sendRequest(PiwikRequest request) throws IOException{
        HttpClient client = getHttpClient();
        uriBuilder.replaceQuery(request.getUrlEncodedQueryString());
        HttpGet get = new HttpGet(uriBuilder.build());

        try {
            return client.execute(get);
        } finally {
            get.releaseConnection();
        }
    }