lib/adhearsion/outbound_call.rb in adhearsion-2.6.4 vs lib/adhearsion/outbound_call.rb in adhearsion-3.0.0.beta1

- old
+ new

@@ -47,11 +47,11 @@ @domain end end def client - PunchblockPlugin::Initializer.client + Adhearsion::Rayo::Initializer.client end def accept(*args) end @@ -82,13 +82,13 @@ end uri = client.new_call_uri options[:uri] = uri - @dial_command = Punchblock::Command::Dial.new(options) + @dial_command = Adhearsion::Rayo::Command::Dial.new(options) - ref = Punchblock::Ref.new uri: uri + ref = Adhearsion::Rayo::Ref.new uri: uri @transport = ref.scheme @id = ref.call_id @domain = ref.domain Adhearsion.active_calls << current_actor @@ -117,16 +117,16 @@ Adhearsion.router.handle current_actor end end def run_router_on_answer - register_event_handler Punchblock::Event::Answered do |event| + register_event_handler Adhearsion::Event::Answered do |event| run_router end end def on_answer(&block) - register_event_handler Punchblock::Event::Answered, &block + register_event_handler Adhearsion::Event::Answered, &block end def execute_controller_or_router_on_answer(controller, metadata = {}, &controller_block) if controller || controller_block route = Router::Route.new 'inbound', controller, &controller_block