[svn-commits] jrose: testsuite/asterisk/trunk r4338 - in /asterisk/trunk/tests/apps/confbri...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Nov 11 14:30:29 CST 2013


Author: jrose
Date: Mon Nov 11 14:30:26 2013
New Revision: 4338

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4338
Log:
confbridge: Test dynamic menus

(issue ASTERISK-22760)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3000/

Added:
    asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/
    asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/
    asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/
    asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/confbridge.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/sip.conf   (with props)
    asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/apps/confbridge/tests.yaml

Added: asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/confbridge.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/confbridge.conf?view=auto&rev=4338
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/confbridge.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/confbridge.conf Mon Nov 11 14:30:26 2013
@@ -1,0 +1,12 @@
+[general]
+
+[test_menu]
+type = menu
+0 = playback(hello-world)
+1 = leave_conference
+
+[default_bridge]
+type = bridge
+
+[default_user]
+type = user

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

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

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

Added: asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/extensions.conf?view=auto&rev=4338
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/extensions.conf Mon Nov 11 14:30:26 2013
@@ -1,0 +1,66 @@
+; Confbridge contexts and extensions
+
+[confbridge]
+; Phase 0
+; 0 should perform conference exit
+exten => single_option, 1, NoOp()
+	same => n,Set(CONFBRIDGE(menu,0)=leave_conference)
+	same => n,ConfBridge(1)
+	same => n,UserEvent(TestStatus, status: ConfBridge exit)
+	same => n,Hangup()
+
+; Phase 1
+; 0 should perform playback while 1 performs conference exit
+exten => multiple_options, 1, NoOp()
+	same => n,Set(CONFBRIDGE(menu,0)=playback(tt-weasels))
+	same => n,Set(CONFBRIDGE(menu,1)=leave_conference)
+	same => n,ConfBridge(1)
+	same => n,UserEvent(TestStatus, status: ConfBridge exit)
+	same => n,Hangup()
+
+; Phase 2
+; 0 should be in tact from test_menu, 1 should have the test_menu option replaced with the dynamic menu option, 2 should be all new from the dynamic menu option.
+exten => template_override, 1, NoOp()
+	same => n,Set(CONFBRIDGE(menu,template)=test_menu)
+	same => n,Set(CONFBRIDGE(menu,1)=playback(tt-weasels))
+	same => n,Set(CONFBRIDGE(menu,2)=leave_conference)
+	same => n,ConfBridge(1)
+	same => n,UserEvent(TestStatus, status: ConfBridge exit)
+	same => n,Hangup()
+
+; Phase 3
+; None of the dynamic menu options should be used and everything from the test_menu profile should be in tact.
+exten => profile_argument, 1, NoOp()
+	same => n,Set(CONFBRIDGE(menu,1)=playback(tt-somethingwrong))
+	same => n,Set(CONFBRIDGE(menu,2)=playback(tt-somethingwrong))
+	same => n,ConfBridge(1,,,test_menu)
+	same => n,UserEvent(TestSTatus, status: ConfBridge exit)
+
+exten => h,1,NoOp()
+	same => n,UserEvent(TestStatus, status: Hangup exit)
+
+[default]
+
+exten => sendDTMF,1,NoOp()
+	same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+	same => n,SendDTMF(${DTMF_TO_SEND})
+	same => n,Goto(wait,1)
+
+exten => sendAudio,1,NoOp()
+	same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+	same => n,Playback(${TALK_AUDIO})
+	same => n,Goto(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(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_dynamic_menus/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/sip.conf?view=auto&rev=4338
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/sip.conf (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/configs/ast1/sip.conf Mon Nov 11 14:30:26 2013
@@ -1,0 +1,12 @@
+[general]
+bindaddr = 127.0.0.1
+
+[ast2_g722]
+type = friend
+context = confbridge
+fromuser = ast2_g722
+host = 127.0.0.2
+disallow = all
+allow = g722
+qualify = no
+insecure = invite

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

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

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

Added: asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/test-config.yaml?view=auto&rev=4338
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/test-config.yaml Mon Nov 11 14:30:26 2013
@@ -1,0 +1,391 @@
+testinfo:
+    summary: 'Basic functionality test for CONFBRIDGE dynamic menus.'
+    description: |
+        Uses the CONFBRIDGE dialplan function to test dynamic menu creation for
+        the following:
+        * That when a single option is applied, it gets applied and can be used
+        * That when multiple options are applied, each option gets applied and
+          can be used
+        * That when a template option is used it inherits options from the
+          template and replaces options from the template that were specified
+        * That when the application argument for using a menu profile is used,
+          the dynamic menu options are ignored
+        For each test, all of the expected menu actions are attempted and failure to hit
+        any of them will result in failure of the test.
+
+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: 'Phase 0: Conference Started'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeEnd'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Phase 0: Conference Ended'
+            -
+              action-type: 'end-scenario'
+      channels:
+        -
+          channel-id: 'SingleOption'
+          channel-name: 'LOCAL/single_option at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/single_option at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 0: Single Option Join Event received'
+                -
+                  action-type: 'send-dtmf'
+                  delay: '1'
+                  dtmf: '0'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'CONF_MENU_LEAVE'
+                  Channel: 'Local/single_option at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 0: Single Option Caller invoked menu action to leave conference.'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/single_option at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 0: Single Option Leave Event received'
+
+    -
+      events:
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeStart'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Phase 1: Conference Started'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeEnd'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Phase 1: Conference Ended'
+            -
+              action-type: 'end-scenario'
+      channels:
+        -
+          channel-id: 'MultipleOptions'
+          channel-name: 'LOCAL/multiple_options at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/multiple_options at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 1: Multiple Options Join Event received'
+                -
+                  action-type: 'send-dtmf'
+                  delay: '1'
+                  dtmf: '0'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'CONF_MENU_PLAYBACK'
+                  Channel: 'Local/multiple_options at confbridge-.*'
+                  Message: 'tt-weasels'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 1: Multiple Options DTMF option for "0" successfully executed playback of tt-weasels'
+                -
+                  action-type: 'send-dtmf'
+                  delay: '1'
+                  dtmf: '1'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'CONF_MENU_LEAVE'
+                  Channel: 'Local/multiple_options at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 1: Multiple Options Caller invoked menu action to leave conference.'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/multiple_options at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 1: Multiple Options Leave Event received'
+
+    -
+      events:
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeStart'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Phase 2: Conference Started'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeEnd'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Phase 2: Conference Ended'
+            -
+              action-type: 'end-scenario'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'CONF_MENU_PLAYBACK'
+              Message: 'tt-somethingwrong'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'fail-test'
+              message: 'Phase 2: Any test that plays tt-somethingwrong has failed us!'
+      channels:
+        -
+          channel-id: 'MultipleOptions'
+          channel-name: 'LOCAL/template_override at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/template_override at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 2: Multiple Options Join Event received'
+                -
+                  action-type: 'send-dtmf'
+                  delay: '1'
+                  dtmf: '0'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'CONF_MENU_PLAYBACK'
+                  Channel: 'Local/template_override at confbridge-.*'
+                  Message: 'hello-world'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 2: Multiple Options DTMF option for "0" successfully executed playback of hello-world'
+                -
+                  action-type: 'send-dtmf'
+                  delay: '1'
+                  dtmf: '1'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'CONF_MENU_PLAYBACK'
+                  Channel: 'Local/template_override at confbridge-.*'
+                  Message: 'tt-weasels'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 2: Multiple Options DTMF option for "0" successfully executed playback of tt-weasels'
+                -
+                  action-type: 'send-dtmf'
+                  delay: '1'
+                  dtmf: '2'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'CONF_MENU_LEAVE'
+                  Channel: 'Local/template_override at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 2: Multiple Options Caller invoked menu action to leave conference.'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/template_override at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 2: Multiple Options Leave Event received'
+
+    -
+      events:
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeStart'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Phase 3: Conference Started'
+        -
+          type: 'headermatch'
+          conditions:
+            match:
+              Event: 'ConfbridgeEnd'
+              Conference: '1'
+          actions:
+            -
+              action-type: 'set-expected-result'
+              expected-result: 'Phase 3: Conference Ended'
+            -
+              action-type: 'end-scenario'
+      channels:
+        -
+          channel-id: 'MultipleOptions'
+          channel-name: 'LOCAL/profile_argument at confbridge'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeJoin'
+                  Conference: '1'
+                  Channel: 'Local/profile_argument at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 3: Profile Specified Join Event received'
+                -
+                  action-type: 'send-dtmf'
+                  delay: '1'
+                  dtmf: '0'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'CONF_MENU_PLAYBACK'
+                  Channel: 'Local/profile_argument at confbridge-.*'
+                  Message: 'hello-world'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 3: Profile Specified DTMF option for "0" successfully executed playback of tt-weasels'
+                -
+                  action-type: 'send-dtmf'
+                  delay: '1'
+                  dtmf: '1'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'TestEvent'
+                  State: 'CONF_MENU_LEAVE'
+                  Channel: 'Local/profile_argument at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 3: Profile Specified Caller invoked menu action to leave conference.'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'ConfbridgeLeave'
+                  Conference: '1'
+                  Channel: 'Local/profile_argument at confbridge-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Phase 3: Profile Specified Leave Event received'
+
+properties:
+    minversion: '13.0.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_dynamic_menus/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/confbridge/confbridge_dynamic_menus/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=4338&r1=4337&r2=4338
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/tests.yaml (original)
+++ asterisk/trunk/tests/apps/confbridge/tests.yaml Mon Nov 11 14:30:26 2013
@@ -3,3 +3,4 @@
     - test: 'confbridge_marked'
     - test: 'confbridge_nominal'
     - test: 'confbridge_recording'
+    - test: 'confbridge_dynamic_menus'




More information about the svn-commits mailing list