Package javax.sip.header

Examples of javax.sip.header.ExpiresHeader


            contactAddress.setDisplayName(fromName);

            contactHeader = headerFactory.createContactHeader(contactAddress);
            request.addHeader(contactHeader);

            ExpiresHeader expires_header = headerFactory
                    .createExpiresHeader(200);
            request.addHeader(expires_header);

            EventHeader event_header = null;
            event_header = headerFactory.createEventHeader("reg");
View Full Code Here


      ((SipURI)address.getURI()).setPort( sipProvider.getListeningPoint(transport).getPort() );       
      ContactHeader contactHeader = headerFactory.createContactHeader(address);     
      response.addHeader(contactHeader);
     
      // Expires header is mandatory in 2xx responses to SUBSCRIBE
      ExpiresHeader expires = (ExpiresHeader) request.getHeader( ExpiresHeader.NAME );
      if (expires==null) {
        expires = headerFactory.createExpiresHeader(30)// rather short
      }
      response.addHeader( expires );
     
View Full Code Here

      ((SipURI)address.getURI()).setPort( mySipProvider.getListeningPoint(transport).getPort() );       
      ContactHeader contactHeader = headerFactory.createContactHeader(address);     
      response.addHeader(contactHeader);
     
      // Expires header is mandatory in 2xx responses to REFER
      ExpiresHeader expires = (ExpiresHeader) refer.getHeader( ExpiresHeader.NAME );
      if (expires==null) {
        expires = headerFactory.createExpiresHeader(30)// rather short
      }
      response.addHeader( expires );
           
View Full Code Here

      // Unsubscribe to the Subscription. Note that if you do not unsubscribe the dialog will
      // live on and eventually you will run out of memory.

      Request unsub = dialog.createRequest(Request.SUBSCRIBE);
      ExpiresHeader expiresHeader = headerFactory
          .createExpiresHeader(0);
      unsub.addHeader(expiresHeader);

      EventHeader eventHeader = null;
      eventHeader = headerFactory.createEventHeader("reg");
View Full Code Here

      contactAddress.setDisplayName(fromName);

      contactHeader = headerFactory.createContactHeader(contactAddress);
      request.addHeader(contactHeader);

      ExpiresHeader expires_header = headerFactory
          .createExpiresHeader(200);
      request.addHeader(expires_header);

      EventHeader event_header = null;
      event_header = headerFactory.createEventHeader("reg");
View Full Code Here

      ((SipURI)address.getURI()).setPort( mySipProvider.getListeningPoint(transport).getPort() );       
      ContactHeader contactHeader = headerFactory.createContactHeader(address);     
      response.addHeader(contactHeader);
     
      // Expires header is mandatory in 2xx responses to REFER
      ExpiresHeader expires = (ExpiresHeader) refer.getHeader( ExpiresHeader.NAME );
      if (expires==null) {
        expires = headerFactory.createExpiresHeader(30)// rather short
      }
      response.addHeader( expires );
           
View Full Code Here

                ContactHeader contactHeader = headerFactory
                        .createContactHeader(contactAddress);
                request.addHeader(contactHeader);

                ExpiresHeader expires = headerFactory.createExpiresHeader(20);

                request.setHeader(expires);

                String sdpData = "v=0\r\n"
                        + "o=4855 13760799956958020 13760799956958020"
View Full Code Here

            ((SipURI)address.getURI()).setPort( mySipProvider.getListeningPoint(transport).getPort() );
            ContactHeader contactHeader = headerFactory.createContactHeader(address);
            response.addHeader(contactHeader);

            // Expires header is mandatory in 2xx responses to REFER
            ExpiresHeader expires = (ExpiresHeader) refer.getHeader( ExpiresHeader.NAME );
            if (expires==null) {
                expires = headerFactory.createExpiresHeader(30);// rather short
            }
            response.addHeader( expires );
View Full Code Here

            FromHeader from = (FromHeader) req_msg.getHeader(FromHeader.NAME);

            long expires = 60L * 60L * 1000L; // default 60 minutes
           
            ExpiresHeader ehead = (ExpiresHeader) req_msg
                    .getHeader(ExpiresHeader.NAME);
           
            ContactHeader contact = (ContactHeader) req_msg
            .getHeader(ContactHeader.NAME);

            if (ehead != null)
            {
                expires = ehead.getExpires() * 1000L;
            }
            else
            {
                if (contact != null)
                {
View Full Code Here

                return;
            }

            // determine the duration
            int duration = DEFAULT_SUBSCRIBE_DURATION;
            ExpiresHeader exp = (ExpiresHeader) request
                    .getHeader(ExpiresHeader.NAME);
            if (exp != null)
            {
                duration = exp.getExpires();
            }

            // find the active subscription (if exists) for this message
            Subscription sub = subscriptionList.findSubscription(request);
View Full Code Here

TOP

Related Classes of javax.sip.header.ExpiresHeader

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.