Examples of SipProvider


Examples of javax.sip.SipProvider

      return;
    }
    logger.info("transaction state is " + tid.getState());
    logger.info("Dialog = " + tid.getDialog());
    logger.info("Dialog State is " + tid.getDialog().getState());
    SipProvider provider = (SipProvider) responseReceivedEvent.getSource();

    try {
      CSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
      if (response.getStatusCode() == Response.OK
          && cseq.getMethod().equals(Request.INVITE)) {
       
        // Request cancel = inviteTid.createCancel();
        // ClientTransaction ct =
        // sipProvider.getNewClientTransaction(cancel);
        Dialog dialog = tid.getDialog();
        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.
        if (reInviteCount == 0) {
          Request inviteRequest = dialog
              .createRequest(Request.INVITE);         
          Thread.sleep(100);
          ClientTransaction ct = provider
              .getNewClientTransaction(inviteRequest);
          dialog.sendRequest(ct);
          reInviteCount++;
        } else {
          this.okReceived = true;

Examples of org.zoolu.sip.provider.SipProvider

      NameAddress from=dialog.getLocalName();
      NameAddress target=dialog.getRemoteContact();
      if (target==null) target=to;
      SipURL request_uri=target.getAddress();
      if (request_uri==null) request_uri=dialog.getRemoteName().getAddress();
      SipProvider sip_provider=dialog.getSipProvider();
      String via_addr=sip_provider.getViaAddress();
      int host_port=sip_provider.getPort();
      boolean rport=sip_provider.isRportSet();
      String proto;
      if (target.getAddress().hasTransport()) proto=target.getAddress().getTransport();
      else proto=sip_provider.getDefaultTransport();
      NameAddress contact=dialog.getLocalContact();
      if (contact==null) contact=from;
      // increment the CSeq, if method is not ACK nor CANCEL
      if (!SipMethods.isAck(method) && !SipMethods.isCancel(method)) dialog.incLocalCSeq();
      String call_id=dialog.getCallID();
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.