This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
forked from adhearsion/adhearsion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
84 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ module Dial | |
# i.e. timeout after :for if no one answers the call | ||
# | ||
# @option options [CallController] :confirm the controller to execute on answered outbound calls to give an opportunity to screen the call. The calls will be joined if the outbound call is still active after this controller completes. | ||
# @option options [Hash] :confirm_metadata Metadata to set on the confirmation controller before executing it. | ||
# @option options [Hash] :confirm_metadata Metadata to set on the confirmation controller before executing it. This is shared between all calls if dialing multiple endpoints; if you care about it being mutated, you should provide an immutable value (using eg https://github.com/harukizaemon/hamster). | ||
# | ||
# @example Make a call to the PSTN using my SIP provider for VoIP termination | ||
# dial "SIP/[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# encoding: utf-8 | ||
|
||
module Adhearsion | ||
VERSION = '2.3.3' | ||
VERSION = '2.3.4' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ def reset_default_config | |
config.password = "1" | ||
config.host = nil | ||
config.port = nil | ||
config.certs_directory = nil | ||
config.root_domain = nil | ||
config.calls_domain = nil | ||
config.mixers_domain = nil | ||
|
@@ -33,6 +34,7 @@ def initialize_punchblock(options = {}) | |
config.password = options[:password] if options.has_key?(:password) | ||
config.host = options[:host] if options.has_key?(:host) | ||
config.port = options[:port] if options.has_key?(:port) | ||
config.certs_directory = options[:certs_directory] if options.has_key?(:certs_directory) | ||
config.root_domain = options[:root_domain] if options.has_key?(:root_domain) | ||
config.calls_domain = options[:calls_domain] if options.has_key?(:calls_domain) | ||
config.mixers_domain = options[:mixers_domain] if options.has_key?(:mixers_domain) | ||
|
@@ -80,6 +82,10 @@ def initialize_punchblock(options = {}) | |
subject.port.should be_nil | ||
end | ||
|
||
it "should set properly the certs_directory value" do | ||
subject.certs_directory.should be_nil | ||
end | ||
|
||
it "should set properly the root_domain value" do | ||
subject.root_domain.should be_nil | ||
end | ||
|
@@ -117,10 +123,8 @@ def initialize_punchblock(options = {}) | |
end | ||
|
||
it "starts the client with any overridden settings" do | ||
overrides = {:username => '[email protected]/foo', :password => '123', :host => 'foo.bar.com', :port => 200, :connection_timeout => 20, :root_domain => 'foo.com', :calls_domain => 'call.foo.com', :mixers_domain => 'mixer.foo.com', :media_engine => :swift, :default_voice => :hal} | ||
|
||
Punchblock::Connection::XMPP.should_receive(:new).once.with(overrides).and_return mock_client | ||
initialize_punchblock overrides | ||
Punchblock::Connection::XMPP.should_receive(:new).once.with(username: '[email protected]/foo', password: '123', host: 'foo.bar.com', port: 200, certs: '/foo/bar', connection_timeout: 20, root_domain: 'foo.com', calls_domain: 'call.foo.com', mixers_domain: 'mixer.foo.com', media_engine: :swift, default_voice: :hal).and_return mock_client | ||
initialize_punchblock username: '[email protected]/foo', password: '123', host: 'foo.bar.com', port: 200, certs_directory: '/foo/bar', connection_timeout: 20, root_domain: 'foo.com', calls_domain: 'call.foo.com', mixers_domain: 'mixer.foo.com', media_engine: :swift, default_voice: :hal | ||
end | ||
|
||
describe "#connect" do | ||
|
@@ -180,7 +184,7 @@ def initialize_punchblock(options = {}) | |
end | ||
|
||
describe 'using Asterisk' do | ||
let(:overrides) { {:username => 'test', :password => '123', :host => 'foo.bar.com', :port => 200, :connection_timeout => 20, :root_domain => 'foo.com', :calls_domain => 'call.foo.com', :mixers_domain => 'mixer.foo.com', :media_engine => :swift, :default_voice => :hal} } | ||
let(:overrides) { {:username => 'test', :password => '123', :host => 'foo.bar.com', :port => 200, :certs => nil, :connection_timeout => 20, :root_domain => 'foo.com', :calls_domain => 'call.foo.com', :mixers_domain => 'mixer.foo.com', :media_engine => :swift, :default_voice => :hal} } | ||
|
||
it 'should start an Asterisk PB connection' do | ||
Punchblock::Connection::Asterisk.should_receive(:new).once.with(overrides).and_return mock_client | ||
|
@@ -189,7 +193,7 @@ def initialize_punchblock(options = {}) | |
end | ||
|
||
describe 'using FreeSWITCH' do | ||
let(:overrides) { {:username => 'test', :password => '123', :host => 'foo.bar.com', :port => 200, :connection_timeout => 20, :root_domain => 'foo.com', :calls_domain => 'call.foo.com', :mixers_domain => 'mixer.foo.com', :media_engine => :swift, :default_voice => :hal} } | ||
let(:overrides) { {:username => 'test', :password => '123', :host => 'foo.bar.com', :port => 200, :certs => nil, :connection_timeout => 20, :root_domain => 'foo.com', :calls_domain => 'call.foo.com', :mixers_domain => 'mixer.foo.com', :media_engine => :swift, :default_voice => :hal} } | ||
|
||
it 'should start a FreeSWITCH PB connection' do | ||
Punchblock::Connection::Freeswitch.should_receive(:new).once.with(overrides).and_return mock_client | ||
|