Package javax.sip.header

Examples of javax.sip.header.SubscriptionStateHeader


        state = SubscriptionStateHeader.ACTIVE;
      } else if (code>=200) {
        state = SubscriptionStateHeader.TERMINATED;
      }
     
      SubscriptionStateHeader sstate = headerFactory.createSubscriptionStateHeader( state );
      if (state == SubscriptionStateHeader.TERMINATED) {
        sstate.setReasonCode("noresource");
      }
      notifyRequest.addHeader(sstate);     
      notifyRequest.setHeader(referEvent);
     
      Address address = addressFactory.createAddress("Referee <sip:127.0.0.1>");
View Full Code Here


            // Create an event header for the subscription.
            EventHeader eventHeader = headerFactory.createEventHeader("foo");
            eventHeader.setEventId("foo");
            request.addHeader(eventHeader);

            SubscriptionStateHeader ssh = headerFactory
                    .createSubscriptionStateHeader(SubscriptionStateHeader.ACTIVE);
            // Create the client transaction.
            request.addHeader(ssh);
            ClientTransaction ct = sipProvider.getNewClientTransaction(request);
View Full Code Here

                state = SubscriptionStateHeader.ACTIVE;
            } else if (code>=200) {
                state = SubscriptionStateHeader.TERMINATED;
            }

            SubscriptionStateHeader sstate = headerFactory.createSubscriptionStateHeader( state );
            if (state == SubscriptionStateHeader.TERMINATED) {
                sstate.setReasonCode("noresource");
            }
            notifyRequest.addHeader(sstate);
            notifyRequest.setHeader(referEvent);

            Address address = addressFactory.createAddress("Referee <sip:127.0.0.1>");
View Full Code Here

                ehdr.setEventId(eventId);
            }
            req.addHeader(ehdr);

            String state = getSubscriptionState();
            SubscriptionStateHeader hdr = parent.getHeaderFactory()
                    .createSubscriptionStateHeader(state);

            if (state.equals(SubscriptionStateHeader.TERMINATED))
            {
                hdr.setReasonCode(getTerminationReason());
            }
            else if (state.equals(SubscriptionStateHeader.ACTIVE)
                    || state.equals(SubscriptionStateHeader.PENDING))
            {
                hdr.setExpires(getTimeLeft());
            }

            req.addHeader(hdr);

            AcceptHeader accept = parent.getHeaderFactory().createAcceptHeader(
View Full Code Here

                state = SubscriptionStateHeader.ACTIVE;
            } else if (code>=200) {
                state = SubscriptionStateHeader.TERMINATED;
            }

            SubscriptionStateHeader sstate = headerFactory.createSubscriptionStateHeader( state );
            if (state == SubscriptionStateHeader.TERMINATED) {
                sstate.setReasonCode("noresource");
            }
            notifyRequest.addHeader(sstate);
            notifyRequest.setHeader(referEvent);

            Address address = addressFactory.createAddress("Referee <sip:127.0.0.1>");
View Full Code Here

TOP

Related Classes of javax.sip.header.SubscriptionStateHeader

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.