Package javax.sip

Examples of javax.sip.Dialog.createAck()


            && ((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());
          logger.info("Ack request to send = " + ackRequest);
          logger.info("Sending ACK");
          dialog.sendAck(ackRequest);
        }
      } catch (Exception ex) {
View Full Code Here


    try {
      if (response.getStatusCode() == Response.OK) {
        if (cseq.getMethod().equals(Request.INVITE)) {
          TestHarness.assertEquals(DialogState.CONFIRMED, dialog
              .getState());
          Request ackRequest = dialog.createAck(cseq.getSeqNumber());

          dialog.sendAck(ackRequest);

          TestHarness.assertNotNull(ackRequest
              .getHeader(MaxForwardsHeader.NAME));
View Full Code Here

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

   
                            TestCase.assertTrue(this.ackedDialog == null ||
                                    this.ackedDialog == dialog);
                            this.ackedDialog = dialog;
                       
                            Request ackRequest = dialog.createAck(cseq
                                    .getSeqNumber());
                       
                            TestCase.assertNotNull( ackRequest.getHeader( MaxForwardsHeader.NAME ) );
                            //  sleeping to see how it reacts with retrans
                            logger.info("Waiting to Send ACK");
View Full Code Here

                       
                        if(canceledDialog.isEmpty()) {
                            TestCase.assertFalse("retransmission flag should be false",responseReceivedEvent.isRetransmission());
                            TestCase.assertEquals( DialogState.CONFIRMED, dialog.getState() );
                            this.canceledDialog.add(dialog);
                            Request ackRequest = dialog.createAck(cseq
                                    .getSeqNumber());
                       
                            TestCase.assertNotNull( ackRequest.getHeader( MaxForwardsHeader.NAME ) );
                            //  sleeping to see how it reacts with retrans
                            logger.info("Waiting to Send ACK");
View Full Code Here

            }
            if ( responseReceivedEvent.getResponse().getStatusCode() == Response.OK) {

              Dialog d = responseReceivedEvent.getDialog();
              try {
                Request ack = d.createAck(1);
                sipProvider.sendRequest(ack);
                sipProvider.sendRequest(ack);
                sipProvider.sendRequest(ack);
                sipProvider.sendRequest(ack);
                sipProvider.sendRequest(ack);
View Full Code Here

                ChallengeTest.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

            q++;
            if ( responseReceivedEvent.getResponse().getStatusCode() == Response.OK) {

              Dialog d = responseReceivedEvent.getDialog();
              try {
                Request ack = d.createAck(1);
                sipProvider.sendRequest(ack);
                sipProvider.sendRequest(ack);
                sipProvider.sendRequest(ack);
                sipProvider.sendRequest(ack);
                sipProvider.sendRequest(ack);
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);

                    Thread.sleep(100);
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

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.