Package javax.sip.header

Examples of javax.sip.header.ContentTypeHeader


                }

                byte[] content = request.getRawContent();
                if (content != null) {
                    logger.info(" content = " + new String(content));
                    ContentTypeHeader contentTypeHeader = protocolObjects.headerFactory
                            .createContentTypeHeader("application", "sdp");
                    logger.info("response = " + response);
                    response.setContent(content, contentTypeHeader);
                }
                dialog = st.getDialog();
View Full Code Here


                // add via headers
                viaHeaders.add(viaHeader);

                // Create ContentTypeHeader
                ContentTypeHeader contentTypeHeader = protocolObjects.headerFactory
                        .createContentTypeHeader("application", "sdp");

                // Create a new CallId header
                CallIdHeader callIdHeader = provider.getNewCallId();
                // JvB: Make sure that the implementation matches the messagefactory
View Full Code Here

                // Thread.sleep(5000);
                logger.info("got a server tranasaction " + st);
                byte[] content = request.getRawContent();
                if (content != null) {
                    ContentTypeHeader contentTypeHeader = protocolObjects.headerFactory
                            .createContentTypeHeader("application", "sdp");
                    response.setContent(content, contentTypeHeader);
                }
                dialog = st.getDialog();
                if (dialog != null) {
View Full Code Here

                // add via headers
                viaHeaders.add(viaHeader);

                // Create ContentTypeHeader
                ContentTypeHeader contentTypeHeader = protocolObjects.headerFactory
                        .createContentTypeHeader("application", "sdp");

                // Create a new CallId header
                CallIdHeader callIdHeader = provider.getNewCallId();
                // JvB: Make sure that the implementation matches the messagefactory
View Full Code Here

            // Not yet implemented
            //           
            // 9. Add a Content-Length header field if necessary
            //           
            ContentTypeHeader contentTypeHeader = (ContentTypeHeader) clonedRequest
                    .getHeader(ContentTypeHeader.NAME);
            if (contentTypeHeader != null)
            {
                contentTypeHeader.removeParameter("msgr");
            }

            // if the proxy has been reset, do not send the to tag
            if (proxy.isReset() == true)
            {
View Full Code Here

            Request dialogRequest = peerDialog.createRequest(clonedRequest
                    .getMethod());
            Object content = clonedRequest.getContent();
            if (content != null)
            {
                ContentTypeHeader contentTypeHeader = (ContentTypeHeader) clonedRequest
                        .getHeader(ContentTypeHeader.NAME);
                if (contentTypeHeader != null)
                    dialogRequest.setContent(content, contentTypeHeader);
            }
View Full Code Here

             * having received PRACKs for all unacknowledged reliable provisional responses,
             * unless the final response is 2xx and any of the unacknowledged reliable provisional
             * responses contained a session description. In that case, it MUST NOT send a final
             * response until those provisional responses are acknowledged.
             */
            final ContentTypeHeader contentTypeHeader = ((SIPResponse)response).getContentTypeHeader();
            if (this.pendingReliableResponseAsBytes != null
                    && this.getDialog() != null
                    && this.getInternalState() != TransactionState._TERMINATED
                    && statusCode / 100 == 2
                    && contentTypeHeader != null
                    && contentTypeHeader.getContentType()
                            .equalsIgnoreCase(CONTENT_TYPE_APPLICATION)
                    && contentTypeHeader.getContentSubType()
                            .equalsIgnoreCase(CONTENT_SUBTYPE_SDP)) {
                if (!interlockProvisionalResponses ) {
                    throw new SipException("cannot send response -- unacked povisional");
                } else {
                    try {
View Full Code Here

                    }

                    byte[] content = request.getRawContent();
                    if (content != null) {
                        logger.info(" content = " + new String(content));
                        ContentTypeHeader contentTypeHeader = protocolObjects.headerFactory
                                .createContentTypeHeader("application", "sdp");
                        logger.info("response = " + response);
                        response.setContent(content, contentTypeHeader);
                    }
                    dialog = st.getDialog();
View Full Code Here

                ContentLengthHeader.NAME.length()  < 1300) {
           
            /*
             * Check to see we are within one UDP packet.
             */
            ContentTypeHeader cth = new ContentType("message", "sipfrag");
            buf.append("\r\n" + cth.toString());
            ContentLength clengthHeader = new ContentLength(clength);
            buf.append("\r\n" + clengthHeader.toString());
            buf.append("\r\n\r\n" + badReq);
        } else {
            ContentLength clengthHeader = new ContentLength(0);
View Full Code Here

                // add via headers
                viaHeaders.add(viaHeader);

                // Create ContentTypeHeader
                ContentTypeHeader contentTypeHeader = headerFactory
                        .createContentTypeHeader("application", "sdp");

                // Create a new CallId header
                CallIdHeader callIdHeader = sipProvider.getNewCallId();
View Full Code Here

TOP

Related Classes of javax.sip.header.ContentTypeHeader

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.