private void doUpdate(Dialog dialog) {
    assert TransactionUtils.isTransactionExecutionThread()
        : "Code run in wrong thread. Must be run in TransactionThread. Now in "
            + Thread.currentThread();
    assert !done.get();

    if (dialog.getInitiateParty() == InitiateParty.LOCAL) {
      getTransactionManager().findTransaction(dialog, SIP_INVITE_CLIENT).update();
    } else {
      getTransactionManager().findTransaction(dialog, SIP_INVITE_SERVER).update();
    }
  }
  private void doRejectUpdate(
      final Dialog dialog, final int statusCode, final String alternativeUserAddress) {
    assert TransactionUtils.isTransactionExecutionThread()
        : "Code run in wrong thread. Must be run in TransactionThread. Now in "
            + Thread.currentThread();
    assert !done.get();

    if (dialog.getInitiateParty() == InitiateParty.LOCAL) {
      getTransactionManager()
          .findTransaction(dialog, SIP_INVITE_CLIENT)
          .rejectUpdate(statusCode, alternativeUserAddress);
    } else {
      // getTransactionManager().findTransaction(dialog, SIP_INVITE_SERVER).rejectUpdate(statusCode,
      // alternativeUserAddress);
      TransactionType<UpdateSrvTransaction, UpdateServerTransaction> transactionType =
          SIP_UPDATE_SERVER;
      getTransactionManager()
          .findTransaction(dialog, transactionType)
          .reject(statusCode, alternativeUserAddress);
    }
  }