Examples of SipURIImpl


Examples of com.ericsson.ssa.sip.SipURIImpl

        contact = sipUri.getUser() + "@" + sipUri.getHost() + ":" + sipUri.getPort();
        return contact;
    }

    private Address createSipAddress(String hostName, int port) {
        SipURI feSipUri = new SipURIImpl();
        feSipUri.setHost(hostName);
        feSipUri.setPort(port);
        feSipUri.setLrParam(true);
        feSipUri.setParameter(CLBConstants.FE_LB_PARAM, "TRUE");
        Address feAddress = SipFactoryImpl.getInstance().createAddress(feSipUri);
        return feAddress;
    }
View Full Code Here

Examples of com.ericsson.ssa.sip.SipURIImpl

                        m_logger.log(Level.FINEST, "AR returned external routes {0}. Routing externally", new Object[] {routes});
                    }
                    return true;
                }
            case ROUTE_BACK:
                SipURIImpl routebackUri = (SipURIImpl) DialogManager.getInstance().getVipSipUri();
                routebackUri.setLrParam(true);
                Address routeBackAddress = SipFactoryImpl.getInstance().createAddress(routebackUri);
                routeBackAddress.setParameter(AR_STATE, new ArInfo(info.getStateInfo(), region).toString());
                String hashKey = request.getBeKeyFromSession();
                URIImpl uriImpl = (URIImpl) routeBackAddress.getURI();
                if(uriImpl != null){
View Full Code Here

Examples of com.ericsson.ssa.sip.SipURIImpl

     * Gets the address of this container and including the flowtoken as user part.
     * @param flowToken token to use for user prt-
     * @return address of this container
     */
    private SipURI getContainerAddress(FlowToken flowToken) {
        SipURIImpl sipURI = getContainerAddress();
        sipURI.setUser(flowToken.getEncodedFlowId());
        sipURI.setLrParam(true);

        return sipURI;
    }
View Full Code Here

Examples of com.ericsson.ssa.sip.SipURIImpl

    /**
     * Gets the address of this container.
     * @return address of this container
     */
    private SipURIImpl getContainerAddress() {
        SipURIImpl sipURI = getVipSipUri();
        return sipURI;
    }   
View Full Code Here

Examples of com.ericsson.ssa.sip.SipURIImpl

                        } else if (schemePart.equals(
                                    SipFactoryImpl.SIP_URI_PROTOCOL) ||
                                schemePart.equals(
                                    SipFactoryImpl.SIPS_URI_PROTOCOL)) {
                            try {
                                SipURIImpl sipuri = new SipURIImpl(schemePart,
                                        theUriPart, 0);

                                // check user=phone etc here
                                String userParam = sipuri.getParameter("user");

                                if ((userParam != null) &&
                                        userParam.equals("phone")) {
                                    String userTelUrl = sipuri.getUser();

                                    return lookupTelUrlNAPTRRecord(AUS,
                                        EnumUtil.toDomain(userTelUrl,
                                            myEnumTopDomain), visited, ++depth);
                                }
View Full Code Here

Examples of com.ericsson.ssa.sip.SipURIImpl

        for (int i = 0; i < tt.length; i++) {
            if (tt[i].getAddress() != null &&
                    tt[i].getAddress().isAnyLocalAddress()) {
                continue;
            }
            SipURIImpl s = new SipURIImpl();
            s.setSecure(tt[i].getProtocol().ordinal() == SipTransports.TLS);
            s.setHost(tt[i].getIP());
            s.setPort(tt[i].getPort());
            if (!s.isSecure()) {
                s.setTransportParam(tt[i].getProtocol().name());
            }
            if (!outboundInterfaces.contains(s)){               
                outboundInterfaces.add(s);
            }
        }
View Full Code Here

Examples of org.cipango.sip.SipURIImpl

        "1"));
  }

  protected void testRouterInfo(SipApplicationRouterInfo routerInfo) throws Exception
  {
    SipURI uri = new SipURIImpl(null, "localhost", 5060);
    RouterInfoUtil.encode(uri, routerInfo);
    //System.out.println(uri);
    assertEquals(routerInfo, RouterInfoUtil.decode(new SipURIImpl(uri.toString())));
  }
View Full Code Here

Examples of org.cipango.sip.SipURIImpl

    _connectorManager.start();
   
   
    for (int i = 0; i < MATCHING_LOCAL_URI.length; i++)
      assertTrue("Not match on " + MATCHING_LOCAL_URI[i],
          _connectorManager.isLocalUri(new SipURIImpl(MATCHING_LOCAL_URI[i])));
   
    for (int i = 0; i < NO_MATCHING_LOCAL_URI.length; i++)
      assertFalse("Match on " + NO_MATCHING_LOCAL_URI[i],
          _connectorManager.isLocalUri(new SipURIImpl(NO_MATCHING_LOCAL_URI[i])));
    _connectorManager.stop();
  }
View Full Code Here

Examples of org.cipango.sip.SipURIImpl

    TestConnector connector = new TestConnector("intern.cipango.org", "192.168.1.1", 5060);
    connector.setExternalHost("cipango.org");
    _connectorManager.addConnector(connector);
    _connectorManager.start();
   
    assertTrue(_connectorManager.isLocalUri(new SipURIImpl("sip:cipango.org;lr")));
    assertFalse(_connectorManager.isLocalUri(new SipURIImpl("sip:intern.cipango.org;lr")));
   
    _connectorManager.stop();
  }
View Full Code Here

Examples of org.cipango.sip.SipURIImpl

  }

  @Test
  public void testSipUri() throws Exception
  {
    SipURI orig = new SipURIImpl("sip:foo@bar.com;transport=tcp?to=sip:bob%40biloxi.com");
    SipURI readOnly = new ReadOnlySipURI((SipURI) orig.clone());
   
    assertEquals(orig, readOnly);
    try { readOnly.setParameter("foo", "bar"); fail();} catch (IllegalStateException e) {}
    try { readOnly.removeParameter("transport"); fail();} catch (IllegalStateException e) {} 
    try { readOnly.setHeader("subject", "toto"); fail();} catch (IllegalStateException e) {}
    try { readOnly.removeHeader("to"); fail();} catch (IllegalStateException e) {}
    assertEquals(orig, readOnly);
    assertEquals(readOnly, orig);
    assertEquals(orig.toString(), readOnly.toString());
    URI clone = (URI) readOnly.clone();
    clone.setParameter("a", "b");
    testSerializable(readOnly);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.