Package org.cipango.sip

Examples of org.cipango.sip.SipException


    }
   
    public void handleRequest(SipRequest request) throws IOException, SipException
    {
      if (request.getCSeq().getNumber() <= _remoteCSeq && !request.isAck() && !request.isCancel())
        throw new SipException(SipServletResponse.SC_SERVER_INTERNAL_ERROR, "Out of order request");
     
      _remoteCSeq = request.getCSeq().getNumber();
      if (request.isInvite())
        setRemoteTarget(request);
     
      if (request.isAck())
      {
        ServerInvite invite = getServerInvite(_remoteCSeq, false);
        if (invite == null)
        {
          if (Log.isDebugEnabled())
            Log.debug("dropping ACK without INVITE context");
          request.setHandled(true);
        }
        else
        {
          if (invite.getResponse() != null)
            invite.ack();
          else // retrans or late
            request.setHandled(true);
        }
      }
      else if (request.isPrack())
      {
        RAck rack = null;
       
        try
        {
          rack = request.getRAck();
        }
        catch (Exception e)
        {
          throw new SipException(SipServletResponse.SC_BAD_REQUEST, e.getMessage());
        }
       
        ServerInvite invite = getServerInvite(rack.getCSeq(), false);
       
        if (invite == null || !invite.prack(rack.getRSeq()))
          throw new SipException(SipServletResponse.SC_CALL_LEG_DONE, "No matching 100 rel for RAck " + rack);
        
      }
    }
View Full Code Here


        {
          proxy = request.getProxy();
        }
        catch (TooManyHopsException e)
        {
          throw new SipException(SipServletResponse.SC_TOO_MANY_HOPS);
        }
      }
    }
    invokeServlet(request);
 
View Full Code Here

    {
      _appSession.getContext().handle(request);
    }
    catch (TooManyHopsException e)
    {
      throw new SipException(SipServletResponse.SC_TOO_MANY_HOPS);
    }
    catch (Throwable t)
    {
      throw new SipException(SipServletResponse.SC_SERVER_INTERNAL_ERROR, t);
    }
  }
View Full Code Here

TOP

Related Classes of org.cipango.sip.SipException

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.