Class: Adhearsion::Rayo::Command::Join

Inherits:
Adhearsion::Rayo::CommandNode show all
Defined in:
lib/adhearsion/rayo/command/join.rb

Constant Summary collapse

VALID_DIRECTIONS =
[:duplex, :send, :recv].freeze

Instance Attribute Summary

Attributes inherited from RayoNode

#client, #connection, #original_component

Instance Method Summary collapse

Methods inherited from Adhearsion::Rayo::CommandNode

#initialize, #response, #response=

Methods inherited from RayoNode

#==, class_from_registration, from_xml, #inherit, #inspect, #rayo_children, register, #source, #to_rayo, #to_xml

Constructor Details

This class inherits a constructor from Adhearsion::Rayo::CommandNode

Instance Method Details

#call_uriString

Returns the call ID to join.

Returns:

  • (String)

    the call ID to join



14
# File 'lib/adhearsion/rayo/command/join.rb', line 14

attribute :call_uri

#direction=(other) ⇒ Object



22
23
24
25
26
27
# File 'lib/adhearsion/rayo/command/join.rb', line 22

def direction=(other)
  if other && !VALID_DIRECTIONS.include?(other.to_sym)
    raise ArgumentError, "Invalid Direction (#{other.inspect}), use: #{VALID_DIRECTIONS*' '}"
  end
  super
end

#media#to_sym

Returns the method by which to negotiate media.

Returns:

  • (#to_sym)

    the method by which to negotiate media



30
# File 'lib/adhearsion/rayo/command/join.rb', line 30

attribute :media, Symbol

#mixer_nameString

Returns the mixer name to join.

Returns:

  • (String)

    the mixer name to join



18
# File 'lib/adhearsion/rayo/command/join.rb', line 18

attribute :mixer_name

#rayo_attributesObject



32
33
34
35
36
37
38
39
# File 'lib/adhearsion/rayo/command/join.rb', line 32

def rayo_attributes
  {
    'call-uri' => call_uri,
    'mixer-name' => mixer_name,
    'direction' => direction,
    'media' => media
  }
end