Skip to content

Commit

Permalink
[CS] Remove check for UniMRCP SYNTHSTATUS
Browse files Browse the repository at this point in the history
It was causing false failure. See adhearsion/adhearsion#211
  • Loading branch information
benlangfeld committed May 3, 2013
1 parent b51188f commit 48ab4dc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Expand Up @@ -2,7 +2,6 @@
* Feature: Use RubyAMI 2.0 with a single AMI connection.
* Feature: Cache channel variables on Asterisk calls.
* Feature: Allow optional sending of end event when breaking from AsyncAGI on Asterisk. This enables dialplan handback. Only triggers if the channel variable 'PUNCHBLOCK_END_ON_ASYNCAGI_BREAK' is set.
* Bugfix: Detect MRCPSynth failure in output component.
* Bugfix: Avoid DTMF recognizer failures and race conditions by bringing DTMFRecognizer back into the Input component actor.
* Bugfix: Catch Asterisk AMI errors in all cases and fail accordingly, instead of ploughing ahead in the face of adversity.
* Bugfix: Improve performance of Asterisk implementation by no longer spinning up a component actor for AGI command execution.
Expand Down
4 changes: 0 additions & 4 deletions lib/punchblock/translator/asterisk/component/output.rb
Expand Up @@ -10,7 +10,6 @@ class Output < Component
include StopByRedirect

UnrenderableDocError = Class.new OptionError
UniMRCPError = Class.new Punchblock::Error

def setup
@media_engine = @call.translator.media_engine
Expand Down Expand Up @@ -56,16 +55,13 @@ def execute
when :unimrcp
send_ref
@call.execute_agi_command 'EXEC MRCPSynth', escape_commas(escaped_doc), mrcpsynth_options
raise UniMRCPError if @call.channel_var('SYNTHSTATUS') == 'ERROR'
when :swift
send_ref
@call.execute_agi_command 'EXEC Swift', swift_doc
else
raise OptionError, "The renderer #{rendering_engine} is unsupported."
end
send_success
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 UnrenderableDocError => e
Expand Down
16 changes: 0 additions & 16 deletions spec/punchblock/translator/asterisk/component/output_spec.rb
Expand Up @@ -167,10 +167,6 @@ def ssml_with_options(prefix = '', postfix = '')
{ :ssml => ssml_doc }.merge(command_opts)
end


let(:synthstatus) { 'OK' }
before { mock_call.stub(:channel_var).with('SYNTHSTATUS').and_return synthstatus }

def expect_mrcpsynth_with_options(options)
mock_call.should_receive(:execute_agi_command).once.with do |*args|
args[0].should be == 'EXEC MRCPSynth'
Expand Down Expand Up @@ -216,18 +212,6 @@ def expect_mrcpsynth_with_options(options)
end
end

context "when the SYNTHSTATUS variable is set to 'ERROR'" do
let(:synthstatus) { 'ERROR' }

it "should send an error complete event" do
mock_call.should_receive(:execute_agi_command).and_return code: 200, result: 1
subject.execute
complete_reason = original_command.complete_event(0.1).reason
complete_reason.should be_a Punchblock::Event::Complete::Error
complete_reason.details.should == "Terminated due to UniMRCP error"
end
end

describe 'ssml' do
context 'unset' do
let(:command_opts) { { :ssml => nil } }
Expand Down

0 comments on commit 48ab4dc

Please sign in to comment.