Class: Adhearsion::Rayo::Command::Dial

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

Instance Attribute Summary

Attributes inherited from RayoNode

#client, #connection, #original_component

Instance Method Summary collapse

Methods included from HasHeaders

#headers=

Methods inherited from Adhearsion::Rayo::CommandNode

#initialize, #response

Methods inherited from RayoNode

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

Constructor Details

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

Instance Method Details

#fromString

Returns the caller ID.

Returns:

  • (String)

    the caller ID



19
# File 'lib/adhearsion/rayo/command/dial.rb', line 19

attribute :from

#inherit(xml_node) ⇒ Object



30
31
32
33
34
35
# File 'lib/adhearsion/rayo/command/dial.rb', line 30

def inherit(xml_node)
  if join_element = xml_node.at_xpath('ns:join', ns: Join.registered_ns)
    self.join = Join.from_xml(join_element)
  end
  super
end

#joinJoin

Returns the nested join.

Returns:

  • (Join)

    the nested join



28
# File 'lib/adhearsion/rayo/command/dial.rb', line 28

attribute :join, Join

#rayo_attributesObject



37
38
39
# File 'lib/adhearsion/rayo/command/dial.rb', line 37

def rayo_attributes
  {to: to, from: from, uri: uri, timeout: timeout}
end

#rayo_children(root) ⇒ Object



41
42
43
44
# File 'lib/adhearsion/rayo/command/dial.rb', line 41

def rayo_children(root)
  join.to_rayo(root.parent) if join
  super
end

#response=(other) ⇒ Object



46
47
48
49
50
51
52
53
# File 'lib/adhearsion/rayo/command/dial.rb', line 46

def response=(other)
  if other.is_a?(Ref)
    @transport = other.scheme
    @target_call_id = other.call_id
    @domain = other.domain
  end
  super
end

#timeoutInteger

Returns timeout in milliseconds.

Returns:

  • (Integer)

    timeout in milliseconds



25
# File 'lib/adhearsion/rayo/command/dial.rb', line 25

attribute :timeout, Integer

#toString

Returns destination to dial.

Returns:

  • (String)

    destination to dial



16
# File 'lib/adhearsion/rayo/command/dial.rb', line 16

attribute :to

#uriString

Returns the requested URI for the resulting call.

Returns:

  • (String)

    the requested URI for the resulting call



22
# File 'lib/adhearsion/rayo/command/dial.rb', line 22

attribute :uri