Examples of SipRequest


Examples of org.cipango.server.SipRequest

 
  public String getCallSessionId(SipMessage message)
  {   
    if (message.isRequest())
    {
      SipRequest request = (SipRequest) message;
     
      if (request.isInitial())
      {
        String sessionKey = (String) request.getHandlerAttribute(ID.SESSION_KEY_ATTRIBUTE);
     
        if (sessionKey != null)
        {
          SipAppContext context = (SipAppContext) request.getHandlerAttribute(ID.CONTEXT_ATTRIBUTE);
          return ID.getIdFromKey(context.getName(), sessionKey);
        }
      }
      else
      {   
        String appSessionId = request.getParameter(ID.APP_SESSION_ID_PARAMETER);
        if (appSessionId != null && ID.isKey(appSessionId))
          return appSessionId;
      }
    }
    else
View Full Code Here

Examples of org.cipango.server.SipRequest

    _state = newState;
  }
 
  public void updateState(SipResponse response, boolean uac)
  {
    SipRequest request = (SipRequest) response.getRequest();
    int status = response.getStatus();
       
    if (request.isInitial() && (request.isInvite() || request.isSubscribe()))
    {
      switch (_state)
      {
      case INITIAL:
        if (status < 300)
        {
          if (_ua != null)
            _ua.createDialog(response, uac);
          else if (isProxy())
            createProxyDialog(response);
         
          if (status < 200)
            setState(State.EARLY);
          else
            setState(State.CONFIRMED);
        }
        else
        {
          if (uac)
          {
            _ua.resetDialog();
            setState(State.INITIAL);
          }
          else
          {
            setState(State.TERMINATED);
          }
        }
        break;
      case EARLY:
        if (200 <= status && status < 300)
        {
          setState(State.CONFIRMED);
        }
        else if (status >= 300)
        {
          if (uac)
            setState(State.INITIAL);
          else
            setState(State.TERMINATED);
        }
        break;
      }
    }
    else if (request.isBye())
    {
      setState(State.TERMINATED);
    }
  }
View Full Code Here

Examples of org.jvnet.glassfish.comms.sipagent.model.SipRequest

       
        new Thread(itsSocketHandler).start();
    }
   
    public SipRequest createRequest(){
        SipRequest result = null;
        try{
            result = this.createRequest(itsConstants.dummyRequest());
        }
        catch (BackendException e){
            // This would be a programmatic error as Constants should return
View Full Code Here

Examples of org.restlet.ext.sip.SipRequest

    @Override
    protected void addGeneralHeaders(Series<Parameter> headers) {
        if (getMessage().getRequest() instanceof SipRequest) {
            // Put the VIA header at the top most level.
            SipRequest sipRequest = (SipRequest) getMessage().getRequest();

            if (!sipRequest.getSipRecipientsInfo().isEmpty()) {
                for (SipRecipientInfo recipient : sipRequest
                        .getSipRecipientsInfo()) {
                    // Generate one VIA header per recipient
                    headers.add(HeaderConstants.HEADER_VIA,
                            SipRecipientInfoWriter.write(recipient));
                }
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.