Package javax.servlet.sip

Examples of javax.servlet.sip.Proxy


  protected void doRequest(SipServletRequest req) throws ServletException, IOException
  {
    if (req.isInitial())
    {
      Proxy proxy = req.getProxy();
      proxy.setRecordRoute(true);
      proxy.setSupervised(true);

      proxy.proxyTo(req.getRequestURI());
    }
  }
View Full Code Here


    response.getApplicationSession().invalidate();
  }
 
  public void testProxy(SipServletRequest request) throws Exception
  {
    Proxy proxy = request.getProxy();
    proxy.setRecordRoute(true);
    proxy.setSupervised(false);
    proxy.proxyTo(request.getRequestURI());
  }
View Full Code Here

  }
 
  public void proxy(URI uri) throws TooManyHopsException
  {
    SipServletRequest request = getRequest();
    Proxy proxy = request.getProxy();
    proxy.setSupervised(true);
    proxy.proxyTo(uri);
  }
View Full Code Here

 
  public void handleRequest(SipRequest request) throws SipException, IOException
  {
    accessed();
   
    Proxy proxy = null;
   
    if (request.isInitial())
    {
      if (Log.isDebugEnabled())
        Log.debug("initial request {} for session {}", request.getRequestLine(), this);
     
      _localParty = (NameAddr) request.to().clone();
      _remoteParty = (NameAddr) request.from().clone();
      _callId = request.getCallId();
    }
    else
    {
      if (Log.isDebugEnabled())
        Log.debug("subsequent request {} for session {}", request.getRequestLine(), this);
     
      if (isUA())
      {
        _ua.handleRequest(request);
        if (request.isHandled())
          return;
      }
      else if (isProxy())
      {
        try
        {
          proxy = request.getProxy();
        }
        catch (TooManyHopsException e)
        {
          throw new SipException(SipServletResponse.SC_TOO_MANY_HOPS);
        }
      }
    }
    invokeServlet(request);
 
    if (proxy != null && !request.isCancel())
      proxy.proxyTo(request.getRequestURI())
  }
View Full Code Here

        return false;
    }

    public ProxyBranch getProxyBranch() {
        Proxy p = getProxy();

        if (p != null) {
            List<ProxyBranch> branches = p.getProxyBranches();

            if (branches != null) {
                for (ProxyBranch branch : branches) {
                    // Should return the branch for the transaction. The transaction
                    // may be identified by the request object. When doing proxyTo()
View Full Code Here

        if (headerMap.get(Header.MAX_FORWARDS).getValue().equals("0")) {
            throw new TooManyHopsException();
        }

        Proxy proxy = null;

        if (getProxyContext() == null) {
            if (isInApplicationPath()) {
                // support of SSA1.1, 10.2.3 Sending Responses (as a Proxy),
                // mandates to first fetch proxy before sending response
View Full Code Here

TOP

Related Classes of javax.servlet.sip.Proxy

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.