code: public void send(TCUniRequest event) throws TCAPSendException {
  
          if (this.previewMode)
              return;
  
          if (this.isStructured()) {
              throw new TCAPSendException("Structured dialogs do not use Uni");
          }
  
          try {
              this.dialogLock.lock();
              TCUniMessageImpl msg = (TCUniMessageImpl) TcapFactory.createTCUniMessage();
  
              if (event.getApplicationContextName() != null || event.getConfidentiality() != null
                      || event.getSecurityContext() != null || event.getUserInformation() != null) {
                  // set dialog portion
                  DialogPortion dp = TcapFactory.createDialogPortion();
                  dp.setProtocolVersion(TcapFactory.createProtocolVersionFull());
                  dp.setApplicationContext(event.getApplicationContextName());
                  dp.setUserInformation(event.getUserInformation());
                  dp.setSecurityContext(event.getSecurityContext());
                  dp.setConfidentiality(event.getConfidentiality());
  
                  msg.setDialogPortion(dp);
              }
  
              if (this.scheduledComponentList.size() > 0) {
                  Component[] componentsToSend = new Component[this.scheduledComponentList.size()];
                  this.prepareComponents(componentsToSend);
                  msg.setComponent(componentsToSend);
  
              }
  
              AsnOutputStream aos = new AsnOutputStream();
              try {
                  msg.encode(aos);
                  if (this.provider.getStack().getStatisticsEnabled()) {
                      this.provider.getStack().getCounterProviderImpl().updateTcUniSentCount(this);
                  }
                  this.provider.send(aos.toByteArray(), event.getReturnMessageOnError(), this.remoteAddress, this.localAddress,
                          this.seqControl, this.getNetworkId(), this.localSsn);
                  this.scheduledComponentList.clear();
              } catch (Exception e) {
                  if (logger.isEnabledFor(Level.ERROR)) {
                      logger.error("Failed to send message: ", e);
                  }
                  throw new TCAPSendException("Failed to send TC-Uni message: " + e.getMessage(), e);
              } finally {
                  release();
              }
          } finally {
              this.dialogLock.unlock();
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.tcap.api.tc.dialog.Dialog#sendUni()