Class: FSR::App::Transfer

Inherits:
Application show all
Defined in:
lib/fsr/app/transfer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Application

#app_name, #raw, #to_s

Constructor Details

#initialize(destination_number, dialplan = nil, context = nil) ⇒ Transfer

Returns a new instance of Transfer.



7
8
9
10
11
# File 'lib/fsr/app/transfer.rb', line 7

def initialize(destination_number, dialplan = nil, context = nil)
  @destination_number = destination_number
  @dialplan = dialplan
  @context = context
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



5
6
7
# File 'lib/fsr/app/transfer.rb', line 5

def context
  @context
end

#destination_numberObject (readonly)

Returns the value of attribute destination_number.



5
6
7
# File 'lib/fsr/app/transfer.rb', line 5

def destination_number
  @destination_number
end

#dialplanObject (readonly)

Returns the value of attribute dialplan.



5
6
7
# File 'lib/fsr/app/transfer.rb', line 5

def dialplan
  @dialplan
end

Instance Method Details

#argumentsObject



13
14
15
# File 'lib/fsr/app/transfer.rb', line 13

def arguments
  [@destination_number, @dialplan, @context]
end

#sendmsgObject



17
18
19
# File 'lib/fsr/app/transfer.rb', line 17

def sendmsg
  "call-command: execute\nexecute-app-name: %s\nexecute-app-arg: %s\nevent-lock:true\n\n" % [app_name, arguments.join(" ")]
end