docs: public Call split(OperandChannel channelToSplit) throws PBXException
      {
          Channel channel = this.getOperandChannel(channelToSplit);
          channel.removeListener(this);
  
          CallDirection direction = CallDirection.INBOUND;
  
          // If this is the operator channel we need to flip the default
          // direction.
          if (this.getLocalParty() != null && this.getLocalParty().isSame(channel))
          {
              direction = CallDirection.OUTBOUND;
          }
  
          CallImpl call = new CallImpl(channel, direction);
          call._owner = OWNER.SELF;
  
          // clear the channel have just split out.
          switch (channelToSplit)
          {
              case ACCEPTING_PARTY :
                  this.setAcceptingParty(null);
                  break;
              case LOCAL_PARTY :
                  if (this._direction == CallDirection.INBOUND)
                  {
                      this.setAcceptingParty(null);
                  }
                  else
                  {
                      this.setOriginatingParty(null);
                  }
                  break;
              case ORIGINATING_PARTY :
                  this.setOriginatingParty(null);
                  break;
              case REMOTE_PARTY :
                  if (this._direction == CallDirection.INBOUND)
                      this.setOriginatingParty(null);
                  else
                      this.setAcceptingParty(null);
                  break;
              case TRANSFER_TARGET_PARTY :
                  this.setTransferTargetParty(null);
                  break;
              default :
                  break;
          }
  
          return call;
      }