[asterisk-commits] jbigelow: testsuite/asterisk/trunk r6389 - in /asterisk/trunk/tests/rest_api/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 12 10:48:27 CST 2015
Author: jbigelow
Date: Thu Feb 12 10:48:17 2015
New Revision: 6389
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6389
Log:
Testsuite: Add external bridging tests for Stasis (two channel) interactions.
This adds external bridging tests for Stasis (two channel) interactions as
defined on the StasisStart/StasisEnd Test Plan (tests 2.5, 2.6, 2.7, and 2.8)
at: https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=30279826
This also renames (move to sub directory) the test
'tests/rest_api/external_interaction/ami_bridge/stasis_app/' to
'tests/rest_api/external_interaction/ami_bridge/stasis_app/non_stasis_app/'
(closes issue ASTERISK-24611)
Review: https://reviewboard.asterisk.org/r/4408/
Added:
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/non_stasis_app/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/non_stasis_app/configs/
- copied from r6377, asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/configs/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/non_stasis_app/test-config.yaml
- copied unchanged from r6377, asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/test-config.yaml
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/tests.yaml (with props)
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/test-config.yaml (with props)
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/test-config.yaml (with props)
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/test-config.yaml (with props)
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/test-config.yaml (with props)
Removed:
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/configs/
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/test-config.yaml
Modified:
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/tests.yaml
asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/tests.yaml
Added: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/tests.yaml?view=auto&rev=6389
==============================================================================
--- asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/tests.yaml (added)
+++ asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/tests.yaml Thu Feb 12 10:48:17 2015
@@ -1,0 +1,4 @@
+tests:
+ - test: 'non_stasis_app'
+ - test: 'two_channel_same_stasis_app'
+ - test: 'two_channel_different_stasis_app'
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/tests.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/tests.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/tests.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf?view=auto&rev=6389
==============================================================================
--- asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf Thu Feb 12 10:48:17 2015
@@ -1,0 +1,6 @@
+[default]
+
+exten => echo,1,Answer()
+ same => n,Echo()
+ same => n,Hangup()
+
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/test-config.yaml?view=auto&rev=6389
==============================================================================
--- asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/test-config.yaml (added)
+++ asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/test-config.yaml Thu Feb 12 10:48:17 2015
@@ -1,0 +1,144 @@
+testinfo:
+ summary: Bridge channels via AMI that are in different stasis apps unbridged.
+ description: |
+ "This test originates a Local channel placing half ('alice') into
+ Stasis(App_A) and the other half ('echo_alice') into Echo(). Another
+ Local channel is originated with half ('bob') placed into Stasis(App_B)
+ while the other half ('echo_bob') is placed into Echo(). The AMI bridge
+ action is then used to pull 'alice' and 'bob' out of the stasis apps
+ and then push them both into a non-stasis bridge. The 'bob' channel
+ half is then hung up.
+
+ This test verifies that the channels can be pulled out of different
+ stasis apps and put into a non-stasis bridge via the AMI Bridge action.
+ It also verifies that the StasisStart & StasisEnd events occur for both
+ 'alice' & 'bob' and ensures that 'alice' does not re-enter Stasis when
+ 'bob' is hung up."
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'ari.AriBaseTestObject'
+ modules:
+ -
+ config-section: pluggable-config
+ typename: 'pluggable_modules.EventActionModule'
+
+test-object-config:
+ apps: App_A,App_B
+
+pluggable-config:
+ # Create channel where the 'alice' half enters Stasis app 'App_A' and the
+ # 'echo_alice' half enters dialplan executing Echo()
+ -
+ ami-start:
+ ari-requests:
+ method: 'post'
+ uri: 'channels/alice'
+ params:
+ endpoint: 'Local/echo at default'
+ app: 'App_A'
+ otherChannelId: 'echo_alice'
+ # Ensure the 'alice' channel half enters Stasis. Then create channel where
+ # the 'bob' half enters Stasis app 'App_B' and the 'echo_bob' half enters
+ # dialplan executing Echo().
+ -
+ ari-events:
+ match:
+ type: StasisStart
+ application: 'App_A'
+ args: []
+ channel:
+ id: 'alice'
+ count: 1
+ ari-requests:
+ method: 'post'
+ uri: 'channels/bob'
+ params:
+ endpoint: 'Local/echo at default'
+ app: 'App_B'
+ otherChannelId: 'echo_bob'
+ # Ensure the 'bob' channel half enters Stasis. Then bridge 'alice' and
+ # 'bob' using AMI.
+ -
+ ari-events:
+ match:
+ type: StasisStart
+ application: 'App_B'
+ args: []
+ channel:
+ id: 'bob'
+ count: 1
+ ami-actions:
+ action:
+ Action: 'Bridge'
+ Channel1: 'alice'
+ Channel2: 'bob'
+ # Ensure 'alice' leaves Stasis
+ -
+ ari-events:
+ match:
+ type: StasisEnd
+ application: 'App_A'
+ channel:
+ id: 'alice'
+ count: 1
+ # Ensure 'bob' leaves Stasis
+ -
+ ari-events:
+ match:
+ type: StasisEnd
+ application: 'App_B'
+ channel:
+ id: 'bob'
+ count: 1
+ # Ensure 'alice' & 'bob' enter the non-stasis bridge. Then hang up 'bob'.
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: BridgeEnter
+ UniqueID: '(alice|bob)'
+ BridgeNumChannels: '1'
+ count: 1
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: BridgeEnter
+ UniqueID: '(alice|bob)'
+ BridgeNumChannels: '2'
+ count: 1
+ ami-actions:
+ action:
+ Action: 'Hangup'
+ Channel: 'bob'
+ # Ensure bob is hung up.
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: Hangup
+ Uniqueid: 'bob'
+ count: 1
+ # Ensure alice is hung up (not returned to Stasis).
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: Hangup
+ Uniqueid: 'alice'
+ count: 1
+ stop_test:
+
+properties:
+ minversion: '13.1.0'
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - python : starpy
+ - asterisk : res_ari_channels
+ - asterisk : app_echo
+ tags:
+ - ARI
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_different_stasis_app/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf?view=auto&rev=6389
==============================================================================
--- asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf Thu Feb 12 10:48:17 2015
@@ -1,0 +1,6 @@
+[default]
+
+exten => echo,1,Answer()
+ same => n,Echo()
+ same => n,Hangup()
+
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/test-config.yaml?view=auto&rev=6389
==============================================================================
--- asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/test-config.yaml (added)
+++ asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/test-config.yaml Thu Feb 12 10:48:17 2015
@@ -1,0 +1,140 @@
+testinfo:
+ summary: Bridge channels via AMI that are in the same stasis app unbridged.
+ description: |
+ "This test originates a Local channel placing half ('alice') into
+ Stasis(testsuite) and the other half ('echo_alice') into Echo().
+ Another Local channel is originated with half ('bob') also placed into
+ Stasis(testsuite) while the other half ('echo_bob') is placed into
+ Echo(). The AMI bridge action is then used to pull both 'alice' & 'bob'
+ out of the stasis app and then push them both into a non-stasis bridge.
+ The 'bob' channel half is then hung up.
+
+ This test verifies that the channels can be pulled out of the same
+ stasis app and put into a non-stasis bridge via the AMI Bridge action.
+ It also verifies that the StasisStart & StasisEnd events occur for both
+ 'alice' & 'bob' and ensures that 'alice' does not re-enter Stasis when
+ 'bob' is hung up."
+
+test-modules:
+ test-object:
+ typename: ari.AriBaseTestObject
+ modules:
+ -
+ config-section: pluggable-config
+ typename: 'pluggable_modules.EventActionModule'
+
+pluggable-config:
+ # Create channel where the 'alice' half enters Stasis and the 'echo_alice'
+ # half enters dialplan executing Echo()
+ -
+ ami-start:
+ ari-requests:
+ method: 'post'
+ uri: 'channels/alice'
+ params:
+ endpoint: 'Local/echo at default'
+ app: 'testsuite'
+ otherChannelId: 'echo_alice'
+ # Ensure the 'alice' channel half enters Stasis. Then create channel where
+ # the 'bob' half enters Stasis and the 'echo_bob' half enters dialplan
+ # executing Echo().
+ -
+ ari-events:
+ match:
+ type: StasisStart
+ application: 'testsuite'
+ args: []
+ channel:
+ id: 'alice'
+ count: 1
+ ari-requests:
+ method: 'post'
+ uri: 'channels/bob'
+ params:
+ endpoint: 'Local/echo at default'
+ app: 'testsuite'
+ otherChannelId: 'echo_bob'
+ # Ensure the 'bob' channel half enters Stasis. Then bridge 'alice' and
+ # 'bob' using AMI.
+ -
+ ari-events:
+ match:
+ type: StasisStart
+ application: 'testsuite'
+ args: []
+ channel:
+ id: 'bob'
+ count: 1
+ ami-actions:
+ action:
+ Action: 'Bridge'
+ Channel1: 'alice'
+ Channel2: 'bob'
+ # Ensure 'alice' leaves Stasis
+ -
+ ari-events:
+ match:
+ type: StasisEnd
+ application: 'testsuite'
+ channel:
+ id: 'alice'
+ count: 1
+ # Ensure 'bob' leaves Stasis
+ -
+ ari-events:
+ match:
+ type: StasisEnd
+ application: 'testsuite'
+ channel:
+ id: 'bob'
+ count: 1
+ # Ensure 'alice' & 'bob' enter the non-stasis bridge. Then hang up 'bob'.
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: BridgeEnter
+ UniqueID: '(alice|bob)'
+ BridgeNumChannels: '1'
+ count: 1
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: BridgeEnter
+ UniqueID: '(alice|bob)'
+ BridgeNumChannels: '2'
+ count: 1
+ ami-actions:
+ action:
+ Action: 'Hangup'
+ Channel: 'bob'
+ # Ensure bob is hung up.
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: Hangup
+ Uniqueid: 'bob'
+ count: 1
+ # Ensure alice is hung up (not returned to Stasis).
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: Hangup
+ Uniqueid: 'alice'
+ count: 1
+ stop_test:
+
+properties:
+ minversion: '13.1.0'
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - python : starpy
+ - asterisk : res_ari_channels
+ - asterisk : app_echo
+ tags:
+ - ARI
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_app/two_channel_same_stasis_app/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/tests.yaml?view=diff&rev=6389&r1=6388&r2=6389
==============================================================================
--- asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/tests.yaml (original)
+++ asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/tests.yaml Thu Feb 12 10:48:17 2015
@@ -3,3 +3,5 @@
- test: 'non_stasis_bridge'
- test: 'same_stasis_app'
- test: 'different_stasis_app'
+ - test: 'two_channel_same_stasis_app'
+ - test: 'two_channel_different_stasis_app'
Added: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf?view=auto&rev=6389
==============================================================================
--- asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf Thu Feb 12 10:48:17 2015
@@ -1,0 +1,6 @@
+[default]
+
+exten => echo,1,Answer()
+ same => n,Echo()
+ same => n,Hangup()
+
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/test-config.yaml?view=auto&rev=6389
==============================================================================
--- asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/test-config.yaml (added)
+++ asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/test-config.yaml Thu Feb 12 10:48:17 2015
@@ -1,0 +1,243 @@
+testinfo:
+ summary: Bridge channels via AMI that are in different stasis apps and bridges.
+ description: |
+ "This test originates a Local channel placing half ('alice') into
+ Stasis(App_A) and the other half ('echo_alice') into Echo(). The
+ 'alice' half is added to the bridge 'test_bridge_a'. Another Local
+ channel is originated with half ('bob') placed into Stasis(App_B) while
+ the other half ('echo_bob') is placed into Echo(). The 'bob' half is
+ added to the bridge 'test_bridge_b'. The AMI bridge action is then used
+ to pull 'alice' and 'bob' out of the stasis apps and bridges they are
+ in and push them into a new non-stasis bridge. The 'bob' channel half
+ is then hung up.
+
+ This test verifies that the channels can be pulled out of different
+ stasis apps & bridges and put into a new bridge via the AMI Bridge
+ action. It also verifies that the StasisStart & StasisEnd events occur
+ for both 'alice' & 'bob' and ensures that 'alice' does not re-enter
+ Stasis when 'bob' is hung up."
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'ari.AriBaseTestObject'
+ modules:
+ -
+ config-section: pluggable-config
+ typename: 'pluggable_modules.EventActionModule'
+
+test-object-config:
+ apps: App_A,App_B
+
+pluggable-config:
+ # Create channel where the 'alice' half enters Stasis app 'App_A' and the
+ # 'echo_alice' half enters dialplan executing Echo()
+ -
+ ami-start:
+ ari-requests:
+ method: 'post'
+ uri: 'channels/alice'
+ params:
+ endpoint: 'Local/echo at default'
+ app: 'App_A'
+ otherChannelId: 'echo_alice'
+ # Ensure the 'alice' channel half enters Stasis. Create stasis bridge
+ # 'test_bridge_a' and add 'alice' to it.
+ -
+ ari-events:
+ match:
+ type: StasisStart
+ application: 'App_A'
+ args: []
+ channel:
+ id: 'alice'
+ count: 1
+ ari-requests:
+ -
+ method: 'post'
+ uri: 'bridges/test_bridge_a'
+ -
+ method: 'post'
+ uri: 'bridges/test_bridge_a/addChannel'
+ params:
+ channel: 'alice'
+ # Ensure 'alice' is in a Stasis bridge. Then create channel where the 'bob'
+ # half enters Stasis app 'App_B' and the 'echo_bob' half enters dialplan
+ # executing Echo().
+ -
+ ari-events:
+ match:
+ type: ChannelEnteredBridge
+ bridge:
+ id: 'test_bridge_a'
+ channels: ['alice']
+ channel:
+ id: 'alice'
+ application: 'App_A'
+ count: 1
+ ari-requests:
+ method: 'post'
+ uri: 'channels/bob'
+ params:
+ endpoint: 'Local/echo at default'
+ app: 'App_B'
+ otherChannelId: 'echo_bob'
+ # Ensure the 'bob' channel half enters Stasis. Create stasis bridge
+ # 'test_bridge_b' and add 'bob' to it.
+ -
+ ari-events:
+ match:
+ type: StasisStart
+ application: 'App_B'
+ args: []
+ channel:
+ id: 'bob'
+ count: 1
+ ari-requests:
+ -
+ method: 'post'
+ uri: 'bridges/test_bridge_b'
+ -
+ method: 'post'
+ uri: 'bridges/test_bridge_b/addChannel'
+ params:
+ channel: 'bob'
+ # Ensure 'bob' is in a different stasis bridge. Then bridge 'alice' and
+ # 'bob' using AMI.
+ -
+ ari-events:
+ match:
+ type: ChannelEnteredBridge
+ bridge:
+ id: 'test_bridge_b'
+ channels: ['bob']
+ channel:
+ id: 'bob'
+ application: 'App_B'
+ count: 1
+ ami-actions:
+ action:
+ Action: 'Bridge'
+ Channel1: 'alice'
+ Channel2: 'bob'
+ # Ensure 'alice' leaves the Stasis bridge (test_bridge_a) and 'bob' leaves
+ # the Stasis bridge (test_bridge_b).
+ -
+ ari-events:
+ -
+ match:
+ type: ChannelLeftBridge
+ bridge:
+ id: 'test_bridge_a'
+ channels: []
+ channel:
+ id: 'alice'
+ application: 'App_A'
+ count: 1
+ -
+ match:
+ type: ChannelLeftBridge
+ bridge:
+ id: 'test_bridge_b'
+ channels: []
+ channel:
+ id: 'bob'
+ application: 'App_B'
+ count: 1
+ # Ensure 'alice' leaves Stasis
+ -
+ ari-events:
+ match:
+ type: StasisEnd
+ application: 'App_A'
+ channel:
+ id: 'alice'
+ count: 1
+ # Ensure 'bob' leaves Stasis
+ -
+ ari-events:
+ match:
+ type: StasisEnd
+ application: 'App_B'
+ channel:
+ id: 'bob'
+ count: 1
+ # Ensure 'alice' & 'bob' enter the non-stasis bridge. Then hang up 'bob'.
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: BridgeEnter
+ UniqueID: '(alice|bob)'
+ BridgeNumChannels: '1'
+ nomatch:
+ Bridgeuniqueid: 'test_bridge_(a|b)'
+ count: 1
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: BridgeEnter
+ UniqueID: '(alice|bob)'
+ BridgeNumChannels: '2'
+ nomatch:
+ Bridgeuniqueid: 'test_bridge_(a|b)'
+ count: 1
+ ami-actions:
+ action:
+ Action: 'Hangup'
+ Channel: 'bob'
+ # Ensure bob is hung up.
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: Hangup
+ Uniqueid: 'bob'
+ count: 1
+ # Ensure alice is hung up (not returned to Stasis) and destroy the Stasis
+ # bridges.
+ -
+ ami-events:
+ conditions:
+ match:
+ Event: Hangup
+ Uniqueid: 'alice'
+ count: 1
+ ari-requests:
+ -
+ method: 'delete'
+ uri: 'bridges/test_bridge_a'
+ -
+ method: 'delete'
+ uri: 'bridges/test_bridge_b'
+ # Ensure the Stasis bridge 'test_bridge_a' was destroyed.
+ -
+ ari-events:
+ match:
+ type: BridgeDestroyed
+ bridge:
+ id: 'test_bridge_a'
+ count: 1
+ # Ensure the Stasis bridge 'test_bridge_b' was destroyed.
+ -
+ ari-events:
+ match:
+ type: BridgeDestroyed
+ bridge:
+ id: 'test_bridge_b'
+ count: 1
+ stop_test:
+
+properties:
+ minversion: '13.1.0'
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - python : starpy
+ - asterisk : res_ari_channels
+ - asterisk : res_ari_bridges
+ - asterisk : app_echo
+ tags:
+ - ARI
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_different_stasis_app/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf?view=auto&rev=6389
==============================================================================
--- asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf Thu Feb 12 10:48:17 2015
@@ -1,0 +1,6 @@
+[default]
+
+exten => echo,1,Answer()
+ same => n,Echo()
+ same => n,Hangup()
+
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/test-config.yaml?view=auto&rev=6389
==============================================================================
--- asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/test-config.yaml (added)
+++ asterisk/trunk/tests/rest_api/external_interaction/ami_bridge/stasis_bridge/two_channel_same_stasis_app/test-config.yaml Thu Feb 12 10:48:17 2015
@@ -1,0 +1,217 @@
+testinfo:
+ summary: Bridge channels via AMI that are in the same stasis app and bridge
+ description: |
+ "This test originates a Local channel placing half ('alice') into
+ Stasis(testsuite) and the other half ('echo_alice') into Echo(). The
+ 'alice' half is added to the bridge 'test_bridge'. Another Local
+ channel is originated with half ('bob') also placed into
+ Stasis(testsuite) while the other half ('echo_bob') is placed into
+ Echo(). The 'bob' half is also added to the bridge 'test_bridge'. The
+ AMI bridge action is then used to pull both 'alice' & 'bob' out of the
+ stasis app and bridge then push them both into a new non-stasis
+ bridge. The 'bob' channel half is then hung up.
+
+ This test verifies that the channels can be pulled out of the same
+ stasis app & bridge and put into a new bridge via the AMI Bridge
+ action. It also verifies that the StasisStart & StasisEnd events occur
+ for both 'alice' & 'bob' and ensures that 'alice' does not re-enter
+ Stasis when 'bob' is hung up."
+
+test-modules:
+ test-object:
+ typename: ari.AriBaseTestObject
+ modules:
+ -
+ config-section: pluggable-config
+ typename: 'pluggable_modules.EventActionModule'
+
+pluggable-config:
+ # Create channel where the 'alice' half enters Stasis and the 'echo_alice'
+ # half enters dialplan executing Echo()
+ -
+ ami-start:
+ ari-requests:
+ method: 'post'
+ uri: 'channels/alice'
+ params:
+ endpoint: 'Local/echo at default'
+ app: 'testsuite'
+ otherChannelId: 'echo_alice'
+ # Ensure the 'alice' channel half enters Stasis. Create stasis bridge
+ # 'test_bridge' and add 'alice' to it.
+ -
+ ari-events:
+ match:
+ type: StasisStart
+ application: 'testsuite'
+ args: []
+ channel:
+ id: 'alice'
+ count: 1
+ ari-requests:
+ -
+ method: 'post'
+ uri: 'bridges/test_bridge'
+ -
+ method: 'post'
+ uri: 'bridges/test_bridge/addChannel'
+ params:
+ channel: 'alice'
+ # Ensure 'alice' is in a Stasis bridge. Then create channel where the 'bob'
+ # half enters Stasis and the 'echo_bob' half enters dialplan executing
+ # Echo().
+ -
+ ari-events:
+ match:
+ type: ChannelEnteredBridge
+ bridge:
+ id: 'test_bridge'
+ channels: ['alice']
+ channel:
+ id: 'alice'
+ count: 1
+ ari-requests:
+ method: 'post'
+ uri: 'channels/bob'
+ params:
+ endpoint: 'Local/echo at default'
+ app: 'testsuite'
+ otherChannelId: 'echo_bob'
+ # Ensure the 'bob' channel half enters Stasis. Then add 'bob' to the same
+ # Stasis bridge as 'alice'.
+ -
+ ari-events:
+ match:
+ type: StasisStart
+ application: 'testsuite'
+ args: []
+ channel:
+ id: 'bob'
+ count: 1
+ ari-requests:
+ method: 'post'
+ uri: 'bridges/test_bridge/addChannel'
+ params:
+ channel: 'bob'
+ # Ensure 'bob' is in the same Stasis bridge as 'alice'. Then bridge
+ # 'alice' and 'bob' using AMI.
+ -
+ ari-events:
+ match:
+ type: ChannelEnteredBridge
+ bridge:
+ id: 'test_bridge'
+ channels: ['alice', 'bob']
+ channel:
+ id: 'bob'
+ count: 1
+ ami-actions:
+ action:
+ Action: 'Bridge'
+ Channel1: 'alice'
+ Channel2: 'bob'
+ # Ensure 'alice' leaves the Stasis bridge (test_bridge)
+ -
+ ari-events:
+ match:
+ type: ChannelLeftBridge
+ bridge:
+ id: 'test_bridge'
+ channel:
+ id: 'alice'
+ count: 1
+ # Ensure 'alice' leaves Stasis
+ -
+ ari-events:
+ match:
+ type: StasisEnd
+ application: 'testsuite'
+ channel:
+ id: 'alice'
+ count: 1
+ # Ensure 'bob' leaves the Stasis bridge (test_bridge)
+ -
+ ari-events:
+ match:
+ type: ChannelLeftBridge
+ bridge:
+ id: 'test_bridge'
+ channel:
+ id: 'bob'
+ count: 1
+ # Ensure 'bob' leaves Stasis
+ -
+ ari-events:
[... 97 lines stripped ...]
More information about the asterisk-commits
mailing list