lib/adhearsion/call_controller/dial.rb in adhearsion-2.5.2 vs lib/adhearsion/call_controller/dial.rb in adhearsion-2.5.3

- old
+ new

@@ -160,10 +160,14 @@ end new_call.on_answer do |event| pre_confirmation_tasks new_call + new_call.on_joined @call do |joined| + join_status.started joined.timestamp.to_time + end + new_call.on_unjoined @call do |unjoined| join_status.ended unjoined.timestamp.to_time unless @splitting new_call["dial_countdown_#{@id}"] = true @latch.countdown! @@ -180,11 +184,10 @@ if new_call.alive? && new_call.active? && status.result != :answer logger.info "#dial joining call #{new_call.id} to #{@call.id}" pre_join_tasks new_call @call.answer - join_status.started new_call.join @join_target, @join_options unless @join_target == @call @call.join @join_target, @join_options end status.answer! @@ -513,11 +516,11 @@ def lost_confirmation! @result = :lost_confirmation end - def started - @start_time = Time.now + def started(time) + @start_time = time @result = :joined end def ended(time) @end_time = time