Package javax.sip

Examples of javax.sip.Dialog


    if (stackLogger.isLoggingEnabled(LogWriter.TRACE_DEBUG))
      stackLogger.logDebug("Looking for dialog " + did);
    /*
     * Check if we can find this dialog in our dialog table.
     */
    Dialog replacesDialog = this.dialogTable.get(did);
    /*
     * This could be a forked dialog. Search for it.
     */
    if (replacesDialog == null) {
      for (SIPClientTransaction ctx : this.clientTransactionTable
View Full Code Here


        }

        public void processDialogTerminated(
                DialogTerminatedEvent dialogTerminatedEvent) {
            Dialog d = dialogTerminatedEvent.getDialog();
            System.out.println("Local Party = " + d.getLocalParty());

        }
View Full Code Here

                    "handleEvent " + sipEvent + "currentTransaction = "
                            + transaction + "this.sipListener = "
                            + this.getSipListener() + "sipEvent.source = "
                            + sipEvent.getSource());
            if (sipEvent instanceof RequestEvent) {
                Dialog dialog = ((RequestEvent) sipEvent).getDialog();
                if ( sipStack.isLoggingEnabled(LogWriter.TRACE_DEBUG))  sipStack.getStackLogger().logDebug("Dialog = " + dialog);
            } else if (sipEvent instanceof ResponseEvent) {
                Dialog dialog = ((ResponseEvent) sipEvent).getDialog();
                if (sipStack.isLoggingEnabled(LogWriter.TRACE_DEBUG) ) sipStack.getStackLogger().logDebug("Dialog = " + dialog);
            }
            sipStack.getStackLogger().logStackTrace();
        }
View Full Code Here

        // mranga: added check to ensure we are not sending empty (keepalive)
        // message.
        if (((SIPRequest) request).getRequestLine() != null
                && request.getMethod().equals(Request.ACK)) {
            Dialog dialog = sipStack.getDialog(((SIPRequest) request)
                    .getDialogId(false));
            if (dialog != null && dialog.getState() != null) {
              if (sipStack.isLoggingEnabled())
                sipStack.getStackLogger().logWarning(
                        "Dialog exists -- you may want to use Dialog.sendAck() "
                                + dialog.getState());
            }
        }
        Hop hop = sipStack.getRouter((SIPRequest) request).getNextHop(request);
        if (hop == null)
            throw new SipException("could not determine next hop!");
View Full Code Here

            inUse = true;
            if(q%100==0) System.out.println("Receive " + q);
            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

                        "<http://www.antd.nist.gov>");
                request.addHeader(callInfoHeader);

                // Create the client transaction.
                ClientTransaction inviteTid = sipProvider.getNewClientTransaction(request);
              Dialog d = null;
        try {
          d = sipProvider.getNewDialog(inviteTid);
        } catch (SipException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
View Full Code Here

                    "handleEvent " + sipEvent + "currentTransaction = "
                            + transaction + "this.sipListener = "
                            + this.getSipListener() + "sipEvent.source = "
                            + sipEvent.getSource());
            if (sipEvent instanceof RequestEvent) {
                Dialog dialog = ((RequestEvent) sipEvent).getDialog();
                if ( sipStack.isLoggingEnabled())  sipStack.getStackLogger().logDebug("Dialog = " + dialog);
            } else if (sipEvent instanceof ResponseEvent) {
                Dialog dialog = ((ResponseEvent) sipEvent).getDialog();
                if (sipStack.isLoggingEnabled() ) sipStack.getStackLogger().logDebug("Dialog = " + dialog);
            }
            sipStack.getStackLogger().logStackTrace();
        }
View Full Code Here

        // mranga: added check to ensure we are not sending empty (keepalive)
        // message.
        if (((SIPRequest) request).getRequestLine() != null
                && request.getMethod().equals(Request.ACK)) {
            Dialog dialog = sipStack.getDialog(((SIPRequest) request)
                    .getDialogId(false));
            if (dialog != null && dialog.getState() != null) {
              if (sipStack.isLoggingEnabled())
                sipStack.getStackLogger().logWarning(
                        "Dialog exists -- you may want to use Dialog.sendAck() "
                                + dialog.getState());
            }
        }
        Hop hop = sipStack.getRouter((SIPRequest) request).getNextHop(request);
        if (hop == null)
            throw new SipException("could not determine next hop!");
View Full Code Here

        if (stackLogger.isLoggingEnabled(LogWriter.TRACE_DEBUG))
          stackLogger.logDebug("Looking for dialog " + did);
        /*
         * Check if we can find this dialog in our dialog table.
         */
        Dialog replacesDialog =  this.dialogTable.get(did);
        /*
         * This could be a forked dialog. Search for it.
         */
        if ( replacesDialog == null ) {
      for (SIPClientTransaction ctx : this.clientTransactionTable
View Full Code Here

        // TODO Auto-generated catch block
        e.printStackTrace();
     
      //System.out.println("Ok (bye) sent");
     
      Dialog dialog = null;
      try{
      for (int i = 0; i < callIDheadersDia.size(); i++) {
        if(callIDheadersDia.get(i).equals(requestEvent.getRequest().getHeader(CallIdHeader.NAME))){
          dialog = DialogsOfB.get(i);
          DialogsOfB.remove(dialog);
          callIDheadersDia.remove(requestEvent.getRequest().getHeader(CallIdHeader.NAME));
          break;
        }
      }
    }catch(Exception e){
      System.out.println("For-loop Exception:" + e);
    }
     
      Request byeRequest;
      try {
        byeRequest = dialog.createRequest(Request.BYE);
        dialog.sendRequest(sipProvider.getNewClientTransaction(byeRequest));
      } catch (SipException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
     
View Full Code Here

TOP

Related Classes of javax.sip.Dialog

Copyright © 2018 www.massapicom. 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.