Module: Punchblock::Translator::Asterisk::Component::MRCPRecogPrompt

Included in:
MRCPNativePrompt, MRCPPrompt
Defined in:
lib/punchblock/translator/asterisk/component/mrcp_recog_prompt.rb

Constant Summary collapse

UniMRCPError =
Class.new Punchblock::Error

Instance Method Summary collapse

Instance Method Details

#executeObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/punchblock/translator/asterisk/component/mrcp_recog_prompt.rb', line 12

def execute
  setup_defaults
  validate
  send_ref
  execute_unimrcp_app
  complete
rescue ChannelGoneError
  call_ended
rescue UniMRCPError
  complete_with_error 'Terminated due to UniMRCP error'
rescue RubyAMI::Error => e
  complete_with_error "Terminated due to AMI error '#{e.message}'"
rescue OptionError => e
  with_error 'option error', e.message
end