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(time) ⇒ Object
- #errored! ⇒ Object
-
#initialize ⇒ JoinStatus
constructor
A new instance of JoinStatus.
- #lost_confirmation! ⇒ Object
- #started(time) ⇒ Object
- #unconfirmed! ⇒ Object
Constructor Details
#initialize ⇒ JoinStatus
Returns a new instance of JoinStatus.
464 465 466 |
# File 'lib/adhearsion/call_controller/dial.rb', line 464 def initialize @result = :no_answer end |
Instance Attribute Details
#end_time ⇒ Object
Time at which the join was broken
462 463 464 |
# File 'lib/adhearsion/call_controller/dial.rb', line 462 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
475 476 477 |
# File 'lib/adhearsion/call_controller/dial.rb', line 475 def result @result end |
#start_time ⇒ Object
The time at which the calls were joined
459 460 461 |
# File 'lib/adhearsion/call_controller/dial.rb', line 459 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.
478 479 480 481 482 483 484 |
# File 'lib/adhearsion/call_controller/dial.rb', line 478 def duration if start_time && end_time end_time.to_i - start_time.to_i else 0.0 end end |
#ended(time) ⇒ Object
503 504 505 |
# File 'lib/adhearsion/call_controller/dial.rb', line 503 def ended(time) @end_time = time end |
#errored! ⇒ Object
486 487 488 |
# File 'lib/adhearsion/call_controller/dial.rb', line 486 def errored! @result = :error end |
#lost_confirmation! ⇒ Object
494 495 496 |
# File 'lib/adhearsion/call_controller/dial.rb', line 494 def lost_confirmation! @result = :lost_confirmation end |
#started(time) ⇒ Object
498 499 500 501 |
# File 'lib/adhearsion/call_controller/dial.rb', line 498 def started(time) @start_time = time @result = :joined end |
#unconfirmed! ⇒ Object
490 491 492 |
# File 'lib/adhearsion/call_controller/dial.rb', line 490 def unconfirmed! @result = :unconfirmed end |