Examples of createAck()


Examples of javax.sip.Dialog.createAck()

                    // 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

Examples of javax.sip.Dialog.createAck()

                Dialog peer = this.getPeer(dialog);
                Response response = this.lastResponseTable.get(peer);
                CSeqHeader cseqHeader = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
                String method = cseqHeader.getMethod();
                long seqno = cseqHeader.getSeqNumber();
                Request ack = peer.createAck(seqno);
                peer.sendAck(ack);
            }
          
        } catch ( Exception ex) {
            ex.printStackTrace();
View Full Code Here

Examples of javax.sip.Dialog.createAck()

        try {
            if (response.getStatusCode() == Response.OK) {
                if (cseq.getMethod().equals(Request.INVITE)) {
                    this.inviteOkSeen = true;
                    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

Examples of javax.sip.Dialog.createAck()

            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

Examples of javax.sip.Dialog.createAck()

            }
            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

Examples of javax.sip.Dialog.createAck()

        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 ) );

                     dialog.sendAck(ackRequest);
View Full Code Here

Examples of javax.sip.Dialog.createAck()

            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

Examples of javax.sip.Dialog.createAck()

            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

Examples of javax.sip.Dialog.createAck()

                logger.info("transaction = " + tid);
   
            logger.info("Dialog = " + dialog);
            logger.info("Dialog state is " + dialog.getState());
            if ( response.getStatusCode() == Response.OK && cseq.getMethod().equals(Request.INVITE) ) {
                Request ackRequest = dialog.createAck(cseq.getSeqNumber());
                dialog.sendAck(ackRequest);
                this.timer.schedule( new SendBye(dialog),500);
            }
                      
        } catch (Throwable ex) {
View Full Code Here

Examples of javax.sip.Dialog.createAck()

        public void processResponse(ResponseEvent responseReceivedEvent) {
            if ( responseReceivedEvent.getResponse().getStatusCode() == Response.OK) {

                Dialog d = responseReceivedEvent.getDialog();
                try {
                    Request ack = d.createAck(1);
                    // Added Thread.sleep to avoid regression on the test
                    // as ACKs arriving at the same time may create race condition
                    // where the ACK is removing from pending transactions by loose dialog validation
                    // but re created by the next ACK coming in line and thus the EventScanner
                    // sipStack.findPendingTransaction(sipRequest.getTransactionId()) gives transaction already exists
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.