public Object extract(Object input) { URI uri = (URI) input; if (uri.isSipURI()) { return ((SipURI) uri).getHost(); } else { return null; } } }
public Object extract(Object input) { URI uri = (URI) input; if (uri.isSipURI()) { return ((SipURI)uri).getHost(); } else { return null; } } }
public Object extract(Object input) { URI uri = (URI) input; if (uri.isSipURI()) { return ((SipURI)uri).getHost(); } else { return null; } } }
public Object extract(Object input) { URI uri = (URI) input; if (uri.isSipURI()) { return ((SipURI) uri).getHost(); } else { return null; } } }
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()); } } }
/** * getOrganizationSidBySipURIHost * * @param sipURI * @return Sid of Organization */ public static Sid getOrganizationSidBySipURIHost(DaoManager storage, final SipURI sipURI) { if (logger.isDebugEnabled()) { logger.debug(String.format("getOrganizationSidBySipURIHost sipURI = %s", sipURI)); } final String organizationDomainName = sipURI.getHost(); Organization organization = storage.getOrganizationsDao().getOrganizationByDomainName(organizationDomainName); return organization == null ? null : organization.getSid(); }
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()); } }
proxy.getOutboundInterface().getHost(), proxy.getOutboundInterface().getPort(), outboundTransport,