[asterisk-commits] Test receiving an early BYE during an attended transfer (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 11 15:29:14 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5823 )

Change subject: Test receiving an early BYE during an attended transfer
......................................................................

Test receiving an early BYE during an attended transfer

Asterisk used to fail the transfer and drop the call if an early BYE (sometime
just after the 202 accepted, but before the Notify 200 OK frag) was received.
Added a test that makes sure the transfer does not fail when an early BYE is
received.

This patch modified the testsuite's pjsua phones wrapper to allow configuring
of when to send the transferer's BYE during the transfer process. A new option,
'hangup-reason', has been added that specifies when to send the BYE. Allowed
values are:

  accepted - Sent right after the refer is accepted
  trying - Sent right after receiving a sip frag 100 Trying
  ok - Sent right after receiving a sip frag 200 OK
  final - Sent upon receiving the final message

A test was also added that sends a BYE right after the REFER is accepted. As
noted in test-config.yaml this test is a direct copy of the 'same_stasis_app'
test except for when the BYE is sent.

ASTERISK-27053

Change-Id: Ifbf1d6e8f91dfc00128a2ccd7eaff6402d170650
---
M lib/python/asterisk/phones.py
M tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app/test-config.yaml
A tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/configs/ast1/extensions.conf
A tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/configs/ast1/pjsip.conf
A tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/test-config.yaml
M tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/tests.yaml
6 files changed, 618 insertions(+), 17 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/lib/python/asterisk/phones.py b/lib/python/asterisk/phones.py
index c4822eb..6a96b38 100755
--- a/lib/python/asterisk/phones.py
+++ b/lib/python/asterisk/phones.py
@@ -116,6 +116,7 @@
 
     def __init__(self, controller, account_config):
         """Constructor"""
+        self.config = account_config
         self.name = account_config['name']
         self.account = controller.pj_accounts[self.name].account
         self.pj_lib = controller.pj_accounts[self.name].pj_lib
@@ -137,7 +138,7 @@
         call = None
         try:
             LOGGER.info("'%s' is calling '%s'" % (self.name, uri))
-            call_cb = PhoneCallCallback()
+            call_cb = PhoneCallCallback(config=self.config)
             call = self.account.make_call(uri, cb=call_cb)
             self.calls.append(call)
         except pj.Error as err:
@@ -259,10 +260,21 @@
 
 
 class PhoneCallCallback(pj.CallCallback):
-    """Derived callback class for calls."""
+    """Derived callback class for calls.
 
-    def __init__(self, call=None):
+    configuration:
+        hangup-reason - Specifies when to hangup during a transfer. The
+            following values are allowed:
+                accepted - Sent right after the refer is accepted
+                trying - Sent right after receiving a sip frag 100 Trying
+                ok - Sent right after receiving a sip frag 200 OK
+                final - Sent upon receiving the final message
+    """
+
+    def __init__(self, call=None, config=None):
         pj.CallCallback.__init__(self, call)
+        self.hangup_reason = (config.get('hangup-reason', 'ok')
+                              if config else 'ok').lower()
         self.controller = PjsuaPhoneController.get_instance()
         self.phone = None
         if call is not None:
@@ -300,30 +312,30 @@
 
     def on_transfer_status(self, code, reason, final, cont):
         """Callback for the status of a previous call transfer request."""
+
         LOGGER.debug(fmt_call_info(self.call.info()))
         status_format = "\n=== Transfer Status ==="
         status_format += "\nCode: '%s'"
         status_format += "\nReason: '%s'"
         status_format += "\nFinal Notification: '%s'\n"
         LOGGER.debug(status_format % (code, reason, final))
-        if final != 1:
-            return cont
 
-        LOGGER.debug("Call uri: '%s'; remote uri: '%s'" %
-                     (self.call.info().uri, self.call.info().remote_uri))
         if code == 200 and reason == "OK" and cont == 0:
             LOGGER.info("Transfer target answered the call.")
