lib/adhearsion-asr/prompt_builder.rb in adhearsion-asr-1.1.1 vs lib/adhearsion-asr/prompt_builder.rb in adhearsion-asr-1.2.0
- old
+ new
@@ -2,11 +2,11 @@
module AdhearsionASR
class PromptBuilder
def initialize(output_document, grammars, options)
input_options = {
- mode: :dtmf,
+ mode: options[:mode] || :dtmf,
initial_timeout: (options[:timeout] || Plugin.config.timeout) * 1000,
inter_digit_timeout: (options[:timeout] || Plugin.config.timeout) * 1000,
max_silence: (options[:timeout] || Plugin.config.timeout) * 1000,
min_confidence: Plugin.config.min_confidence,
grammars: grammars,
@@ -30,9 +30,11 @@
def execute(controller)
controller.execute_component_and_await_completion @prompt
result @prompt.complete_event.reason
+ rescue Adhearsion::Call::ExpiredError
+ raise Adhearsion::Call::Hangup
end
private
def result(reason)