public SipURI createSipURI(String user, String host) { return sipFactoryImpl.createSipURI(user, host); }
/** * {@inheritDoc} */ public void setOutboundInterface(InetSocketAddress inetSocketAddress) { if(inetSocketAddress == null) { throw new NullPointerException("outbound Interface param shouldn't be null"); } checkSessionValidity(); String address = inetSocketAddress.getAddress().getHostAddress() + ":" + inetSocketAddress.getPort(); List<SipURI> list = proxy.getSipFactoryImpl().getSipNetworkInterfaceManager().getOutboundInterfaces(); SipURI networkInterface = null; for(SipURI networkInterfaceURI : list) { if(networkInterfaceURI.toString().contains(address)) { networkInterface = networkInterfaceURI; break; } } if(networkInterface == null) throw new IllegalArgumentException("Network interface for " + outboundInterface + " not found"); outboundInterface = proxy.getSipFactoryImpl().createSipURI(null, address); }
/** * {@inheritDoc} */ public void setOutboundInterface(InetAddress inetAddress) { if(inetAddress == null) { throw new NullPointerException("outbound Interface param shouldn't be null"); } checkSessionValidity(); String address = inetAddress.getHostAddress(); List<SipURI> list = proxy.getSipFactoryImpl().getSipNetworkInterfaceManager().getOutboundInterfaces(); SipURI networkInterface = null; for(SipURI networkInterfaceURI : list) { if(networkInterfaceURI.toString().contains(address)) { networkInterface = networkInterfaceURI; break; } } if(networkInterface == null) throw new IllegalArgumentException("Network interface for " + outboundInterface + " not found"); outboundInterface = proxy.getSipFactoryImpl().createSipURI(null, address); }
SipURI uri = sipFactoryImpl.createSipURI(null, uriString); if(lastVia.getTransport() != null) { uri.setTransportParam(lastVia.getTransport());