Class: Punchblock::Command::Hangup

Inherits:
Punchblock::CommandNode show all
Includes:
HasHeaders
Defined in:
lib/punchblock/command/hangup.rb

Constant Summary

Constants inherited from RayoNode

RayoNode::InvalidNodeError

Instance Attribute Summary

Attributes inherited from RayoNode

#client, #component_id, #connection, #domain, #original_component, #target_call_id, #target_mixer_name

Class Method Summary collapse

Methods included from HasHeaders

#headers, #headers=, #headers_hash, #inspect_attributes

Methods inherited from Punchblock::CommandNode

#initialize, #inspect_attributes, #response, #response=, #write_attr

Methods inherited from RayoNode

class_from_registration, #eql?, import, #inspect, #inspect_attributes, register, #source

Constructor Details

This class inherits a constructor from Punchblock::CommandNode

Class Method Details

.new(options = {}) ⇒ Command::Hangup

Create a Rayo hangup command

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :headers (Array[Header], Hash, Optional)

    SIP headers to attach to the call. Can be either a hash of key-value pairs, or an array of Header objects.

Returns:



20
21
22
23
24
# File 'lib/punchblock/command/hangup.rb', line 20

def self.new(options = {})
  super().tap do |new_node|
    new_node.headers = options[:headers]
  end
end