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 void setOutboundInterface(SipURI outboundInterface) { if(!isValid()) { throw new IllegalStateException("the session has been invalidated"); } if(outboundInterface == null) { throw new NullPointerException("parameter is null"); } List<SipURI> list = sipFactory.getSipNetworkInterfaceManager().getOutboundInterfaces(); SipURI networkInterface = null; for(SipURI networkInterfaceURI : list) { if(networkInterfaceURI.equals(outboundInterface)) { networkInterface = networkInterfaceURI; break; } } if(networkInterface == null) throw new IllegalArgumentException("Network interface for " + outboundInterface + " not found"); this.outboundInterface = outboundInterface.toString(); if(outboundInterface.getTransportParam() != null) { this.transport = outboundInterface.getTransportParam(); } }
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()); } }
outboundTransport = ((javax.sip.address.SipURI)clonedRequest.getRequestURI()).getTransportParam(); if(destination != null && destination.isSipURI()) { String destinationTransport = ((SipURI)destination).getTransportParam(); if(outboundTransport == null) { outboundTransport = destinationTransport; rrHeaderTransport = routeRecord.getTransportParam();