def start_transaction_handle(exclusive = true, options = {})
      session = @option.use_current_session?(options)
      handle = @option.use_current_handle?(options)
      instance = options['instance'] || 1
      transaction = Janus::Transactions::Handle.new(exclusive,
                                                    session,
                                                    handle,
                                                    instance)
      transaction.connect { yield(transaction) }
    rescue
      raise Errors::RRJ::StartTransactionHandle, exclusive, options
    end
def start_transaction_handle(exclusive = true, options = {})
      session = @option.use_current_session?(options)
      handle = @option.use_current_handle?(options)
      instance = options['instance'] || 1
      transaction = Janus::Transactions::Handle.new(exclusive,
                                                    session,
                                                    handle,
                                                    instance)
      transaction.connect { yield(transaction) }
    rescue
      raise Errors::RRJ::StartTransactionHandle, exclusive, options
    end
Start a transaction with Janus. Request used session_id/handle_id
 information.

 @param [Boolean] exclusive Choose if message is storage in exclusive queue
 @param [Hash] options
   Give a session number for use another session in Janus

 @note Use transaction.detach for closing handle in Janus

 @example Send request trickles for exclusive queue
   @cde = { 'sdpMid' => '...', sdpMLineIndex => 0, 'candidate' => '...' }
   @rrj.start_transaction_handle do |transaction|
     transaction.publish_message('base::trickle', @cde)
   end

 @example Send request trickles for non exclusive queue
   @cde = { 'sdpMid' => '...', sdpMLineIndex => 0, 'candidate' => '...' }
   @rrj.start_transaction_handle(false) do |transaction|
     transaction.publish_message('base::trickle', @cde)
   end

 @return [Fixnum] Handle used for transaction

 @since 2.0.0