Package javax.sip

Examples of javax.sip.Dialog.sendAck()


                        && ((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


                    Dialog dialog = responseReceivedEvent.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) {
                logger.error(ex);
                ex.printStackTrace();
                RFC5626KeepAliveTest.fail("unexpected exception");
View Full Code Here

                    Dialog dialog = responseReceivedEvent.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) {
                logger.error(ex);
                ex.printStackTrace();
                ReconnectTCPTest.fail("unexpected exception");
View Full Code Here

                        TestCase.assertTrue("Identity check" , this.ackedDialog == null || this.ackedDialog == dialog);
                        this.ackedDialog = dialog;

                        Request ackRequest = dialog.createAck(cseq.getSeqNumber());
                        dialog.sendAck(ackRequest);
                        this.timer.schedule( new SendBye(dialog),500);
                      } else {
                        TestCase.assertTrue("retransmission flag should be true", responseReceivedEvent
                                .isRetransmission());
                        if (timedOutDialog.isEmpty()) {
View Full Code Here

                    // Proxy will fork. I will accept the second dialog
                    // but not the first.
                    this.forkedDialogs.add(dialog);
                    logger.info("Sending ACK");
                    dialog.sendAck(ackRequest);
                    if ( dialog.getState() == DialogState.TERMINATED ) {
                      return;
                    }
                    if ( forkedDialogs.size() == 2 ) {
                     
View Full Code Here

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

                    // Proxy will fork. I will accept the second dialog
View Full Code Here

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

                // Send a Re INVITE but this time force it
                // to use UDP as the transport. Else, it will
                // Use whatever transport was used to create
                // the dialog.
View Full Code Here

                    .equals(
                    Request.INVITE)) {
                Dialog dialog = tid.getDialog();
                // Save the tags for the dialog here.
                Request request = tid.getRequest();
                dialog.sendAck(request);
            }
            Dialog dialog = tid.getDialog();
            assertTrue("Dialog should not be null",dialog != null);
            //System.out.println("dialog = " + dialog);
        } catch (SipException ex) {
View Full Code Here

            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
                        // dialog.
                        System.out
View Full Code Here

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

                 
                    Request inviteRequest = dialog.createRequest(Request.INVITE);
                    ((SipURI) inviteRequest.getRequestURI()).removeParameter("transport");
                    ((ViaHeader) inviteRequest.getHeader(ViaHeader.NAME)).setTransport("udp");
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.