Package org.cipango.sip

Examples of org.cipango.sip.NameAddr


    String[] routes = routerInfo.getRoutes();
    try
    {
      if (SipRouteModifier.ROUTE == routerInfo.getRouteModifier() && routes != null)
      {
        Address topRoute = new NameAddr(routes[0]);
        if (getConnectorManager().isLocalUri(topRoute.getURI()))
          request.setPoppedRoute(topRoute);
        else
        {
          for (int i = routes.length; i >= 0; --i)
            request.pushRoute(new NameAddr(routes[i]));
          request.send();
          return true;
        }
      }
      else if (SipRouteModifier.ROUTE_BACK == routerInfo.getRouteModifier() && routes != null)
      {
        SipConnector defaultConnector = getConnectorManager().getDefaultConnector();
          SipURI ownRoute = new SipURIImpl(null, defaultConnector.getHost(), defaultConnector.getPort());
          RouterInfoUtil.encode(ownRoute, routerInfo);

          ownRoute.setLrParam(true);
        request.pushRoute(ownRoute);
        for (int i = routes.length; i >= 0; --i)
          request.pushRoute(new NameAddr(routes[i]));
        request.send();
        return true;
      }
      else if (routes == null
          && (SipRouteModifier.ROUTE_BACK == routerInfo.getRouteModifier() || SipRouteModifier.ROUTE == routerInfo.getRouteModifier()))
View Full Code Here


  {
    // TODO to be completed
    _role = Role.UAS;
    _ua = new UA();
   
    NameAddr tmp = _remoteParty;
    _remoteParty = _localParty;
    _localParty = tmp;
   
    _ua.sendResponse(response, false);
  }
View Full Code Here

  public void setProxy()
  {
    if (isUA())
      throw new IllegalStateException("session is " + _role);
   
    NameAddr tmp = _remoteParty;
    _remoteParty = _localParty;
    _localParty = tmp;
   
    _role = Role.PROXY;
  }
View Full Code Here

TOP

Related Classes of org.cipango.sip.NameAddr

Copyright © 2018 www.massapicom. 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.