[asterisk-commits] mjordan: testsuite/asterisk/trunk r4579 - in /asterisk/trunk: lib/python/aste...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jan 19 13:01:03 CST 2014


Author: mjordan
Date: Sun Jan 19 13:00:58 2014
New Revision: 4579

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4579
Log:
confbridge: Add tests for waitmarked/marked user interaction

This patch adds two tests:

confbridge_waitmarked_single: This test is a simple Marked/WaitMarked test that
verifies basic interaction between Marked and WaitMarked users. In this test,
three scenarios are executed:
(1) A scenario that tests that when a WaitMarked user enters first and leaves
    last, the conference puts them into an INACTIVE state
(2) A scenario that tests that when a Marked user enters first the conference
    starts, but when the Marked user leaves the WaitMarked user is put into an
    INACTIVE state
(3) A scenario that tests that a Marked user always keeps the conference
    active, regardless of a WaitMarked user entering/leaving

confbridge_waitmarked_kick: This test verifies the bug that was fixed in
r405217. In it, three WaitMarked users join the ConfBridge, followed by a
Marked user. The Marked user is kicked, and then immediately during the user
being eject, the three WaitMarked users are also kicked. This test verifies
that the ConfBridge conference correctly transitions through the states even
in the presence of multiple users of different types being ejected.

Review: https://reviewboard.asterisk.org/r/3121/

(issue AST-1258)
Reported by: Steve Pitts

Added:
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/confbridge.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/test-config.yaml   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/confbridge.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/test-config.yaml   (with props)
Modified:
    asterisk/trunk/lib/python/asterisk/apptest.py
    asterisk/trunk/tests/apps/confbridge/tests.yaml

Modified: asterisk/trunk/lib/python/asterisk/apptest.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/apptest.py?view=diff&rev=4579&r1=4578&r2=4579
==============================================================================
--- asterisk/trunk/lib/python/asterisk/apptest.py (original)
+++ asterisk/trunk/lib/python/asterisk/apptest.py Sun Jan 19 13:00:58 2014
@@ -563,8 +563,11 @@
 
         # create actions from the definitions
         for action_def in instance_config['actions']:
-            self.actions.append(
-                ActionFactory.create_action(action_def))
+            action = ActionFactory.create_action(action_def)
+            LOGGER.debug('Adding action %s, matching on %s' % (
+                action, self.match_conditions))
+            self.actions.append(action)
+
         self.__current_action = 0
         self.channel_obj = None
         self.test_object = test_object
@@ -782,11 +785,12 @@
     """Functor that sends some AMI message"""
 
     def __init__(self, action_config):
-        self.add_app_channel = False if 'add-app-channel' not in action_config \
-            else action_config['add-app-channel']
-        self.add_control_channel = False if 'add-control-channel' not in action_config \
-            else action_config['add-control-channel']
-        if (self.add_app_channel and self.add_control_channel):
+        self.add_app_channel = action_config.get('add-app-channel') or False
+        self.add_control_channel = action_config.get('add-control-channel') or False
+        self.channel_id = action_config.get('channel-id') or None
+        if ((self.add_app_channel and self.add_control_channel) or
+            (self.add_app_channel and self.channel_id) or
+            (self.add_control_channel and self.channel_id)):
             raise Exception('Only one channel can be added to the message!')
         self.message_fields = action_config['fields']
 
@@ -795,7 +799,10 @@
             self.message_fields['Channel'] = channel_object.app_channel
         elif self.add_control_channel:
             self.message_fields['Channel'] = channel_object.controller_channel
-        LOGGER.debug("Sending message: %s" % str(self.message_fields))
+        elif self.channel_id:
+            test_object = AppTest.get_instance()
+            self.message_fields['Channel'] = test_object.get_channel_object(self.channel_id).app_channel
+        LOGGER.debug('Sending message: %s' % str(self.message_fields))
         channel_object.ami.sendMessage(self.message_fields)
 
 

