code: public boolean sendNotify(Request req, boolean viaProxy) {
      setErrorMessage("");
  
      synchronized (dialogLock) {
        if (dialog == null) {
          setErrorMessage("Can't send notify, haven't received a request");
          return false;
        }
  
        try {
          phone.addAuthorizations(((CallIdHeader) req.getHeader(CallIdHeader.NAME)).getCallId(), req);
  
          SipTransaction transaction = phone.sendRequestWithTransaction(req, viaProxy, dialog, this);
          if (transaction == null) {
            setErrorMessage(phone.getErrorMessage());
            return false;
          }
  
          setLastSentNotify(req);
  
          LOG.trace("Sent NOTIFY to {}:\n{}", dialog.getRemoteParty().getURI(), req);
  
          return true;
        } catch (Exception e) {
          setErrorMessage(e.getClass().getName() + ": " + e.getMessage());
        }
      }
  
      return false;
  
    }
docs: This method sends the given request to the subscriber. Knowledge of JAIN-SIP API headers is
  required. The request will be resent if challenged. Use this method only if you have previously
  called processSubscribe(). Use this method if you don't care about checking the response to the
  sent NOTIFY, otherwise use sendStatefulNotify().
  
  @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 true if successful, false otherwise (call getErrorMessage() for details).