Package javax.sip

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


                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

        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

                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

            } else {
                this.inviteOkSeen = true;
                if ( ((CSeqHeader)response.getHeader(CSeqHeader.NAME)).getMethod().equals(Request.INVITE) &&
                        response.getStatusCode() == 200){
                    long cseqno = ((CSeqHeader)response.getHeader(CSeqHeader.NAME)).getSeqNumber();
                    Request ack = dialog.createAck(cseqno);
                    dialog.sendAck(ack);
                } else {
                    if ( !((CSeqHeader)response.getHeader(CSeqHeader.NAME)).getMethod().equals(Request.INVITE)) {
                        System.out.println("Unexpected response " + response);
                        BackToBackUserAgentTest.fail("Unexpected response");
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

        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

                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

            } else {
                this.inviteOkSeen = true;
                if ( ((CSeqHeader)response.getHeader(CSeqHeader.NAME)).getMethod().equals(Request.INVITE) &&
                        response.getStatusCode() == 200){
                    long cseqno = ((CSeqHeader)response.getHeader(CSeqHeader.NAME)).getSeqNumber();
                    Request ack = dialog.createAck(cseqno);
                    dialog.sendAck(ack);
                } else {
                    if ( !((CSeqHeader)response.getHeader(CSeqHeader.NAME)).getMethod().equals(Request.INVITE)) {
                        System.out.println("Unexpected response " + response);
                        BackToBackUserAgentTest.fail("Unexpected response");
View Full Code Here

        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

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.