Class: Adhearsion::CallController::Dial::JoinStatus
- Defined in:
- lib/adhearsion/call_controller/dial.rb
Instance Attribute Summary collapse
-
#end_time ⇒ Object
Time at which the join was broken.
-
#result ⇒ Object
readonly
The result of the attempt to join calls Can be: * :joined - The calls were sucessfully joined * :no_answer - The attempt to dial the third-party was cancelled before they answered * :unconfirmed - The callee did not complete confirmation * :lost_confirmation - The callee completed confirmation, but was beaten by another * :error - The call ended with some error.
-
#start_time ⇒ Object
The time at which the calls were joined.
Instance Method Summary collapse
-
#duration ⇒ Object
The duration for which the calls were joined.
- #ended ⇒ Object
- #errored! ⇒ Object
-
#initialize ⇒ JoinStatus
constructor
A new instance of JoinStatus.
- #lost_confirmation! ⇒ Object
- #started ⇒ Object
- #unconfirmed! ⇒ Object
Constructor Details
#initialize ⇒ JoinStatus
Returns a new instance of JoinStatus.
484 485 486 |
# File 'lib/adhearsion/call_controller/dial.rb', line 484 def initialize @result = :no_answer end |
Instance Attribute Details
#end_time ⇒ Object
Time at which the join was broken
482 483 484 |
# File 'lib/adhearsion/call_controller/dial.rb', line 482 def end_time @end_time end |
#result ⇒ Object (readonly)
The result of the attempt to join calls Can be:
-
:joined - The calls were sucessfully joined
-
:no_answer - The attempt to dial the third-party was cancelled before they answered
-
:unconfirmed - The callee did not complete confirmation
-
:lost_confirmation - The callee completed confirmation, but was beaten by another
-
:error - The call ended with some error
495 496 497 |
# File 'lib/adhearsion/call_controller/dial.rb', line 495 def result @result end |
#start_time ⇒ Object
The time at which the calls were joined
479 480 481 |
# File 'lib/adhearsion/call_controller/dial.rb', line 479 def start_time @start_time end |
Instance Method Details
#duration ⇒ Object
The duration for which the calls were joined. Does not include time spent in confirmation controllers or after being separated.
498 499 500 501 502 503 504 |
# File 'lib/adhearsion/call_controller/dial.rb', line 498 def duration if start_time && end_time end_time - start_time else 0.0 end end |
#ended ⇒ Object
523 524 525 |
# File 'lib/adhearsion/call_controller/dial.rb', line 523 def ended @end_time = Time.now end |
#errored! ⇒ Object
506 507 508 |
# File 'lib/adhearsion/call_controller/dial.rb', line 506 def errored! @result = :error end |
#lost_confirmation! ⇒ Object
514 515 516 |
# File 'lib/adhearsion/call_controller/dial.rb', line 514 def lost_confirmation! @result = :lost_confirmation end |
#started ⇒ Object
518 519 520 521 |
# File 'lib/adhearsion/call_controller/dial.rb', line 518 def started @start_time = Time.now @result = :joined end |
#unconfirmed! ⇒ Object
510 511 512 |
# File 'lib/adhearsion/call_controller/dial.rb', line 510 def unconfirmed! @result = :unconfirmed end |