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

Matt Jordan asteriskteam at digium.com
Wed Jun 24 08:40:21 CDT 2015


Matt Jordan has submitted this change and it was merged.

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, 27 insertions(+), 31 deletions(-)

Approvals:
  Matt Jordan: Looks good to me, approved; Verified
  Joshua Colp: Looks good to me, but someone else must approve



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..93ba1ff 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 transfer 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..6aa25d6 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
@@ -25,14 +25,12 @@
          replacement channel half that was in the Stasis bridge with bob. This
          causes the other local replacement channel half that was in the Stasis
          bridge with carol to be hung up and triggers the hang up of the kick
-         off local channel and the destruction of the stasis bridge.
+         off local channel and the destruction of the stasis bridges.
 
          This test verifies that a Stasis bridge can be transferred (attended)
          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..cdb3ed0 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
@@ -24,14 +24,12 @@
          that was in the Stasis bridge with bob. This causes the other local
          replacement channel half that was in the Stasis bridge with carol to
          be hung up and triggers the hang up of the kick off local channel and
-         the destruction of the stasis bridge.
+         the destruction of the stasis bridges.
 
          This test verifies that a Stasis bridge can be transferred (attended)
          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: merged
Gerrit-Change-Id: Ife584d91394ff69a3662004471421761789c4901
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-code-review mailing list