code: public SipTransaction sendStatefulNotify(Request req, boolean viaProxy) {
      setErrorMessage("");
      SipTransaction transaction;
  
      synchronized (dialogLock) {
        transaction = phone.sendRequestWithTransaction(req, viaProxy, dialog);
        if (transaction == null) {
          setErrorMessage(phone.getErrorMessage());
          return null;
        }
  
        // enable auth challenge handling
        phone.enableAuthorization(((CallIdHeader) req.getHeader(CallIdHeader.NAME)).getCallId());
  
        dialog = transaction.getClientTransaction().getDialog();
        setLastSentNotify(req);
      }
  
      LOG.trace("Sent NOTIFY {}", req.getHeader(ToHeader.NAME));
  
      return transaction;
    }
docs: This method sends the given request to the subscriber. Use this method when you want to see the
  response received in reply to the NOTIFY sent by this method. Authentication challenges
  received in reponse to the sent request are not automatically handled by this class - the
  caller will have to check for and handle it (TODO, provide a method that does like
  processRespons() for the caller to use). Knowledge of JAIN-SIP API headers is required to use
  this method. You may call this method whether or not this object has received a request (ie,
  whether or not you have previously called processSubscribe() on this object.) You may
  subsequently call waitResponse() to check the response returned by the far end.
  
  @param req javax.sip.message.Request to send.
  @param viaProxy If true, send the message to the proxy. In this case a Route header will be
  added. Else send the message as is.
  @return A SipTransaction object if the message was sent successfully, null otherwise. The
  calling program doesn't need to do anything with the returned SipTransaction other than
  pass it in to a subsequent call to waitResponse().