[Asterisk-code-review] Stasis attended transfers: No StasisEnd event for transfer t... (testsuite[master])

Kevin Harwell asteriskteam at digium.com
Mon Jun 22 15:50:03 CDT 2015


Kevin Harwell has uploaded a new change for review.

  https://gerrit.asterisk.org/693

Change subject: Stasis attended transfers: No StasisEnd event for transfer target channel
......................................................................

Stasis attended transfers: No StasisEnd event for transfer target channel

This required a change in Asterisk since the transfer target was not being
hung up, thus no event. However, these tests were altered to now not expect
a test failure. This patch also fixes a few typos/copy paste errors found
in the test that were keeping them from passing. As well, in a couple of
tests the local attended transfer channels needed to be hung up. In the
'non_stasis_app_to_stasis_bridge' the hangup of 'bob' was moved to be done
once the local channel entered the bridge. This made the test a little
more deterministic.

With the changes it was verified that the tests pass and that Asterisk gets
shutdown gracefully (i.e. is not killed).

ASTERISK-24782 #close
Reported by: John Bigelow
ASTERISK-25167
Reported by: Corey Farrell

Change-Id: Ife584d91394ff69a3662004471421761789c4901
---
M tests/rest_api/external_interaction/attended_transfer/non_stasis_app_to_stasis_bridge/test-config.yaml
M tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/different_stasis_app/test-config.yaml
M tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app/test-config.yaml
3 files changed, 25 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/93/693/1

diff --git a/tests/rest_api/external_interaction/attended_transfer/non_stasis_app_to_stasis_bridge/test-config.yaml b/tests/rest_api/external_interaction/attended_transfer/non_stasis_app_to_stasis_bridge/test-config.yaml
index 502fd7e..4e187f8 100644
--- a/tests/rest_api/external_interaction/attended_transfer/non_stasis_app_to_stasis_bridge/test-config.yaml
+++ b/tests/rest_api/external_interaction/attended_transfer/non_stasis_app_to_stasis_bridge/test-config.yaml
@@ -22,8 +22,6 @@
          This test verifies that a non-Stasis app can be transferred (attended)
          to a Stasis bridge. It also verifies that the StasisStart & StasisEnd
          events occur for the alice, bob, and local replacement channels."
-    issues:
-        - jira: 'ASTERISK-24782'
 
 test-modules:
     test-object:
@@ -214,6 +212,7 @@
                     name: 'PJSIP/alice-.*'
             count: 1
     # Ensure the local channel half for the transfer enters the Stasis bridge.
+    # Then hang up bob.
     -
         ari-events:
             match:
@@ -224,7 +223,11 @@
                 channel:
                     name: 'Local/_attended at transfer-.*'
             count: 1
-    # Ensure the alice channel exits the Stasis app. Then hang up bob.
+        ami-actions:
+            action:
+               action: 'Hangup'
+               channel: '/^PJSIP/bob-.*$/'
+    # Ensure the alice channel exits the Stasis app.
     -
         ari-events:
             match:
@@ -233,11 +236,8 @@
                 channel:
                     name: 'PJSIP/alice-.*'
             count: 1
-        ami-actions:
-            action:
-               action: 'Hangup'
-               channel: '/^PJSIP/bob-.*$/'
     # Upon hanging up bob, ensure bob leaves the bridge.
+    # Also hangup the tranfer channel.
     -
         ari-events:
             match:
@@ -248,6 +248,10 @@
                 channel:
                     name: 'PJSIP/bob-.*'
             count: 1
+        ami-actions:
+            action:
+               action: 'Hangup'
+               channel: 'Local/_attended at transfer-00000001;1'
     # Ensure bob exits the Stasis app.
     -
         ari-events:
@@ -289,7 +293,7 @@
             uri: 'bridges/test_bridge'
 
 properties:
-    minversion: '13.1.0'
+    minversion: '13.5.0'
     dependencies:
         - python : autobahn.websocket
         - python : requests