-        else:
-            LOGGER.warn("Transfer failed!")
 
-        self.phone.remove_call_op_tracking(self.call, operation='transfer')
+        if (reason.lower() == self.hangup_reason or
+                (final and self.hangup_reason == 'final')):
+            LOGGER.debug("Call uri: '%s'; remote uri: '%s'" %
+                         (self.call.info().uri, self.call.info().remote_uri))
 
-        try:
-            LOGGER.info("Hanging up '%s'" % self.call)
-            self.call.hangup(code=200, reason="Q.850;cause=16")
-        except pj.Error as err:
-            LOGGER.warn("Failed to hangup the call!")
-            LOGGER.warn("Exception: %s" % str(err))
+            self.phone.remove_call_op_tracking(self.call, operation='transfer')
+
+            try:
+                LOGGER.info("Hanging up '%s'" % self.call)
+                self.call.hangup(reason="Q.850;cause=16")
+            except pj.Error as err:
+                LOGGER.warn("Failed to hangup the call!")
+                LOGGER.warn("Exception: %s" % str(err))
 
         return cont
 
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 cdb3ed0..3ecc0f2 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
@@ -489,7 +489,7 @@
             uri: 'bridges/test_bridge_b'
 
 properties:
-    minversion: '13.5.0'
+    minversion: ['13.17.0', '14.6.0']
     dependencies:
         - python : autobahn.websocket
         - python : requests
