docs: @Override
      public final List<IQ> dispatchIncomingPacket(IQ iq, String id) throws XMPPException, SmackException, InterruptedException {
          List<IQ> responses = new ArrayList<>();
          IQ response = null;
  
          if (iq != null) {
              if (iq.getType().equals(IQ.Type.error)) {
                  // Process errors
                  setNegotiatorState(JingleNegotiatorState.FAILED);
                  triggerTransportClosed(null);
                  // This next line seems wrong, and may subvert the normal closing process.
                  throw new JingleException(iq.getError().getDescriptiveText());
              } else if (iq.getType().equals(IQ.Type.result)) {
                  // Process ACKs
                  if (isExpectedId(iq.getStanzaId())) {
                      response = receiveResult(iq);
                      removeExpectedId(iq.getStanzaId());
                  }
              } else if (iq instanceof Jingle) {
                  // Get the action from the Jingle packet
                  Jingle jingle = (Jingle) iq;
                  JingleActionEnum action = jingle.getAction();
  
                  switch (action) {
                      case CONTENT_ACCEPT:
                          response = receiveContentAcceptAction(jingle);
                          break;
  
                      case CONTENT_MODIFY:
                          break;
  
                      case CONTENT_REMOVE:
                          break;
  
                      case SESSION_INFO:
                          break;
  
                      case SESSION_INITIATE:
                          response = receiveSessionInitiateAction(jingle);
                          break;
  
                      case SESSION_ACCEPT:
                          response = receiveSessionAcceptAction(jingle);
                          break;
  
                      case TRANSPORT_INFO:
                          response = receiveTransportInfoAction(jingle);
                          break;
  
                      default:
                          break;
                  }
              }
          }
  
          if (response != null) {
              addExpectedId(response.getStanzaId());
              responses.add(response);
          }
  
          return responses;
      }