Package javax.sip

Examples of javax.sip.Dialog.createRequest()


                    } else {

                        // Kill the first dialog by sending a bye.
                        SipProvider sipProvider = (SipProvider) responseReceivedEvent
                                .getSource();
                        Request byeRequest = dialog.createRequest(Request.BYE);
                        ClientTransaction ct = sipProvider
                                .getNewClientTransaction(byeRequest);
                        dialog.sendRequest(ct);
                    }
View Full Code Here


                }

                @Override
                public void run() {
                    try {
                        Request byeRequest = dialog.createRequest(Request.BYE);
                        ClientTransaction ct = sipProvider
                                .getNewClientTransaction(byeRequest);
                        dialog.sendRequest(ct);
                    } catch (Exception ex) {
                        TestHarness
View Full Code Here

                    // but not the first.

                    SipProvider sipProvider = (SipProvider) responseReceivedEvent
                            .getSource();

                    Request infoRequest = dialog.createRequest(Request.INFO);
                    ClientTransaction ct = sipProvider
                            .getNewClientTransaction(infoRequest);
                    dialog.sendRequest(ct);

                } else {
View Full Code Here

        try {
            logger.info("Got an ACK! sending bye : " + tid);
            if (tid != null) {
                Dialog dialog = tid.getDialog();
                TlsTest.assertSame("dialog id mismatch", dialog,this.dialog);
                Request bye = dialog.createRequest(Request.BYE);
                MaxForwardsHeader mf = protocolObjects.headerFactory
                        .createMaxForwardsHeader(10);
                bye.addHeader(mf);
                ClientTransaction ct = provider.getNewClientTransaction(bye);
                dialog.sendRequest(ct);
View Full Code Here

                // 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.
                if (reInviteCount == 0) {
                    Request inviteRequest = dialog
                            .createRequest(Request.INVITE);
                    Thread.sleep(100);
                    ClientTransaction ct = provider
                            .getNewClientTransaction(inviteRequest);
                    dialog.sendRequest(ct);
View Full Code Here

            // System.out.println("shootme: got an ACK " );
            // maybe a late arriving ack.
            if (serverTransaction == null) return;
            Dialog dialog = serverTransaction.getDialog();
                dialog = serverTransaction.getDialog();
            Request byeRequest = dialog.createRequest(Request.BYE);
            ClientTransaction tr =
                sipProvider.getNewClientTransaction(byeRequest);
            dialog.sendRequest(tr);
        } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

                    if (dialog.getState() == DialogState.CONFIRMED) {
                        // oops cancel went in too late. Need to hang up the
                        // dialog.
                        System.out
                                .println("Sending BYE -- cancel went in too late !!");
                        Request byeRequest = dialog.createRequest(Request.BYE);
                        ClientTransaction ct = sipProvider
                                .getNewClientTransaction(byeRequest);
                        dialog.sendRequest(ct);
                    }
                }
View Full Code Here

            System.out.println("Dialog State = " + dialog.getState());

            // Unsubscribe to the Subscription. Note that if you do not unsubscribe the dialog will
            // live on and eventually you will run out of memory.

            Request unsub = dialog.createRequest(Request.SUBSCRIBE);
            ExpiresHeader expiresHeader = headerFactory
                    .createExpiresHeader(0);
            unsub.addHeader(expiresHeader);

            EventHeader eventHeader = null;
View Full Code Here

                    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");
                    inviteRequest.addHeader(contactHeader);
                    MaxForwardsHeader mf = protocolObjects.headerFactory
                            .createMaxForwardsHeader(10);
View Full Code Here

        dialog.sendAck(ackRequest);
       
        // Then wait a bit, send BYE
        Thread.sleep( 1000 );
       
        dialog.sendRequest( provider.getNewClientTransaction( dialog.createRequest(Request.BYE)));
               
      } else if (response.getStatusCode() == Response.OK
          && ((CSeqHeader) response.getHeader(CSeqHeader.NAME))
              .getMethod().equals(Request.BYE)) {
       
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.