lib/punchblock/translator/asterisk/component/asterisk/agi_command.rb in punchblock-1.9.4 vs lib/punchblock/translator/asterisk/component/asterisk/agi_command.rb in punchblock-2.0.0.beta1

- old
+ new

@@ -5,17 +5,20 @@ class Asterisk module Component module Asterisk class AGICommand < Component def setup - @agi = Punchblock::Translator::Asterisk::AGICommand.new id, @call.channel, @component_node.name, *@component_node.params_array + @agi = Punchblock::Translator::Asterisk::AGICommand.new id, @call.channel, @component_node.name, *@component_node.params end def execute @agi.execute ami_client send_ref rescue RubyAMI::Error set_node_response false + terminate + rescue ChannelGoneError + set_node_response ProtocolError.new.setup(:item_not_found, "Could not find a call with ID #{call_id}", call_id) terminate end exclusive :execute def handle_ami_event(event)