@@ -304,6 +308,3 @@
     tags:
         - ARI
         - pjsip
-    # Expect test to fail until ASTERISK-24782 is resolved.
-    expected-result: False
-
diff --git a/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/different_stasis_app/test-config.yaml b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/different_stasis_app/test-config.yaml
index 36e7987..52ac84e 100644
--- a/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/different_stasis_app/test-config.yaml
+++ b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/different_stasis_app/test-config.yaml
@@ -31,8 +31,6 @@
          to a Stasis bridge via different Stasis apps. It also verifies that
          the StasisStart & StasisEnd events occur for the alice(both), bob,
          carol, and local replacement channels."
-    issues:
-        - jira: 'ASTERISK-24782'
 
 test-modules:
     test-object:
@@ -448,7 +446,7 @@
                 channel:
                     name: 'Local/_attended at transfer-.*;1'
                     dialplan:
-                        exten: 'stasis_one'
+                        exten: '_attended'
             count: 1
     # Ensure the other local channel half that was bridged with carol in the
     # Stasis bridge leaves the bridge.
@@ -473,7 +471,7 @@
                 channel:
                     name: 'Local/_attended at transfer-.*;2'
                     dialplan:
-                        exten: 'stasis_two'
+                        exten: '_attended'
             count: 1
         ami-actions:
             action:
@@ -481,10 +479,13 @@
                channel: '/^Local/dummy at default-.*;2$/'
         ari-requests:
             method: 'delete'
-            uri: 'bridges/test_bridge'
+            uri: 'bridges/test_bridge_a'
+        ari-requests:
+            method: 'delete'
+            uri: 'bridges/test_bridge_b'
 
 properties:
-    minversion: '13.1.0'
+    minversion: '13.5.0'
     dependencies:
         - python : autobahn.websocket
         - python : requests
@@ -498,6 +499,3 @@
     tags:
         - ARI
         - pjsip
-    # Expect test to fail until ASTERISK-24782 is resolved.
-    expected-result: False
-
diff --git a/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app/test-config.yaml b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app/test-config.yaml
index fd68ee7..af0d43c 100644
--- a/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app/test-config.yaml
+++ b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app/test-config.yaml
@@ -30,8 +30,6 @@
          to a Stasis bridge in the same Stasis app. It also verifies that the
          StasisStart & StasisEnd events occur for the alice(both), bob, carol,
          and local replacement channels."
-    issues:
-        - jira: 'ASTERISK-24782'
 
 test-modules:
     test-object:
@@ -453,7 +451,7 @@
                 channel:
                     name: 'Local/_attended at transfer-.*;1'
                     dialplan:
-                        exten: 'stasis_one'
+                        exten: '_attended'
             count: 1
     # Ensure the other local channel half that was bridged with carol in the
     # Stasis bridge leaves the bridge.
@@ -478,7 +476,7 @@
                 channel:
                     name: 'Local/_attended at transfer-.*;2'
                     dialplan:
-                        exten: 'stasis_two'
+                        exten: '_attended'
             count: 1
         ami-actions:
             action:
@@ -486,10 +484,12 @@
                channel: '/^Local/dummy at default-.*;2$/'
         ari-requests:
             method: 'delete'
-            uri: 'bridges/test_bridge'
+            uri: 'bridges/test_bridge_a'
+            method: 'delete'
+            uri: 'bridges/test_bridge_b'
 
 properties:
-    minversion: '13.1.0'
+    minversion: '13.5.0'
     dependencies:
         - python : autobahn.websocket
         - python : requests
@@ -503,6 +503,3 @@
     tags:
         - ARI
         - pjsip
-    # Expect test to fail until ASTERISK-24782 is resolved.
-    expected-result: False
-

-- 
To view, visit https://gerrit.asterisk.org/693
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife584d91394ff69a3662004471421761789c4901
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-code-review mailing list