Examples of createResponse()


Examples of gov.nist.javax.sip.message.SIPRequest.createResponse()

                String method = ((SIPRequest) sipMessage).getMethod();
                String cseqMethod = ((SIPRequest) sipMessage).getCSeqHeader()
                        .getMethod();

                if (!method.equalsIgnoreCase(cseqMethod)) {
                    SIPResponse sipResponse = sipRequest
                    .createResponse(SIPResponse.BAD_REQUEST);
                    byte[] resp = sipResponse
                            .encodeAsBytes(this.getTransport());
                    this.sendMessage(resp, false);
                    throw new Exception("Bad CSeq method");
View Full Code Here

Examples of gov.nist.javax.sip.message.SIPRequest.createResponse()

                throw new SipException(
                        "No Supported/Require 100rel header in the request");
            }
        }

        SIPResponse response = request.createResponse(statusCode);
        /*
         * The provisional response to be sent reliably is constructed by the
         * UAS core according to the procedures of Section 8.2.6 of RFC 3261. In
         * addition, it MUST contain a Require header field containing the
         * option tag 100rel, and MUST include an RSeq header field. The value
View Full Code Here

Examples of gov.nist.javax.sip.message.SIPRequest.createResponse()

            if (list == null || !optionPresent(list, "100rel")) {
                throw new SipException("No Supported/Require 100rel header in the request");
            }
        }

        SIPResponse response = request.createResponse(statusCode);
        /*
         * The provisional response to be sent reliably is constructed by the UAS core according
         * to the procedures of Section 8.2.6 of RFC 3261. In addition, it MUST contain a Require
         * header field containing the option tag 100rel, and MUST include an RSeq header field.
         * The value of the header field for the first reliable provisional response in a
View Full Code Here

Examples of gov.nist.javax.sip.message.SIPRequest.createResponse()

            if (list == null || !optionPresent(list, "100rel")) {
                throw new SipException("No Supported/Require 100rel header in the request");
            }
        }

        SIPResponse response = request.createResponse(statusCode);
        /*
         * The provisional response to be sent reliably is constructed by the UAS core according
         * to the procedures of Section 8.2.6 of RFC 3261. In addition, it MUST contain a Require
         * header field containing the option tag 100rel, and MUST include an RSeq header field.
         * The value of the header field for the first reliable provisional response in a
View Full Code Here

Examples of javax.servlet.sip.SipServletRequest.createResponse()

      SipServletRequest peerRequest = b2bHelper.getLinkedSipServletRequest(response.getRequest());
   
      // Peer request could be null is case of 4xx/INVITE response by leg B.
      if (peerRequest != null)
      {
        peerRequest.createResponse(response.getStatus(), response.getReasonPhrase()).send();
      }
    }
    catch (Throwable e)
    {
      log("Unable to process response:\n" + response, e);
View Full Code Here

Examples of javax.sip.message.MessageFactory.createResponse()

            ServerTransaction firstServerTransaction = (ServerTransaction) firstTransaction;

            try
            {
                // send 487 Request Terminated reply to canceled request
                Response response = messageFactory.createResponse(
                        Response.REQUEST_TERMINATED, firstServerTransaction
                                .getRequest());
                firstServerTransaction.sendResponse(response);
            }
            catch (InvalidArgumentException e)
View Full Code Here

Examples of javax.sip.message.MessageFactory.createResponse()

            }

            try
            {
                // send OK to CANCEL
                Response response = messageFactory.createResponse(Response.OK,
                        originalRequest);
                serverTransaction.sendResponse(response);
            }
            catch (InvalidArgumentException e)
            {
View Full Code Here

Examples of javax.sip.message.MessageFactory.createResponse()

            // we have to reply an eventual error code statelessly

            if (!checkURIScheme(request))
            {
                // Let's return a 416 Unsupported URI scheme
                Response response = messageFactory.createResponse(
                        Response.UNSUPPORTED_URI_SCHEME, request);
                if (serverTransaction != null)
                    serverTransaction.sendResponse(response);
                else
                    sipProvider.sendResponse(response);
View Full Code Here

Examples of javax.sip.message.MessageFactory.createResponse()

            }

            if (!checkMaxForwards(request))
            {
                // Let's return a 483 too many hops
                Response response = messageFactory.createResponse(
                        Response.TOO_MANY_HOPS, request);
                if (serverTransaction != null)
                    serverTransaction.sendResponse(response);
                else
                    sipProvider.sendResponse(response);
View Full Code Here

Examples of javax.sip.message.MessageFactory.createResponse()

            }

            if (!checkLoopDetection(request))
            {
                // Let's return a 482 Loop detection
                Response response = messageFactory.createResponse(
                        Response.LOOP_DETECTED, request);
                if (serverTransaction != null)
                    serverTransaction.sendResponse(response);
                else
                    sipProvider.sendResponse(response);
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.