lib/punchblock/translator/freeswitch/component/abstract_output.rb in punchblock-1.9.4 vs lib/punchblock/translator/freeswitch/component/abstract_output.rb in punchblock-2.0.0.beta1
- old
+ new
@@ -33,23 +33,24 @@
def do_output
raise 'Not Implemented'
end
def validate
- raise OptionError, 'An SSML document is required.' unless @component_node.ssml
+ raise OptionError, 'An SSML document is required.' unless @component_node.render_documents.first.value
+ raise OptionError, 'Only a single document is supported.' unless @component_node.render_documents.size == 1
[:start_offset, :start_paused, :repeat_interval, :repeat_times, :max_time].each do |opt|
raise OptionError, "A #{opt} value is unsupported." if @component_node.send opt
end
case @component_node.interrupt_on
- when :speech, :dtmf, :any
+ when :voice, :dtmf, :any
raise OptionError, "An interrupt-on value of #{@component_node.interrupt_on} is unsupported."
end
end
- def success_reason
- Punchblock::Component::Output::Complete::Success.new
+ def finish_reason
+ Punchblock::Component::Output::Complete::Finish.new
end
end
end
end
end