Added: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/confbridge.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/confbridge.conf?view=auto&rev=4579
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/confbridge.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/confbridge.conf Sun Jan 19 13:00:58 2014
@@ -1,0 +1,13 @@
+[general]
+
+[default_user]
+type = user
+marked = yes
+
+[waitmarked_profile]
+type = user
+wait_marked = yes
+
+[default_bridge]
+type = bridge
+

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/extensions.conf?view=auto&rev=4579
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/extensions.conf Sun Jan 19 13:00:58 2014
@@ -1,0 +1,45 @@
+; Confbridge contexts and extensions
+
+[confbridge]
+
+exten => marked,1,NoOp()
+	same => n,ConfBridge(1)
+	same => n,Hangup()
+
+exten => waitmarked-1,1,NoOp()
+	same => n,ConfBridge(1,,waitmarked_profile)
+	same => n,Hangup()
+
+exten => waitmarked-2,1,NoOp()
+	same => n,ConfBridge(1,,waitmarked_profile)
+	same => n,Hangup()
+
+exten => waitmarked-3,1,NoOp()
+	same => n,ConfBridge(1,,waitmarked_profile)
+	same => n,Hangup()
+
+[default]
+
+exten => sendDTMF,1,NoOp()
+	same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+	same => n,SendDTMF(${DTMF_TO_SEND})
+	same => n,Goto(default,wait,1)
+
+exten => sendAudio,1,NoOp()
+	same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+	same => n,Playback(${TALK_AUDIO})
+	same => n,Goto(default,wait,1)
+
+exten => sendAudioWithDTMF,1,NoOp()
+	same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+	same => n,Playback(${TALK_AUDIO})
+	same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+	same => n,SendDTMF(${DTMF_TO_SEND})
+	same => n,Goto(default,wait,1)
+
+exten => hangup,1,NoOp()
+	same => n,Verbose(1, Hanging up)
+	same => n,Hangup()
+
+exten => wait,1,NoOp()
+	same => n,Wait(10000)

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/test-config.yaml?view=auto&rev=4579
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/test-config.yaml Sun Jan 19 13:00:58 2014
@@ -1,0 +1,252 @@
+testinfo:
+    summary: 'Test ConfBridge behavior when Marked/WaitMarked users are kicked'
+    description: |
+        This tests the behavior of ConfBridge with a Marked user and WaitMarked
+        users when those users are kicked out of the conference. This test
+        ensures that having a large number of users with different roles that
+        are booted quickly does not perturb the ConfBridge state transitions.
+        In this test, three WaitMarked users enter into a ConfBridge, followed
+        by a Marked user. When the Marked user joins, they are immediately
+        kicked from the conference. When the Marked user leaves, the three
+        WaitMarked users are also kicked from the Conference.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'apptest.AppTest'
+
+test-object-config:
+  app: 'ConfBridge'
+  scenarios:
+    -
+      events:
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeStart'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference Started'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'EMPTY'
+              NewState: 'INACTIVE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from EMPTY to INACTIVE'
+            -
+              action-type: 'start-call'
+              delay: 3
+              channel-id: 'Marked'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'INACTIVE'
+              NewState: 'MULTI_MARKED'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from INACTIVE to MULTI_MARKED'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'MULTI_MARKED'
+              NewState: 'INACTIVE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from MULTI_MARKED to INACTIVE'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'INACTIVE'
+              NewState: 'EMPTY'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from INACTIVE to EMPTY'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeEnd'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference Ended'
+            -
+              action-type: 'end-scenario'
+      channels:
+        -
+          channel-id: 'Marked'
+          channel-name: 'Local/marked at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: False
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/marked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Marked Join Event received'
+                -
+                  action-type: 'send-ami-message'
+                  channel-id: 'Marked'
+                  fields:
+                    Action: 'ConfbridgeKick'
+                    Conference: '1'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/marked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Marked Leave Event received'
+                -
+                  action-type: 'send-ami-message'
+                  channel-id: 'WaitMarked-1'
+                  fields:
+                    Action: 'ConfbridgeKick'
+                    Conference: '1'
+                -
+                  action-type: 'send-ami-message'
+                  channel-id: 'WaitMarked-2'
+                  fields:
+                    Action: 'ConfbridgeKick'
+                    Conference: '1'
+                -
+                  action-type: 'send-ami-message'
+                  channel-id: 'WaitMarked-3'
+                  fields:
+                    Action: 'ConfbridgeKick'
+                    Conference: '1'
+        -
+          channel-id: 'WaitMarked-1'
+          channel-name: 'Local/waitmarked-1 at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-1 at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-1 Join Event received'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-1 at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-1 Leave Event received'
+        -
+          channel-id: 'WaitMarked-2'
+          channel-name: 'Local/waitmarked-2 at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-2 at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-2 Join Event received'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-2 at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-2 Leave Event received'
+        -
+          channel-id: 'WaitMarked-3'
+          channel-name: 'Local/waitmarked-3 at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-3 at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-3 Join Event received'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked-3 at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-3 Leave Event received'
+
+
+properties:
+    minversion: '11.8.0'
+    tags:
+      - confbridge
+      - apps
+    dependencies:
+      - buildoption: 'TEST_FRAMEWORK'
+      - python : 'twisted'
+      - python : 'starpy'
+      - asterisk : 'app_confbridge'
+      - asterisk : 'app_senddtmf'
+      - asterisk : 'app_playback'
+

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_kick/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/confbridge.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/confbridge.conf?view=auto&rev=4579
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/confbridge.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/confbridge.conf Sun Jan 19 13:00:58 2014
@@ -1,0 +1,13 @@
+[general]
+
+[marked_profile]
+type = user
+marked = yes
+
+[waitmarked_profile]
+type = user
+wait_marked = yes
+
+[default_bridge]
+type = bridge
+

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/extensions.conf?view=auto&rev=4579
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/extensions.conf Sun Jan 19 13:00:58 2014
@@ -1,0 +1,37 @@
+; Confbridge contexts and extensions
+
+[confbridge]
+
+exten => marked,1,NoOp()
+	same => n,ConfBridge(1,,marked_profile)
+	same => n,Hangup()
+
+exten => waitmarked,1,NoOp()
+	same => n,ConfBridge(1,,waitmarked_profile)
+	same => n,Hangup()
+
+[default]
+
+exten => sendDTMF,1,NoOp()
+	same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+	same => n,SendDTMF(${DTMF_TO_SEND})
+	same => n,Goto(default,wait,1)
+
+exten => sendAudio,1,NoOp()
+	same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+	same => n,Playback(${TALK_AUDIO})
+	same => n,Goto(default,wait,1)
+
+exten => sendAudioWithDTMF,1,NoOp()
+	same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+	same => n,Playback(${TALK_AUDIO})
+	same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+	same => n,SendDTMF(${DTMF_TO_SEND})
+	same => n,Goto(default,wait,1)
+
+exten => hangup,1,NoOp()
+	same => n,Verbose(1, Hanging up)
+	same => n,Hangup()
+
+exten => wait,1,NoOp()
+	same => n,Wait(10000)

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/test-config.yaml?view=auto&rev=4579
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/test-config.yaml Sun Jan 19 13:00:58 2014
@@ -1,0 +1,478 @@
+testinfo:
+    summary: 'Test marked user/waitmarked user in a Conference'
+    description: |
+        This tests the behavior of ConfBridge with a Marked user and a WaitMarked
+        user. This involves three scenarios:
+        (1) A scenario that tests that when a WaitMarked user enters first and
+        leaves last, the conference puts them into an INACTIVE state
+        (2) A scenario that tests that when a Marked user enters first the
+        conference starts, but when the Marked user leaves the WaitMarked user
+        is put into an INACTIVE state
+        (3) A scenario that tests that a Marked user always keeps the conference
+        active, regardless of a WaitMarked user entering/leaving
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'apptest.AppTest'
+
+test-object-config:
+  app: 'ConfBridge'
+  scenarios:
+    -
+      # Scenario 1: WaitMarked user enters the conference; conference enters
+      # into the INACTIVE state. Marked user enters the conference; state
+      # changes to MULTI_MARKED. Marked user leaves, WaitMarked user is kept
+      # in the conference but the conference shifts to an INACTIVE state.
+      # WaitMarked user then leaves.
+      events:
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeStart'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference Started'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'EMPTY'
+              NewState: 'INACTIVE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from EMPTY to INACTIVE'
+            -
+              action-type: 'start-call'
+              delay: 3
+              channel-id: 'Marked'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'INACTIVE'
+              NewState: 'MULTI_MARKED'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from INACTIVE to MULTI_MARKED'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'MULTI_MARKED'
+              NewState: 'INACTIVE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from MULTI_MARKED to INACTIVE'
+            -
+              action-type: 'hangup'
+              delay: 2
+              channel-id: 'WaitMarked'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'INACTIVE'
+              NewState: 'EMPTY'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from INACTIVE to EMPTY'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeEnd'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference Ended'
+            -
+              action-type: 'end-scenario'
+      channels:
+        -
+          channel-id: 'Marked'
+          channel-name: 'Local/marked at confbridge'
+          context: 'default'
+          exten: 'wait'
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/marked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Marked-1 Join Event received'
+                -
+                  action-type: 'hangup'
+                  delay: 2
+                  channel-id: 'Marked'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/marked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Marked-1 Leave Event received'
+        -
+          channel-id: 'WaitMarked'
+          channel-name: 'Local/waitmarked at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-1 Join Event received'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-1 Leave Event received'
+    -
+      # Scenario 2: Marked user enters the conference; conference enters
+      # into the SINGLE state. WaitMarked user enters the conference; state
+      # changes to MULTI_MARKED. Marked user leaves, WaitMarked user is kept
+      # in the conference but the conference shifts to an INACTIVE state.
+      # WaitMarked user then leaves.
+      events:
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeStart'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference Started'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'EMPTY'
+              NewState: 'SINGLE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from EMPTY to SINGLE'
+            -
+              action-type: 'start-call'
+              delay: 3
+              channel-id: 'WaitMarked'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'SINGLE'
+              NewState: 'MULTI_MARKED'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from SINGLE to MULTI_MARKED'
+            -
+              action-type: 'hangup'
+              delay: 2
+              channel-id: 'Marked'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'MULTI_MARKED'
+              NewState: 'INACTIVE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from MULTI_MARKED to INACTIVE'
+            -
+              action-type: 'hangup'
+              delay: 2
+              channel-id: 'WaitMarked'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'INACTIVE'
+              NewState: 'EMPTY'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from INACTIVE to EMPTY'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeEnd'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference Ended'
+            -
+              action-type: 'end-scenario'
+      channels:
+        -
+          channel-id: 'Marked'
+          channel-name: 'Local/marked at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/marked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Marked-2 Join Event received'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/marked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Marked-2 Leave Event received'
+        -
+          channel-id: 'WaitMarked'
+          channel-name: 'Local/waitmarked at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: False
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-2 Join Event received'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-2 Leave Event received'
+    -
+      # Scenario 3: Marked user enters the conference; conference enters
+      # into the SINGLE state. WaitMarked user enters the conference; state
+      # changes to MULTI_MARKED. WaitMarked user leaves, conference shifts
+      # back to the SINGLE state. Marked user then leaves.
+      events:
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeStart'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference Started'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'EMPTY'
+              NewState: 'SINGLE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from EMPTY to SINGLE'
+            -
+              action-type: 'start-call'
+              delay: 3
+              channel-id: 'WaitMarked'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'SINGLE'
+              NewState: 'MULTI_MARKED'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from SINGLE to MULTI_MARKED'
+            -
+              action-type: 'hangup'
+              delay: 2
+              channel-id: 'WaitMarked'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'MULTI_MARKED'
+              NewState: 'SINGLE'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from MULTI_MARKED to SINGLE'
+            -
+              action-type: 'hangup'
+              delay: 2
+              channel-id: 'Marked'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'TestEvent'
+              State: 'CONF_CHANGE_STATE'
+              OldState: 'SINGLE'
+              NewState: 'EMPTY'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference transitioned from SINGLE to EMPTY'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeEnd'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Conference Ended'
+            -
+              action-type: 'end-scenario'
+      channels:
+        -
+          channel-id: 'Marked'
+          channel-name: 'Local/marked at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/marked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Marked-3 Join Event received'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/marked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Marked-3 Leave Event received'
+        -
+          channel-id: 'WaitMarked'
+          channel-name: 'Local/waitmarked at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: False
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-3 Join Event received'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/waitmarked at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'WaitMarked-3 Leave Event received'
+
+
+properties:
+    minversion: '11.8.0'
+    tags:
+      - confbridge
+      - apps
+    dependencies:
+      - buildoption: 'TEST_FRAMEWORK'
+      - python : 'twisted'
+      - python : 'starpy'
+      - asterisk : 'app_confbridge'
+      - asterisk : 'app_senddtmf'
+      - asterisk : 'app_playback'
+

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_waitmarked_single/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/apps/confbridge/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/tests.yaml?view=diff&rev=4579&r1=4578&r2=4579
==============================================================================

[... 12 lines stripped ...]



More information about the asterisk-commits mailing list