diff --git a/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/configs/ast1/extensions.conf b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/configs/ast1/extensions.conf
new file mode 100644
index 0000000..7e34248
--- /dev/null
+++ b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/configs/ast1/extensions.conf
@@ -0,0 +1,22 @@
+[default]
+
+exten => dummy,1,NoOp()
+	same => n,Answer()
+	same => n,Stasis(testsuite,dummy)
+	same => n,Hangup()
+
+exten => echo,1,NoOp()
+	same => n,Answer()
+	same => n,Echo()
+	same => n,Hangup()
+
+exten => stasis_one,1,NoOp()
+	same => n,Answer()
+	same => n,Stasis(testsuite,one)
+	same => n,Hangup
+
+exten => stasis_two,1,NoOp()
+	same => n,Answer()
+	same => n,Stasis(testsuite,two)
+	same => n,Hangup
+
diff --git a/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/configs/ast1/pjsip.conf b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..ffac34c
--- /dev/null
+++ b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/configs/ast1/pjsip.conf
@@ -0,0 +1,54 @@
+[global]
+type=global
+debug=yes
+
+[system]
+type=system
+
+[local]
+type=transport
+protocol=udp
+bind=127.0.0.1:5060
+
+[alice]
+type=endpoint
+context=default
+disallow=all
+allow=ulaw
+direct_media=no
+media_address=127.0.0.1
+aors=alice
+
+[alice]
+type=aor
+max_contacts=1
+contact=sip:alice at 127.0.0.1:5061\;transport=udp
+
+[bob]
+type=endpoint
+context=default
+disallow=all
+allow=ulaw
+direct_media=no
+media_address=127.0.0.1
+aors=bob
+
+[bob]
+type=aor
+max_contacts=1
+contact=sip:bob at 127.0.0.1:5062\;transport=udp
+
+[carol]
+type=endpoint
+context=default
+disallow=all
+allow=ulaw
+direct_media=no
+media_address=127.0.0.1
+aors=carol
+
+[carol]
+type=aor
+max_contacts=1
+contact=sip:carol at 127.0.0.1:5063\;transport=udp
+
diff --git a/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/test-config.yaml b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/test-config.yaml
new file mode 100644
index 0000000..5663898
--- /dev/null
+++ b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/same_stasis_app_accepted/test-config.yaml
@@ -0,0 +1,512 @@
+testinfo:
+    summary: |
+        "Transfer (attended) Stasis bridge to Stasis bridge in same Stasis app"
+    description: |
+        "NOTE - The only difference between this test and the same_stasis_app
+         test is that the transferer hangs up immediately after the REFER has
+         been accepted instead of waiting until receiving the NOTIFY with the
+         200 OK frag. This allows the test to make sure the transfer completes
+         even when Asterisk receives an early BYE.
+
+         Upon the kick off local channel entering into the Stasis(testsuite)
+         app, a call is made from the 'alice' PJSUA account that is put into
+         Stasis(testsuite). The Stasis bridge 'test_bridge_a' is created and
+         alice is added to it. A channel is originated to the 'bob' PJSUA
+         account and put into the same Stasis(testsuite) app and bridge with
+         alice. Alice begins an attended transfer by making another call. The
+         second alice channel is put into the same Stasis(testsuite) app, the
+         Stasis bridge 'test_bridge_b' is created, and the second alice channel
+         is added to Stasis bridge. A channel is then originated to the 'carol'
+         PJSUA account and put into the same Stasis(testsuite) app and bridge
+         with the second alice channel.
+
+         Alice then completes the attended transfer essentially transferring
+         the Stasis bridge to the other Stasis bridge within the same Stasis
+         app. Asterisk does this by creating a Local channel where each half is
+         swapped in place of the two alice channels. After the transfer is
+         successful with a local replacement channel half in the Stasis bridge
+         with bob and another in the Stasis bridge with carol, bob is hung up.
+         Carol is then hung up and so is the local 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 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."
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'ari.AriOriginateTestObject'
+    modules:
+        -
+            config-section: 'pjsua-config'
+            typename: 'phones.PjsuaPhoneController'
+        -
+            config-section: pluggable-config
+            typename: 'pluggable_modules.EventActionModule'
+
+test-object-config:
+    apps: testsuite
+    test-iterations:
+        -
+            channelId: 'dummy'
+            endpoint: 'Local/dummy at default'
+            context: 'default'
+            extension: 'echo'
+            priority: '1'
+
+pjsua-config:
+    transports:
+        -
+            name: 'local-ipv4-1'
+            bind: '127.0.0.1'
+            bindport: '5061'
+        -
+            name: 'local-ipv4-2'
+            bind: '127.0.0.1'
+            bindport: '5062'
+        -
+            name: 'local-ipv4-3'
+            bind: '127.0.0.1'
+            bindport: '5063'
+    accounts:
+        -
+            name: 'alice'
+            username: 'alice'
+            domain: '127.0.0.1'
+            transport: 'local-ipv4-1'
+            hangup-reason: 'accepted' # Hang up after REFER, but before NOTIFY
+        -
+            name: 'bob'
+            username: 'bob'
+            domain: '127.0.0.1'
+            transport: 'local-ipv4-2'
+        -
+            name: 'carol'
+            username: 'carol'
+            domain: '127.0.0.1'
+            transport: 'local-ipv4-3'
+
+pluggable-config:
+    # Upon kickoff channel entering Stasis app: create a bridge, don't add
+    # kickoff channel to bridge, instruct alice to place call to
+    # Stasis(testsuite,one).
+    -
+        ari-events:
+            match:
+                type: StasisStart
+                application: 'testsuite'
+                args: ['dummy']
+                channel:
+                    id: 'dummy;2'
+            count: 1
+        pjsua_phone:
+            action: 'call'
+            pjsua_account: 'alice'
+            call_uri: 'sip:stasis_one at 127.0.0.1'
+    # Upon alice entering the Stasis app: create the stasis bridge
+    # 'test_bridge_a', add alice's first channel to the Stasis bridge, and
+    # originate a call to bob.
+    -
+        ari-events:
+            match:
+                type: StasisStart
+                application: 'testsuite'
+                args: ['one']
+                channel:
+                    name: 'PJSIP/alice-.*'
+            count: 1
+        ari-requests:
+            -
+                method: 'post'
+                uri: 'bridges/test_bridge_a'
+            -
+                method: 'post'
+                uri: 'bridges/test_bridge_a/addChannel'
+                params:
+                    channel: '{channel.id}'
+            -
+                method: 'post'
+                uri: 'channels/bob'
+                params:
+                    endpoint: 'PJSIP/bob'
+                    context: 'default'
+                    extension: 'stasis_one'
+                    priority: '1'
+    # Ensure alice's first channel enters the Stasis bridge 'test_bridge_a'.
+    -
+        ari-events:
+            match:
+                type: ChannelEnteredBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_a'
+                channel:
+                    name: 'PJSIP/alice-.*'
+            count: 1
+    # Ensure bob enters the Stasis app. Then add bob to the Stasis bridge
+    # with alice's first channel.
+    -
+        ari-events:
+            match:
+                type: StasisStart
+                application: 'testsuite'
+                args: ['one']
+                channel:
+                    name: 'PJSIP/bob-.*'
+            count: 1
+        ari-requests:
+            method: 'post'
+            uri: 'bridges/test_bridge_a/addChannel'
+            params:
+                channel: '{channel.id}'
+    # Ensure bob's channel enters the Stasis bridge with alice's first
+    # channel. Then instruct alice to place another call to
+    # Stasis(testsuite,two).
+    -
+        ari-events:
+            match:
+                type: ChannelEnteredBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_a'
+                channel:
+                    name: 'PJSIP/bob-.*'
+            count: 1
+        pjsua_phone:
+            action: 'call'
+            pjsua_account: 'alice'
+            call_uri: 'sip:stasis_two at 127.0.0.1'
+    # Upon alice's second channel entering the Stasis app: create the stasis
+    # bridge 'test_bridge_b', add alice's second channel to the Stasis bridge,
+    # and originate a call to carol.
+    -
+        ari-events:
+            match:
+                type: StasisStart
+                application: 'testsuite'
+                args: ['two']
+                channel:
+                    name: 'PJSIP/alice-.*'
+            count: 1
+        ari-requests:
+            -
+                method: 'post'
+                uri: 'bridges/test_bridge_b'
+            -
+                method: 'post'
+                uri: 'bridges/test_bridge_b/addChannel'
+                params:
+                    channel: '{channel.id}'
+            -
+                method: 'post'
+                uri: 'channels/carol'
+                params:
+                    endpoint: 'PJSIP/carol'
+                    context: 'default'
+                    extension: 'stasis_two'
+                    priority: '1'
+    # Ensure alice's second channel enters the Stasis bridge 'test_bridge_b'.
+    -
+        ari-events:
+            match:
+                type: ChannelEnteredBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_b'
+                channel:
+                    name: 'PJSIP/alice-.*'
+            count: 1
+    # Ensure carol enters the Stasis app. Then add carol to the Stasis bridge
+    # with alice's second channel.
+    -
+        ari-events:
+            match:
+                type: StasisStart
+                application: 'testsuite'
+                args: ['two']
+                channel:
+                    name: 'PJSIP/carol-.*'
+            count: 1
+        ari-requests:
+            method: 'post'
+            uri: 'bridges/test_bridge_b/addChannel'
+            params:
+                channel: '{channel.id}'
+    # Ensure carol's channel enters the Stasis bridge with alice's second
+    # channel. Then instruct alice to perform an attended transfer. This is to
+    # transfer the remote side of the first channel which is a Stasis bridge to
+    # the remote side of the second channel which is also a Stasis bridge.
+    # Essentially bob will be in the Stasis bridge 'test_bridge_a', carol will
+    # be in the Stasis bridge 'test_bridge_b', and the halves of a local
+    # channel will be in each thus linking the two Stasis bridges.
+    -
+        ari-events:
+            match:
+                type: ChannelEnteredBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_b'
+                channel:
+                    name: 'PJSIP/carol-.*'
+            count: 1
+        pjsua_phone:
+            action: 'transfer'
+            pjsua_account: 'alice'
+            transfer_type: 'attended'
+    # Ensure the attended transfer occurs with the proper info.
+    -
+        ari-events:
+            match:
+                type: BridgeAttendedTransfer
+                application: 'testsuite'
+                transferer_first_leg:
+                    name: 'PJSIP/alice-.*'
+                transferer_first_leg_bridge:
+                    id: 'test_bridge_a'
+                    bridge_class: 'stasis'
+                transferer_second_leg:
+                    name: 'PJSIP/alice-.*'
+                transferer_second_leg_bridge:
+                    id: 'test_bridge_b'
+                    bridge_class: 'stasis'
+                transferee:
+                    name: 'PJSIP/bob-.*'
+                transfer_target:
+                    id: 'carol'
+                destination_type: 'link'
+                destination_link_first_leg:
+                    name: 'Local/_attended at transfer-.*;1'
+                destination_link_second_leg:
+                    name: 'Local/_attended at transfer-.*;2'
+                result: 'Success'
+            count: 1
+    # Ensure the local channel half for the transfer that is replacing alice's
+    # first channel enters the Stasis(testsuite) application.
+    -
+        ari-events:
+            match:
+                type: StasisStart
+                application: 'testsuite'
+                args: []
+                channel:
+                    name: 'Local/_attended at transfer-.*;1'
+                replace_channel:
+                    name: 'PJSIP/alice-.*'
+            count: 1
+    # Ensure alice's first channel leaves the Stasis bridge.
+    -
+        ari-events:
+            match:
+                type: ChannelLeftBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_a'
+                channel:
+                    name: 'PJSIP/alice-.*'
+            count: 1
+    # Ensure the local channel half for the transfer that is replacing alice's
+    # first channel enters the Stasis bridge 'test_bridge_a'.
+    -
+        ari-events:
+            match:
+                type: ChannelEnteredBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_a'
+                channel:
+                    name: 'Local/_attended at transfer-.*;1'
+            count: 1
+    # Ensure alice's first channel exits the Stasis app.
+    -
+        ari-events:
+            match:
+                type: StasisEnd
+                application: 'testsuite'
+                channel:
+                    name: 'PJSIP/alice-.*'
+                    dialplan:
+                        exten: 'stasis_one'
+            count: 1
+    # Ensure the local channel half for the transfer that is replacing alice's
+    # second channel enters the Stasis(testsuite) application.
+    -
+        ari-events:
+            match:
+                type: StasisStart
+                application: 'testsuite'
+                args: []
+                channel:
+                    name: 'Local/_attended at transfer-.*;2'
+                replace_channel:
+                    name: 'PJSIP/alice-.*'
+            count: 1
+    # Ensure alice's second channel leaves the Stasis bridge.
+    -
+        ari-events:
+            match:
+                type: ChannelLeftBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_b'
+                channel:
+                    name: 'PJSIP/alice-.*'
+            count: 1
+    # Ensure the local channel half for the transfer that is replacing alice's
+    # second channel enters the Stasis bridge 'test_bridge_b'.
+    -
+        ari-events:
+            match:
+                type: ChannelEnteredBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_b'
+                channel:
+                    name: 'Local/_attended at transfer-.*;2'
+            count: 1
+    # Ensure alice's second channel exits the Stasis app. Then hang up bob.
+    -
+        ari-events:
+            match:
+                type: StasisEnd
+                application: 'testsuite'
+                channel:
+                    name: 'PJSIP/alice-.*'
+                    dialplan:
+                        exten: 'stasis_two'
+            count: 1
+        ami-actions:
+            action:
+               action: 'Hangup'
+               channel: '/^PJSIP/bob-.*$/'
+    # Upon hanging up bob, ensure bob leaves the Stasis bridge.
+    -
+        ari-events:
+            match:
+                type: ChannelLeftBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_a'
+                channel:
+                    name: 'PJSIP/bob-.*'
+            count: 1
+    # Ensure bob exits the Stasis app. Then hang up carol.
+    -
+        ari-events:
+            match:
+                type: StasisEnd
+                application: 'testsuite'
+                channel:
+                    name: 'PJSIP/bob-.*'
+                    dialplan:
+                        exten: 'stasis_one'
+            count: 1
+        ami-actions:
+            action:
+               action: 'Hangup'
+               channel: 'carol'
+    # Ensure carol leaves the Stasis bridge.
+    -
+        ari-events:
+            match:
+                type: ChannelLeftBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_b'
+                channel:
+                    name: 'PJSIP/carol-.*'
+            count: 1
+    # Ensure carol exits the Stasis app. Then hang up the local replacement
+    # channel half in Stasis bridge 'test_bridge_a'.
+    -
+        ari-events:
+            match:
+                type: StasisEnd
+                application: 'testsuite'
+                channel:
+                    name: 'PJSIP/carol-.*'
+                    dialplan:
+                        exten: 'stasis_two'
+            count: 1
+        ami-actions:
+            action:
+               action: 'Hangup'
+               channel: '/^Local/_attended at transfer-.*;1$/'
+    # Ensure the local channel half that was bridged with bob in the Stasis
+    # bridge leaves the bridge.
+    -
+        ari-events:
+            match:
+                type: ChannelLeftBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_a'
+                channel:
+                    name: 'Local/_attended at transfer-.*;1'
+            count: 1
+    # Ensure the local channel half that was bridged with bob exits the Stasis
+    # app.
+    -
+        ari-events:
+            match:
+                type: StasisEnd
+                application: 'testsuite'
+                channel:
+                    name: 'Local/_attended at transfer-.*;1'
+                    dialplan:
+                        exten: '_attended'
+            count: 1
+    # Ensure the other local channel half that was bridged with carol in the
+    # Stasis bridge leaves the bridge.
+    -
+        ari-events:
+            match:
+                type: ChannelLeftBridge
+                application: 'testsuite'
+                bridge:
+                    id: 'test_bridge_b'
+                channel:
+                    name: 'Local/_attended at transfer-.*;2'
+            count: 1
+    # Ensure the local channel half that was bridged with carol exits the
+    # Stasis app. Then hang up the kickoff local channel halves and destroy the
+    # Stasis bridge.
+    -
+        ari-events:
+            match:
+                type: StasisEnd
+                application: 'testsuite'
+                channel:
+                    name: 'Local/_attended at transfer-.*;2'
+                    dialplan:
+                        exten: '_attended'
+            count: 1
+        ami-actions:
+            action:
+               action: 'Hangup'
+               channel: '/^Local/dummy at default-.*;2$/'
+        ari-requests:
+            method: 'delete'
+            uri: 'bridges/test_bridge_a'
+            method: 'delete'
+            uri: 'bridges/test_bridge_b'
+
+properties:
+    minversion: '13.5.0'
+    dependencies:
+        - python : autobahn.websocket
+        - python : requests
+        - python : twisted
+        - python : starpy
+        - python : pjsua
+        - asterisk : app_stasis
+        - asterisk : res_ari_channels
+        - asterisk : res_ari_bridges
+        - asterisk : res_pjsip
+    tags:
+        - ARI
+        - pjsip
diff --git a/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/tests.yaml b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/tests.yaml
index 15ba94e..989626a 100644
--- a/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/tests.yaml
+++ b/tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_bridge/tests.yaml
@@ -1,4 +1,5 @@
 tests:
     - test: 'same_stasis_app'
+    - test: 'same_stasis_app_accepted'
     - test: 'different_stasis_app'
 

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

Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbf1d6e8f91dfc00128a2ccd7eaff6402d170650
Gerrit-Change-Number: 5823
Gerrit-PatchSet: 2
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170711/39e983af/attachment-0001.html>


More information about the asterisk-commits mailing list