Package javax.sip

Examples of javax.sip.Dialog.createAck()


                // Request cancel = inviteTid.createCancel();
                // ClientTransaction ct =
                // sipProvider.getNewClientTransaction(cancel);
                Dialog dialog = tid.getDialog();
                Request ackRequest = dialog.createAck(cseq.getSeqNumber());
                TlsTest.assertTrue( "Secure URI",
                        ((SipURI)ackRequest.getRequestURI()).isSecure() );
                logger.info("Ack request to send = " + ackRequest);
                logger.info("Sending ACK");
                dialog.sendAck(ackRequest);
View Full Code Here


        try {
            if (response.getStatusCode() == Response.OK) {
                if (cseq.getMethod().equals(Request.INVITE)) {
                    Dialog dialog = inviteTid.getDialog();
                    Request ackRequest = dialog.createAck( cseq.getSeqNumber() );
                    System.out.println("Sending ACK");
                    dialog.sendAck(ackRequest);
                } else if (cseq.getMethod().equals(Request.CANCEL)) {
                    if (dialog.getState() == DialogState.CONFIRMED) {
                        // oops cancel went in too late. Need to hang up the
View Full Code Here

                // sipProvider.getNewClientTransaction(cancel);
                // ct.sendRequest();
                Dialog dialog = tid.getDialog();
                if (dialog.getState() != DialogState.TERMINATED) {
                    CSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
                    Request ackRequest = dialog.createAck(cseq.getSeqNumber());
                    dialog.sendAck(ackRequest);

                    Appdata appData = (Appdata) dialog.getApplicationData();
                    if (appData != null)
                        appData.ackCount++;
View Full Code Here

                    // Request cancel = inviteTid.createCancel();
                    // ClientTransaction ct =
                    // sipProvider.getNewClientTransaction(cancel);
                    Dialog dialog = tid.getDialog();
                    CSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
                    Request ackRequest = dialog.createAck(cseq.getSeqNumber());
                    logger.info("Ack request to send = " + ackRequest);
                    logger.info("Sending ACK");
                    dialog.sendAck(ackRequest);

                 
View Full Code Here

        if ( responseReceivedEvent.getResponse().getStatusCode() == Response.OK) {
          this.sawOk = true;
        Dialog dialog = responseReceivedEvent.getDialog();
        long cseq = ((CSeqHeader) responseReceivedEvent.getResponse()
            .getHeader(CSeqHeader.NAME)).getSeqNumber();
        Request ack = dialog.createAck(cseq);
        dialog.sendAck(ack);
        }
      } catch (Exception ex) {
        fail("Unexpected exception");
View Full Code Here

        // ClientTransaction ct =
        // sipProvider.getNewClientTransaction(cancel);
        Dialog dialog = tid.getDialog();
        CSeqHeader cseq = (CSeqHeader) response
            .getHeader(CSeqHeader.NAME);
        Request ackRequest = dialog.createAck(cseq.getSeqNumber());
        logger.info("Ack request to send = " + ackRequest);
        logger.info("Sending ACK");
        dialog.sendAck(ackRequest);
       
        // Then wait a bit, send BYE
View Full Code Here

    try {
      if (response.getStatusCode() == Response.OK) {
        if (cseq.getMethod().equals(Request.INVITE)) {
          TestCase.assertEquals( DialogState.CONFIRMED, dialog.getState() );
          Request ackRequest = dialog.createAck(cseq
              .getSeqNumber());
         
          TestCase.assertNotNull( ackRequest.getHeader( MaxForwardsHeader.NAME ) );
         
          if ( dialog == this.ackedDialog ) {
View Full Code Here

                    this.okRecieved = true;
                    ReInviteBusyTest.assertNotNull("INVITE 200 response should match a transaction",
                            tid);
                    Dialog dialog = tid.getDialog();
                    CSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
                    Request request = dialog.createAck(cseq.getSeqNumber());
                    dialog.sendAck(request);
                }
                if (tid != null) {
                    Dialog dialog = tid.getDialog();
                    logger.info("Dalog State = " + dialog.getState());
View Full Code Here

          if (response.getStatusCode() == Response.OK
              && ((CSeqHeader) response.getHeader(CSeqHeader.NAME))
                  .getMethod().equals(Request.INVITE)) {
            Dialog dialog = tid.getDialog();
            CSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
            Request ackRequest = dialog.createAck(cseq.getSeqNumber());
            dialog.sendAck(ackRequest);
          }
          if ( tid != null ) {
              Dialog dialog = tid.getDialog();
              logger.info("Dialog State = " + dialog.getState());      }
View Full Code Here

        // sipProvider.getNewClientTransaction(cancel);
        // ct.sendRequest();
        Dialog dialog = tid.getDialog();
        if (dialog.getState() != DialogState.TERMINATED) {
          CSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
          Request ackRequest = dialog.createAck(cseq.getSeqNumber());
          dialog.sendAck(ackRequest);

          Appdata appData = (Appdata) dialog.getApplicationData();
          if (appData != null)
            appData.ackCount++;
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.