[asterisk-commits] mjordan: testsuite/asterisk/trunk r4822 - in /asterisk/trunk/tests/apps/confb...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Mar 8 15:21:35 CST 2014
Author: mjordan
Date: Sat Mar 8 15:21:29 2014
New Revision: 4822
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4822
Log:
conbridge_triple_lindy: Add tests for waitmarked, marked, and normal users
This test covers the interaction of marked, waitmarked, and normal users in a
ConfBridge conference. In general, the test checks that waitmarked/marked
interaction still occurs properly even when a user who is neither marked nor
waitmarked is present.
It contains four scenarios:
- A waitmarked user joins, followed by a normal user, followed by a marked
user. The marked user leaves the conference first, forcing the waitmarked
user back into a holding state.
- A waitmarked user joins, followed by a marked user, followed by a normal
user. Again, the marked user leaves the conference first, forcing the
waitmarked user back into a holding state.
- A normal user joins, followed by waitmarked user, followed by a marked
user. The marked user leaves the conference, followed by both the normal and
the waitmarked users.
- A normal user joins, followed by the marked user, followed by the waitmarked
user. This checks that the waitmarked user is immediately put in the
conference.
Review: https://reviewboard.asterisk.org/r/3308/
(closes issue ASTERISK-23301)
Reported by: Matt Jordan
patches:
rb3308.patch uploaded by bford (license 6580)
Added:
asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/
asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/
asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/
asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/confbridge.conf (with props)
asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/apps/confbridge/tests.yaml
Added: asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/confbridge.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/confbridge.conf?view=auto&rev=4822
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/confbridge.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/confbridge.conf Sat Mar 8 15:21:29 2014
@@ -1,0 +1,17 @@
+[general]
+
+[waitmarked_profile]
+type = user
+wait_marked = yes
+music_on_hold_when_empty = yes
+
+[marked_profile]
+type = user
+marked = yes
+
+[normal_profile]
+type = user
+music_on_hold_when_empty = yes
+
+[default_bridge]
+type = bridge
Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/confbridge.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/extensions.conf?view=auto&rev=4822
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/extensions.conf Sat Mar 8 15:21:29 2014
@@ -1,0 +1,47 @@
+; Confbridge test for multiple scenarios involving waitmarked, marked,
+; and normal users
+
+; ----------------------------------------------------------------------
+; ***Required***
+; ----------------------------------------------------------------------
+[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)
+
+; ----------------------------------------------------------------------
+; Puts users in the confbridge.
+; ----------------------------------------------------------------------
+[confbridge]
+
+exten => waitmarked-user,1,NoOp()
+ same => n,ConfBridge(1,,waitmarked_profile)
+ same => n,Hangup()
+
+exten => marked-user,1,NoOp()
+ same => n,ConfBridge(1,,marked_profile)
+ same => n,Hangup()
+
+exten => normal-user,1,NoOp()
+ same => n,ConfBridge(1,,normal_profile)
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/test-config.yaml?view=auto&rev=4822
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_triple_lindy/test-config.yaml Sat Mar 8 15:21:29 2014
@@ -1,0 +1,1104 @@
+testinfo:
+ summary: 'Tests interactions between waitmarked, marked, and unmarked users.'
+ description:
+ This test includes a few scenarios involving waitmarked, marked, and normal
+ users joining and leaving a Conference at different times.
+ The first scenario starts with a waitmarked, followed by a normal, and
+ then by a marked. The marked user will then leave the Conference.
+ The second scenario is the same, except the normal and marked users switch
+ entering times.
+ The third scenario starts with a normal user entering the Conference, followed
+ by a waitmarked user that should be put in a waiting state until the marked
+ user joins, where all users will be joined in the same Conference.
+ The fourth scenario is the same, except the waitmarked and marked users
+ switch entering times, meaning that the waitmarked user should immediately
+ be placed into the Conference.
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'apptest.AppTest'
+
+test-object-config:
+ app: 'ConfBridge'
+ scenarios:
+ -
+ # Scenario 1
+ # A waitmarked user enters the Conference and is played music on hold. A
+ # normal user enters the Conference after that, and the waitmarked user
+ # should continue to hear music on hold. After that, a marked user will join
+ # the Conference, and the waitmarked user should then be placed into the
+ # Conference with the other 2 users. Finally, the marked user will leave
+ # the Conference, and the waitmarked should once again hear music on hold,
+ # and the normal user should hear music on hold as well.
+ 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'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'CONF_CHANGE_STATE'
+ OldState: 'INACTIVE'
+ NewState: 'SINGLE'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Conference transitioned from INACTIVE to SINGLE'
+ -
+ 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'
+ -
+ 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'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'CONF_CHANGE_STATE'
+ OldState: 'SINGLE'
+ NewState: 'INACTIVE'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Conference transitioned from SINGLE 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'
+ delay: 2
+ expected-result: 'Conference Ended'
+ -
+ action-type: 'end-scenario'
+ channels:
+ -
+ channel-id: 'Waitmarked-user'
+ channel-name: 'Local/waitmarked-user at confbridge'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeJoin'
+ Conference: '1'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Waitmarked user joined Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeLeave'
+ Conference: '1'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Waitmarked user left Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold started for waitmarked user'
+ -
+ action-type: 'start-call'
+ delay: 1
+ channel-id: 'Normal-user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStop'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold stopped for waitmarked user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ Message: 'conf-waitforleader'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Waitmarked user heard conf-waitforleader.'
+ -
+ channel-id: 'Normal-user'
+ channel-name: 'Local/normal-user at confbridge'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeJoin'
+ Conference: '1'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Normal user joined Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeLeave'
+ Conference: '1'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Normal user left Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold started for normal user'
+ -
+ action-type: 'start-call'
+ delay: 1
+ channel-id: 'Marked-user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStop'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold stopped for normal user'
+ -
+ channel-id: 'Marked-user'
+ channel-name: 'Local/marked-user at confbridge'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeJoin'
+ Conference: '1'
+ Channel: 'Local/marked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user joined Conference'
+ -
+ action-type: 'hangup'
+ delay: 2
+ -
+ action-type: 'hangup'
+ delay: 2
+ channel-id: 'Normal-user'
+ -
+ action-type: 'hangup'
+ delay: 2
+ channel-id: 'Waitmarked-user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeLeave'
+ Conference: '1'
+ Channel: 'Local/marked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user left Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/marked-user at confbridge-.*'
+ Message: 'conf-placeintoconf'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user heard conf-placeintoconf'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/marked-user at confbridge-.*'
+ Message: 'confbridge-join'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user heard confbridge-join'
+ -
+ # Scenario 2
+ # This scenario starts off the same as scenario 1, but the normal user leaves
+ # the Conference first. The waitmarked user should remain in the Conference with
+ # the marked user and not be played music on hold since a marked user is still
+ # present.
+ 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'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'CONF_CHANGE_STATE'
+ OldState: 'INACTIVE'
+ NewState: 'SINGLE'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Conference transitioned from INACTIVE to SINGLE'
+ -
+ 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'
+ -
+ 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'
+ delay: 2
+ expected-result: 'Conference Ended'
+ -
+ action-type: 'end-scenario'
+ channels:
+ -
+ channel-id: 'Waitmarked-user'
+ channel-name: 'Local/waitmarked-user at confbridge'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeJoin'
+ Conference: '1'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Waitmarked user joined Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeLeave'
+ Conference: '1'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Waitmarked user left Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold started for waitmarked user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStop'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold stopped for waitmarked user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ Message: 'conf-waitforleader'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Waitmarked user heard conf-waitforleader.'
+ -
+ action-type: 'start-call'
+ delay: 1
+ channel-id: 'Normal-user'
+ -
+ channel-id: 'Normal-user'
+ channel-name: 'Local/normal-user at confbridge'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeJoin'
+ Conference: '1'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Normal user joined Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeLeave'
+ Conference: '1'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Normal user left Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold started for normal user'
+ -
+ action-type: 'start-call'
+ delay: 1
+ channel-id: 'Marked-user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStop'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold stopped for normal user'
+ -
+ channel-id: 'Marked-user'
+ channel-name: 'Local/marked-user at confbridge'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeJoin'
+ Conference: '1'
+ Channel: 'Local/marked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user joined Conference'
+ -
+ action-type: 'hangup'
+ delay: 2
+ channel-id: 'Normal-user'
+ -
+ action-type: 'hangup'
+ delay: 2
+ -
+ action-type: 'hangup'
+ delay: 2
+ channel-id: 'Waitmarked-user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeLeave'
+ Conference: '1'
+ Channel: 'Local/marked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user left Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/marked-user at confbridge-.*'
+ Message: 'conf-placeintoconf'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user heard conf-placeintoconf'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/marked-user at confbridge-.*'
+ Message: 'confbridge-join'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user heard confbridge-join'
+ -
+ # Scenario 3
+ # In this scenario, the normal user is the first to join the Conference.
+ # After that, the waitmarked user joins and should be played music on hold.
+ # Then, the marked user should join the Conference and the waitmarked user
+ # and normal user should be placed into the Conference and not receive
+ # music on hold stop events.
+ events:
+ -
+ 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'
+ -
+ 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'
+ -
+ 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'
+ -
+ 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'
+ delay: 2
+ expected-result: 'Conference ended'
+ -
+ action-type: 'end-scenario'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'CONF_CHANGE_STATE'
+ NewState: 'INACTIVE'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'Conference state should never be INACTIVE'
+ channels:
+ -
+ channel-id: 'Normal-user'
+ channel-name: 'Local/normal-user at confbridge'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeJoin'
+ Conference: '1'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Normal user joined Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeLeave'
+ Conference: '1'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Normal user left Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold started for normal user'
+ -
+ action-type: 'start-call'
+ delay: 1
+ channel-id: 'Waitmarked-user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStop'
+ Channel: 'Local/normal-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold stopped for normal user'
+ -
+ channel-id: 'Waitmarked-user'
+ channel-name: 'Local/waitmarked-user at confbridge'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeJoin'
+ Conference: '1'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Waitmarked user joined Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeLeave'
+ Conference: '1'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Waitmarked user left Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold started for waitmarked user'
+ -
+ action-type: 'start-call'
+ delay: 1
+ channel-id: 'Marked-user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStop'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHold stopped for waitmarked user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/waitmarked-user at confbridge-.*'
+ Message: 'conf-waitforleader'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Waitmarked user heard conf-waitforleader.'
+ -
+ channel-id: 'Marked-user'
+ channel-name: 'Local/marked-user at confbridge'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeJoin'
+ Conference: '1'
+ Channel: 'Local/marked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user joined Conference'
+ -
+ action-type: 'hangup'
+ delay: 2
+ -
+ action-type: 'hangup'
+ delay: 2
+ channel-id: 'Waitmarked-user'
+ -
+ action-type: 'hangup'
+ delay: 2
+ channel-id: 'Normal-user'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'ConfbridgeLeave'
+ Conference: '1'
+ Channel: 'Local/marked-user at confbridge-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user left Conference'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/marked-user at confbridge-.*'
+ Message: 'conf-placeintoconf'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user heard conf-placeintoconf'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/marked-user at confbridge-.*'
+ Message: 'confbridge-join'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Marked user heard confbridge-join'
+ -
+ # Scenario 4
+ # In this scenario, the normal user enters the Conference first, followed by
+ # the marked user. The waitmarked user should then join the Conference, and
+ # should immediately be placed into the Conference with the other 2 users. If
+ # music on hold is played to the waitmarked user, the test should fail.
+ events:
+ -
+ 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'
+ -
+ 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'
+ -
+ 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'
+ -
+ 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'
+ delay: 2
+ expected-result: 'Conference ended'
+ -
+ action-type: 'end-scenario'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'CONF_CHANGE_STATE'
+ NewState: 'INACTIVE'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'Conference state should never be INACTIVE'
+ channels:
+ -
+ channel-id: 'Normal-user'
+ channel-name: 'Local/normal-user at confbridge'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
[... 195 lines stripped ...]
More information about the asterisk-commits
mailing list