private void addTelestaxProxyHeaders(HttpPost post, String requestType) { //This will work as a flag for LB that this request will need to be modified and proxied to VI post.addHeader("TelestaxProxy", "true"); //Adds the Provision provider class name post.addHeader("Provider", ProvisionProvider.voipinnovationsClass); //This will tell LB that this request is a getAvailablePhoneNumberByAreaCode request post.addHeader("RequestType", requestType); //This will let LB match the DID to a node based on the node host+port List<SipURI> uris = containerConfiguration.getOutboundInterfaces(); for (SipURI uri: uris) { post.addHeader("OutboundIntf", uri.getHost()+":"+uri.getPort()+":"+uri.getTransportParam()); } } }
public Object extract(Object input) { URI uri = (URI) input; if (uri.isSipURI()) { SipURI sipuri = (SipURI) uri; int port = sipuri.getPort(); if (port < 0) { String scheme = sipuri.getScheme(); if (scheme.equals("sips")) { return "5061"; } else { return "5060"; } } else { return Integer.toString(port); } } else { return null; } } }
public Object extract(Object input) { URI uri = (URI) input; if (uri.isSipURI()) { SipURI sipuri = (SipURI) uri; int port = sipuri.getPort(); if (port < 0) { String scheme = sipuri.getScheme(); if (scheme.equals("sips")) { return "5061"; } else { return "5060"; } } else { return Integer.toString(port); } } else { return null; } } }
public Object extract(Object input) { URI uri = (URI) input; if (uri.isSipURI()) { SipURI sipuri = (SipURI) uri; int port = sipuri.getPort(); if (port < 0) { String scheme = sipuri.getScheme(); if (scheme.equals("sips")) { return "5061"; } else { return "5060"; } } else { return Integer.toString(port); } } else { return null; } } }
public Object extract(Object input) { URI uri = (URI) input; if (uri.isSipURI()) { SipURI sipuri = (SipURI) uri; int port = sipuri.getPort(); if (port < 0) { String scheme = sipuri.getScheme(); if (scheme.equals("sips")) { return "5061"; } else { return "5060"; } } else { return Integer.toString(port); } } else { return null; } } }
private void addTelestaxProxyHeaders(HttpRequest httpRequest, String requestType) { //This will work as a flag for LB that this request will need to be modified and proxied to VI httpRequest.addHeader("TelestaxProxy", "true"); //Adds the Provision provider class name httpRequest.addHeader("Provider", ProvisionProvider.bandiwidthClass); //This will tell LB that this request is a getAvailablePhoneNumberByAreaCode request httpRequest.addHeader("RequestType", requestType); //This is will add the instance id for the CancelNumber request that is missing SiteId from the request body httpRequest.addHeader("SiteId", siteId); //This will let LB match the DID to a node based on the node host+port List<SipURI> uris = containerConfiguration.getOutboundInterfaces(); for (SipURI uri: uris) { httpRequest.addHeader("OutboundIntf", uri.getHost()+":"+uri.getPort()+":"+uri.getTransportParam()); } }
Address originalFromAddress = request.getFrom(); SipURI originalFromUri = (SipURI) originalFromAddress.getURI(); int port = originalFromUri.getPort(); if (port == -1) { port = request.getRemotePort();
proxy.getOutboundInterface().getPort(), outboundTransport, branchId);