From 55434b63da8d765da5b5e74fc8eb439a56894cb8 Mon Sep 17 00:00:00 2001 From: Chris Roos Date: Fri, 26 Aug 2011 16:10:26 +0100 Subject: [PATCH] Piston updated connfu. --- vendor/gems/connfu/.piston.yml | 2 +- .../connfu/examples/transfer_using_join.rb | 13 ----- .../connfu/lib/connfu/dsl/call_commands.rb | 13 ----- vendor/gems/connfu/spec/connfu/dsl_spec.rb | 15 ------ .../connfu/spec/functional/answer_spec.rb | 2 +- .../spec/functional/ask_for_digits_spec.rb | 5 +- .../gems/connfu/spec/functional/dial_spec.rb | 3 +- .../connfu/spec/functional/hangup_spec.rb | 12 ++--- .../gems/connfu/spec/functional/offer_spec.rb | 18 ++++--- .../spec/functional/record_call_spec.rb | 14 +++++- .../gems/connfu/spec/functional/say_spec.rb | 8 +++- .../connfu/spec/functional/transfer_spec.rb | 40 ++++++++-------- .../functional/transfer_using_join_spec.rb | 47 ------------------- .../connfu/spec/functional/two_offers_spec.rb | 8 ++-- vendor/gems/connfu/spec/spec_helper.rb | 16 ++++--- 15 files changed, 76 insertions(+), 140 deletions(-) delete mode 100644 vendor/gems/connfu/examples/transfer_using_join.rb delete mode 100644 vendor/gems/connfu/spec/functional/transfer_using_join_spec.rb diff --git a/vendor/gems/connfu/.piston.yml b/vendor/gems/connfu/.piston.yml index c01263c..6434b49 100644 --- a/vendor/gems/connfu/.piston.yml +++ b/vendor/gems/connfu/.piston.yml @@ -4,5 +4,5 @@ lock: false repository_class: Piston::Git::Repository format: 1 handler: - commit: 05a15b2d7445b0c95fccbae0b72271a71ba87c2d + commit: 28fc3cd9a15dd305fcbce240fbd6187d985e4166 branch: master diff --git a/vendor/gems/connfu/examples/transfer_using_join.rb b/vendor/gems/connfu/examples/transfer_using_join.rb deleted file mode 100644 index a719a4f..0000000 --- a/vendor/gems/connfu/examples/transfer_using_join.rb +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env ruby -require File.expand_path('../environment', __FILE__) - -require_two_recipients! - -Connfu.start do - on :offer do |call| - answer - say("transferring") - transfer_using_join "sip:#{RECIPIENTS.first}", "sip:#{RECIPIENTS.last}" - puts "Joined call has ended" - end -end diff --git a/vendor/gems/connfu/lib/connfu/dsl/call_commands.rb b/vendor/gems/connfu/lib/connfu/dsl/call_commands.rb index 466d278..1a6c52a 100644 --- a/vendor/gems/connfu/lib/connfu/dsl/call_commands.rb +++ b/vendor/gems/connfu/lib/connfu/dsl/call_commands.rb @@ -74,19 +74,6 @@ def dial_join(dial_options) joined_call_id end - - def transfer_using_join(dial_from, dial_to) - command_options = { - :call_jid => call_jid, - :client_jid => client_jid, - :dial_to => dial_to, - :dial_from => dial_from, - :call_id => call_id - } - send_command Connfu::Commands::NestedJoin.new(command_options) - wait_for Connfu::Event::Hangup - finish! - end end end end \ No newline at end of file diff --git a/vendor/gems/connfu/spec/connfu/dsl_spec.rb b/vendor/gems/connfu/spec/connfu/dsl_spec.rb index 0573217..16a0293 100644 --- a/vendor/gems/connfu/spec/connfu/dsl_spec.rb +++ b/vendor/gems/connfu/spec/connfu/dsl_spec.rb @@ -203,21 +203,6 @@ class DslTest end end - describe "transfer using join" do - it 'should send NestedJoin command to connection' do - dial_to = 'sip:dial-to@example.com' - dial_from = 'sip:dial-from@example.com' - Connfu.connection.should_receive(:send_command).with(Connfu::Commands::NestedJoin.new( - :dial_to => dial_to, - :dial_from => dial_from, - :client_jid => 'client-jid', - :call_jid => 'call-jid', - :call_id => 'call-id' - )) - subject.transfer_using_join(dial_from, dial_to) - end - end - describe 'recording' do it 'should send a start command to connection' do subject.stub(:wait_for).and_return(Connfu::Event::Result.new) diff --git a/vendor/gems/connfu/spec/functional/answer_spec.rb b/vendor/gems/connfu/spec/functional/answer_spec.rb index a1c76e6..709b2fe 100644 --- a/vendor/gems/connfu/spec/functional/answer_spec.rb +++ b/vendor/gems/connfu/spec/functional/answer_spec.rb @@ -24,6 +24,6 @@ dsl_instance.should_receive(:do_something) incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid end end \ No newline at end of file diff --git a/vendor/gems/connfu/spec/functional/ask_for_digits_spec.rb b/vendor/gems/connfu/spec/functional/ask_for_digits_spec.rb index 4cb0d5d..86b259a 100644 --- a/vendor/gems/connfu/spec/functional/ask_for_digits_spec.rb +++ b/vendor/gems/connfu/spec/functional/ask_for_digits_spec.rb @@ -4,6 +4,7 @@ testing_dsl do on :offer do |call| + answer result = ask(:prompt => "please enter a 4 digit pin", :digits => 4) say("you entered #{result}") end @@ -16,6 +17,7 @@ it "should send an ask command" do incoming :offer_presence, @call_jid, @client_jid + incoming :answer_result_iq, @call_jid last_command.should == Connfu::Commands::Ask.new( :call_jid => @call_jid, @@ -27,7 +29,8 @@ it "should continue when ask was successful" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid + incoming :ask_result_iq, @call_jid incoming :ask_success_presence, @call_jid, "1234" last_command.should == Connfu::Commands::Say.new( diff --git a/vendor/gems/connfu/spec/functional/dial_spec.rb b/vendor/gems/connfu/spec/functional/dial_spec.rb index 39ecec0..cfcc8a4 100644 --- a/vendor/gems/connfu/spec/functional/dial_spec.rb +++ b/vendor/gems/connfu/spec/functional/dial_spec.rb @@ -232,7 +232,6 @@ class << self; attr_accessor :stash; end incoming :dial_result_iq, @call_id, last_command.id incoming :ringing_presence, @call_jid incoming :answered_presence, @call_jid - incoming :result_iq, @call_jid last_command.should be_instance_of Connfu::Commands::Say last_command.text.should == "hello" @@ -242,7 +241,7 @@ class << self; attr_accessor :stash; end incoming :dial_result_iq, @call_id, last_command.id incoming :ringing_presence, @call_jid incoming :answered_presence, @call_jid - incoming :result_iq, @call_jid + incoming :say_result_iq, @call_jid incoming :say_success_presence, @call_jid last_command.should be_instance_of Connfu::Commands::Say diff --git a/vendor/gems/connfu/spec/functional/hangup_spec.rb b/vendor/gems/connfu/spec/functional/hangup_spec.rb index b3e5f0f..0465321 100644 --- a/vendor/gems/connfu/spec/functional/hangup_spec.rb +++ b/vendor/gems/connfu/spec/functional/hangup_spec.rb @@ -41,8 +41,8 @@ it "should not send any commands after the hangup" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid # from the answer command - incoming :result_iq, @call_jid # from the hangup command + incoming :answer_result_iq, @call_jid + incoming :hangup_result_iq, @call_jid incoming :hangup_presence, @call_jid last_command.should == Connfu::Commands::Hangup.new(:call_jid => @call_jid, :client_jid => @client_jid) @@ -70,11 +70,11 @@ it "should still send commands once the other call is hung up" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid # from the answer command + incoming :answer_result_iq, @call_jid incoming :dial_result_iq, @other_call_id, last_command.id # from the dial command incoming :ringing_presence, @other_call_jid incoming :answered_presence, @other_call_jid - incoming :result_iq, @other_call_jid # from the hangup command + incoming :hangup_result_iq, @other_call_jid incoming :hangup_presence, @other_call_jid last_command.should == Connfu::Commands::Say.new(:text => "Phew, glad he's gone", :call_jid => @call_jid, :client_jid => @client_jid) @@ -96,8 +96,8 @@ it "should not send an implicit hangup command" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid # from the answer command - incoming :result_iq, @call_jid # from the say command + incoming :answer_result_iq, @call_jid + incoming :say_result_iq, @call_jid # from the say command incoming :hangup_presence, @call_jid # via the user hanging up incoming :say_success_presence, @call_jid diff --git a/vendor/gems/connfu/spec/functional/offer_spec.rb b/vendor/gems/connfu/spec/functional/offer_spec.rb index e3fae52..c8d2d0b 100644 --- a/vendor/gems/connfu/spec/functional/offer_spec.rb +++ b/vendor/gems/connfu/spec/functional/offer_spec.rb @@ -9,6 +9,11 @@ ) end end + + before :each do + @call_jid = "call-id@server.whatever" + @client_jid = "usera@127.0.0.whatever/voxeo" + end it "exposes who the call is from" do dsl_instance.should_receive(:do_something_with).with( @@ -70,13 +75,14 @@ @client_jid = "usera@127.0.0.whatever/voxeo" end - it "should not issue another hangup after it has been called in the DSL" do - handler_instance = Connfu.event_processor.handler_class.new({}) - Connfu.event_processor.stub(:build_handler).and_return(handler_instance) + it "should not issue the automatic hangup after it's been explicitly called in the DSL" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid # from the answer command - handler_instance.should_receive(:hangup).never - incoming :result_iq, @call_jid # from the hangup within DSL + incoming :answer_result_iq, @call_jid + incoming :hangup_result_iq, @call_jid incoming :hangup_presence, @call_jid + + Connfu.connection.commands.length.should == 2 + hangup_commands = Connfu.connection.commands.select { |command| command.is_a?(Connfu::Commands::Hangup) } + hangup_commands.length.should == 1 end end diff --git a/vendor/gems/connfu/spec/functional/record_call_spec.rb b/vendor/gems/connfu/spec/functional/record_call_spec.rb index b459a89..93b5799 100644 --- a/vendor/gems/connfu/spec/functional/record_call_spec.rb +++ b/vendor/gems/connfu/spec/functional/record_call_spec.rb @@ -14,6 +14,7 @@ testing_dsl do on :offer do |call| + answer start_recording stop_recording do_something(recordings) @@ -23,12 +24,14 @@ it "should send first record start command" do incoming :offer_presence, @call_jid, @client_jid + incoming :answer_result_iq, @call_jid last_command.should == Connfu::Commands::Recording::Start.new(:call_jid => @call_jid, :client_jid => @client_jid) end it "should send the stop recording command with the recording ID when start recording has been sent" do incoming :offer_presence, @call_jid, @client_jid + incoming :answer_result_iq, @call_jid incoming :recording_result_iq, @call_jid, @recording_component_id last_command.should == Connfu::Commands::Recording::Stop.new(:call_jid => @call_jid, :client_jid => @client_jid, :component_id => @recording_component_id) @@ -38,8 +41,9 @@ dsl_instance.should_receive(:do_something).with([@recording_path]) incoming :offer_presence, @call_jid, @client_jid + incoming :answer_result_iq, @call_jid incoming :recording_result_iq, @call_jid, @recording_component_id - incoming :result_iq, @call_jid + incoming :recording_stop_result_iq, @call_jid, @recording_component_id incoming :recording_stop_presence, @component_jid, @recording_path end @@ -47,8 +51,9 @@ dsl_instance.stub(:do_something) incoming :offer_presence, @call_jid, @client_jid + incoming :answer_result_iq, @call_jid incoming :recording_result_iq, @call_jid, @recording_component_id - incoming :result_iq, @call_jid + incoming :recording_stop_result_iq, @call_jid, @recording_component_id incoming :recording_stop_presence, @component_jid, @recording_path last_command.should == Connfu::Commands::Hangup.new(:call_jid => @call_jid, :client_jid => @client_jid) @@ -58,6 +63,7 @@ describe "when the caller hangs up during recording" do testing_dsl do on :offer do |call| + answer record_for 5 say "very interesting" end @@ -65,6 +71,7 @@ it "should not send any commands after the hangup is detected" do incoming :offer_presence, @call_jid, @client_jid + incoming :answer_result_iq, @call_jid incoming :recording_result_iq, @call_jid, @recording_component_id incoming :recording_hangup_presence, @component_jid @@ -76,6 +83,7 @@ testing_dsl do on :offer do |call| + answer record_for 5 do_something(recordings) end @@ -86,6 +94,7 @@ dsl_instance.should_receive(:do_something).with([@recording_path]) incoming :offer_presence, @call_jid, @client_jid + incoming :answer_result_iq, @call_jid incoming :recording_result_iq, @call_jid, @recording_component_id incoming :recording_stop_presence, @component_jid, @recording_path end @@ -96,6 +105,7 @@ dsl_instance.should_receive(:do_something).with([@recording_path]) incoming :offer_presence, @call_jid, @client_jid + incoming :answer_result_iq, @call_jid incoming :recording_result_iq, @call_jid, @recording_component_id incoming :recording_hangup_presence, @component_jid, @recording_path end diff --git a/vendor/gems/connfu/spec/functional/say_spec.rb b/vendor/gems/connfu/spec/functional/say_spec.rb index 8c0d019..8348235 100644 --- a/vendor/gems/connfu/spec/functional/say_spec.rb +++ b/vendor/gems/connfu/spec/functional/say_spec.rb @@ -4,6 +4,7 @@ testing_dsl do on :offer do |call| + answer say('hello, this is connfu') say('http://www.phono.com/audio/troporocks.mp3') end @@ -17,12 +18,14 @@ it "should send first say command" do incoming :offer_presence, @call_jid, @client_jid + incoming :answer_result_iq, @call_jid last_command.should == Connfu::Commands::Say.new(:text => 'hello, this is connfu', :call_jid => @call_jid, :client_jid => @client_jid) end it "should not send the second say command if the first command's success hasn't been received" do incoming :offer_presence, @call_jid, @client_jid + incoming :answer_result_iq, @call_jid incoming :say_result_iq, @call_jid last_command.should == Connfu::Commands::Say.new(:text => 'hello, this is connfu', :call_jid => @call_jid, :client_jid => @client_jid) @@ -30,6 +33,7 @@ it "should send the second say command once the first say command has completed" do incoming :offer_presence, @call_jid, @client_jid + incoming :answer_result_iq, @call_jid incoming :say_result_iq, @call_jid incoming :say_success_presence, @call_jid @@ -52,7 +56,7 @@ it 'should send the stop command to an active say component' do incoming :offer_presence, call_jid - incoming :result_iq, call_jid, last_command.id + incoming :answer_result_iq, call_jid, last_command.id incoming :say_result_iq, call_jid incoming :dial_result_iq, "dummy-call-so-we-can-wait-id", last_command.id @@ -61,7 +65,7 @@ it 'should not send the stop command if the say component has already finished' do incoming :offer_presence, call_jid - incoming :result_iq, call_jid, last_command.id + incoming :answer_result_iq, call_jid, last_command.id incoming :say_result_iq, call_jid, 'component-id' incoming :say_success_presence, "#{call_jid}/component-id" incoming :dial_result_iq, "dummy-call-so-we-can-wait-id", last_command.id diff --git a/vendor/gems/connfu/spec/functional/transfer_spec.rb b/vendor/gems/connfu/spec/functional/transfer_spec.rb index 98ebfef..ff4fa29 100644 --- a/vendor/gems/connfu/spec/functional/transfer_spec.rb +++ b/vendor/gems/connfu/spec/functional/transfer_spec.rb @@ -18,15 +18,15 @@ it "should send a transfer command" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid last_command.should == Connfu::Commands::Transfer.new(:transfer_to => ['sip:userb@127.0.0.1'], :call_jid => @call_jid, :client_jid => @client_jid) end it "should indicate that the call has been transferred successfully" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid + incoming :transfer_result_iq, @call_jid incoming :transfer_success_presence, @call_jid last_command.should == Connfu::Commands::Say.new(:text => 'transfer was successful', :call_jid => @call_jid, :client_jid => @client_jid) @@ -34,8 +34,8 @@ it "should indicate that the call transfer has been timed out" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid + incoming :transfer_result_iq, @call_jid incoming :transfer_timeout_presence, @call_jid last_command.should == Connfu::Commands::Say.new(:text => 'sorry nobody is available at the moment', :call_jid => @call_jid, :client_jid => @client_jid) @@ -60,15 +60,15 @@ it "should send a transfer command for the first sip address" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid last_command.should == Connfu::Commands::Transfer.new(:transfer_to => ['sip:userb@127.0.0.1'], :call_jid => @call_jid, :client_jid => @client_jid) end it "should continue to execute the next command if transfer to first sip address is successful" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid + incoming :transfer_result_iq, @call_jid incoming :transfer_success_presence, @call_jid last_command.should == Connfu::Commands::Say.new(:text => 'transfer was successful', :call_jid => @call_jid, :client_jid => @client_jid) @@ -76,8 +76,8 @@ it "should send a transfer command for the second sip address if the first one times out" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid + incoming :transfer_result_iq, @call_jid incoming :transfer_timeout_presence, @call_jid last_command.should == Connfu::Commands::Transfer.new(:transfer_to => ['sip:userc@127.0.0.1'], :call_jid => @call_jid, :client_jid => @client_jid) @@ -85,10 +85,10 @@ it "should indicate second transfer was successful" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid + incoming :transfer_result_iq, @call_jid incoming :transfer_timeout_presence, @call_jid - incoming :result_iq, @call_jid + incoming :transfer_result_iq, @call_jid incoming :transfer_success_presence, @call_jid last_command.should == Connfu::Commands::Say.new(:text => 'transfer was successful', :call_jid => @call_jid, :client_jid => @client_jid) @@ -96,10 +96,10 @@ it "should indicate both transfers time out" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid + incoming :transfer_result_iq, @call_jid incoming :transfer_timeout_presence, @call_jid - incoming :result_iq, @call_jid + incoming :transfer_result_iq, @call_jid incoming :transfer_timeout_presence, @call_jid last_command.should == Connfu::Commands::Say.new(:text => 'sorry nobody is available at the moment', :call_jid => @call_jid, :client_jid => @client_jid) @@ -126,8 +126,8 @@ it "should indicate that the transfer was rejected by the end-point" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid + incoming :transfer_result_iq, @call_jid incoming :transfer_rejected_presence, @call_jid last_command.should == Connfu::Commands::Say.new(:text => 'transfer was rejected', :call_jid => @call_jid, :client_jid => @client_jid) @@ -153,8 +153,8 @@ it "should indicate that the transfer was rejected because far-end is busy" do incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid - incoming :result_iq, @call_jid + incoming :answer_result_iq, @call_jid + incoming :transfer_result_iq, @call_jid incoming :transfer_busy_presence, @call_jid last_command.should == Connfu::Commands::Say.new(:text => 'transfer was rejected because far-end is busy', :call_jid => @call_jid, :client_jid => @client_jid) diff --git a/vendor/gems/connfu/spec/functional/transfer_using_join_spec.rb b/vendor/gems/connfu/spec/functional/transfer_using_join_spec.rb deleted file mode 100644 index d0abc11..0000000 --- a/vendor/gems/connfu/spec/functional/transfer_using_join_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -require "spec_helper" - -describe "transfer using join" do - - testing_dsl do - on :offer do |call| - transfer_using_join("dial-from", "dial-to") - end - end - - before do - @call_id = "call-id" - @call_jid = "#{@call_id}@server.whatever" - @client_jid = "usera@127.0.0.whatever/voxeo" - end - - it "should send a nested join when on incoming offer" do - incoming :offer_presence, @call_jid, @client_jid - - last_command.should == Connfu::Commands::NestedJoin.new( - :dial_to => 'dial-to', - :dial_from => 'dial-from', - :call_jid => @call_jid, - :client_jid => @client_jid, - :call_id => @call_id - ) - end - - it "should wait until a hangup is received" do - incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid - incoming :joined_presence, @call_jid, "a-new-call-id" - incoming :joined_presence, "a-new-call-id@#{PRISM_HOST}", @call_id - - Connfu.should_not be_finished - end - - it "should continue execution when hangup is received, but mark call as finished" do - incoming :offer_presence, @call_jid, @client_jid - incoming :result_iq, @call_jid - incoming :joined_presence, @call_jid, "a-new-call-id" - incoming :joined_presence, "a-new-call-id@#{PRISM_HOST}", @call_id - incoming :hangup_presence, @call_jid - - Connfu.should be_finished - end -end \ No newline at end of file diff --git a/vendor/gems/connfu/spec/functional/two_offers_spec.rb b/vendor/gems/connfu/spec/functional/two_offers_spec.rb index 99e224b..85d62f0 100644 --- a/vendor/gems/connfu/spec/functional/two_offers_spec.rb +++ b/vendor/gems/connfu/spec/functional/two_offers_spec.rb @@ -19,12 +19,12 @@ it "should handle each call independently" do incoming :offer_presence, @first_call_jid, @foo_address - incoming :result_iq, @first_call_jid - incoming :result_iq, @first_call_jid + incoming :say_result_iq, @first_call_jid + incoming :say_result_iq, @first_call_jid incoming :offer_presence, @second_call_jid, @bar_address - incoming :result_iq, @second_call_jid - incoming :result_iq, @second_call_jid + incoming :say_result_iq, @second_call_jid + incoming :say_result_iq, @second_call_jid incoming :say_success_presence, @second_call_jid Connfu.connection.commands = [] diff --git a/vendor/gems/connfu/spec/spec_helper.rb b/vendor/gems/connfu/spec/spec_helper.rb index 5f0b3c1..f18db56 100644 --- a/vendor/gems/connfu/spec/spec_helper.rb +++ b/vendor/gems/connfu/spec/spec_helper.rb @@ -48,6 +48,7 @@ def setup_connfu(handler_class, domain='openvoice.org') end def incoming(type, *args) + raise "Invalid args. You almost certainly don't want to be passing 'nil' into #incoming" if args.any? { |arg| arg.nil? } stanza = if type.to_s =~ /_iq$/ create_iq(send(type, *args)) else @@ -116,6 +117,9 @@ def last_command def result_iq(call_jid="call-id@#{PRISM_HOST}", id='blather0008') "" end +alias :answer_result_iq :result_iq +alias :hangup_result_iq :result_iq +alias :recording_stop_result_iq :result_iq def error_iq(call_jid="call-id@#{PRISM_HOST}", id='blather000c') %{ @@ -152,11 +156,15 @@ def offer_presence(call_jid="call-id@#{PRISM_HOST}", client_jid="#{PRISM_JID}/vo " end -def say_result_iq(call_jid="call-id@#{PRISM_HOST}", component_id="component-id") +def component_result_iq(call_jid="call-id@#{PRISM_HOST}", component_id="component-id") %{ } end +alias :say_result_iq :component_result_iq +alias :ask_result_iq :component_result_iq +alias :recording_result_iq :component_result_iq +alias :transfer_result_iq :component_result_iq def say_success_presence(call_jid="call-id@#{PRISM_HOST}/component-id") " @@ -221,12 +229,6 @@ def unjoined_presence(call_jid="call-id-1@#{PRISM_HOST}", other_call_id='call-id } end -def recording_result_iq(call_jid="call-id@#{PRISM_HOST}", component_id="component-id") - %{ - - } -end - def recording_stop_presence(call_jid="call-id@#{PRISM_HOST}/component-id", path="file:///tmp/recording.mp3") %{