Class: Punchblock::Command::Dial
- Inherits:
-
Punchblock::CommandNode
- Object
- Niceogiri::XML::Node
- RayoNode
- Punchblock::CommandNode
- Punchblock::Command::Dial
- Includes:
- HasHeaders
- Defined in:
- lib/punchblock/command/dial.rb
Instance Attribute Summary
Attributes inherited from RayoNode
#client, #component_id, #connection, #domain, #original_component, #target_call_id, #target_mixer_name
Class Method Summary (collapse)
-
+ (Command::Dial) new(options = {})
Create a dial message.
Instance Method Summary (collapse)
-
- (String) from
The caller ID.
- - (Object) from=(dial_from)
-
- (Object) inspect_attributes
:nodoc:.
-
- (Join) join
The nested join.
- - (Object) join=(other)
- - (Object) response=(other)
-
- (Integer) timeout
Timeout in milliseconds.
- - (Object) timeout=(other)
-
- (String) to
Destination to dial.
- - (Object) to=(dial_to)
Methods included from HasHeaders
#headers, #headers=, #headers_hash
Methods inherited from Punchblock::CommandNode
#initialize, #response, #write_attr
Methods inherited from RayoNode
class_from_registration, #eql?, import, #inspect, register, #source
Constructor Details
This class inherits a constructor from Punchblock::CommandNode
Class Method Details
+ (Command::Dial) new(options = {})
Create a dial message
31 32 33 34 35 |
# File 'lib/punchblock/command/dial.rb', line 31 def self.new( = {}) super().tap do |new_node| .each_pair { |k,v| new_node.send :#{k}=", v } end end |
Instance Method Details
- (String) from
The caller ID
51 52 53 |
# File 'lib/punchblock/command/dial.rb', line 51 def from read_attr :from end |
- (Object) from=(dial_from)
57 58 59 |
# File 'lib/punchblock/command/dial.rb', line 57 def from=(dial_from) write_attr :from, dial_from end |
- (Object) inspect_attributes
:nodoc:
95 96 97 |
# File 'lib/punchblock/command/dial.rb', line 95 def inspect_attributes # :nodoc: [:to, :from, :join] + super end |
- (Join) join
The nested join
76 77 78 79 |
# File 'lib/punchblock/command/dial.rb', line 76 def join element = find_first 'ns:join', :ns => Join.registered_ns Join.new element if element end |
- (Object) join=(other)
84 85 86 87 88 |
# File 'lib/punchblock/command/dial.rb', line 84 def join=(other) remove_children :join join = Join.new(other) unless other.is_a?(Join) self << join end |
- (Object) response=(other)
90 91 92 93 |
# File 'lib/punchblock/command/dial.rb', line 90 def response=(other) @target_call_id = other.id if other.is_a?(Ref) super end |
- (Integer) timeout
Timeout in milliseconds
63 64 65 |
# File 'lib/punchblock/command/dial.rb', line 63 def timeout read_attr :timeout, :to_i end |
- (Object) timeout=(other)
69 70 71 |
# File 'lib/punchblock/command/dial.rb', line 69 def timeout=(other) write_attr :timeout, other end |
- (String) to
Destination to dial
39 40 41 |
# File 'lib/punchblock/command/dial.rb', line 39 def to read_attr :to end |
- (Object) to=(dial_to)
45 46 47 |
# File 'lib/punchblock/command/dial.rb', line 45 def to=(dial_to) write_attr :to, dial_to end |