lib/adhearsion/outbound_call.rb in adhearsion-2.3.5 vs lib/adhearsion/outbound_call.rb in adhearsion-2.4.0.beta1
- old
+ new
@@ -34,10 +34,14 @@
def id
dial_command.target_call_id if dial_command
end
+ def domain
+ dial_command.domain if dial_command
+ end
+
def client
PunchblockPlugin::Initializer.client
end
def accept(*args)
@@ -74,10 +78,16 @@
Adhearsion.active_calls << current_actor
Adhearsion::Events.trigger_immediately :call_dialed, current_actor
end
end
+ # @private
+ def register_initial_handlers
+ super
+ on_answer { |event| @start_time = Time.now }
+ end
+
def run_router
catching_standard_errors do
Adhearsion.router.handle current_actor
end
end
@@ -102,8 +112,14 @@
route.controller_metadata = metadata
on_answer { route.dispatch current_actor }
else
run_router_on_answer
end
+ end
+
+ private
+
+ def transport
+ dial_command.transport if dial_command
end
end
end