[asterisk-commits] mjordan: testsuite/asterisk/trunk r6333 - in /asterisk/trunk/tests/apps/dial/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 21 07:24:01 CST 2015


Author: mjordan
Date: Wed Jan 21 07:23:55 2015
New Revision: 6333

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6333
Log:
apps/dial/mid_call_events/dial_{gosub|macro}: Verify off-nominal return values

This patch updates the mid call events tests to verify that mid-call
Macros/GoSubs whose MACRO_RESULT/GOSUB_RESULT is set to an unknown value does
not result in multiple DialEnd events. The test spawns an additional channel
that calls a mid-call Macro/GoSub that returns, in its variable, a value that
the Dial application does not understand. The test verifies that the two
channels are bridged as expected, and that only a single DialEnd event is
received.


Modified:
    asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/ast1/extensions.conf
    asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/test-config.yaml
    asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf
    asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/test-config.yaml

Modified: asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/ast1/extensions.conf?view=diff&rev=6333&r1=6332&r2=6333
==============================================================================
--- asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/ast1/extensions.conf Wed Jan 21 07:23:55 2015
@@ -44,6 +44,10 @@
  same => n,UserEvent(Jump, result: failed)
  same => n,Hangup()
 
+exten => invalid,1,NoOp()
+ same => n,Dial(Local/target,,U(mid_call^BLAH))
+ same => n,Hangup()
+
 exten => target,1,NoOp()
  same => n,Answer()
  same => n,Echo()

Modified: asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/test-config.yaml?view=diff&rev=6333&r1=6332&r2=6333
==============================================================================
--- asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/test-config.yaml Wed Jan 21 07:23:55 2015
@@ -22,6 +22,14 @@
         minversion: '12.0.0'
         config-section: cdr-config-12
         typename: 'cdr.CDRModule'
+      -
+        config-section: 'hangup-bridged'
+        typename: 'pluggable_modules.AMIChannelHangup'
+        maxversion: '12.0.0'
+      -
+        config-section: 'hangup-bridged-12'
+        typename: 'pluggable_modules.AMIChannelHangup'
+        minversion: '12.0.0'
 
 
 test-config:
@@ -47,6 +55,9 @@
     -
       channel: 'Local/goto_full at default'
       application: 'Echo'
+    -
+      channel: 'Local/invalid at default'
+      application: 'Echo'
 
 ami-config:
   -
@@ -55,7 +66,7 @@
       match:
           Event: 'UserEvent'
           UserEvent: 'MidCall'
-    count: '6'
+    count: '7'
   -
     type: 'headermatch'
     conditions:
@@ -122,6 +133,33 @@
     requirements:
         DestChannel: 'Local/target-.{8};1'
         DialStatus: 'GOTO:goto_full_context,goto_full_jump,1'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/invalid at default-.{8};2'
+      requirements:
+        DestChannel: 'Local/target at default-.{8};1'
+        DialStatus: 'ANSWER'
+    count: '1'
+
+hangup-bridged-12:
+    type: 'headermatch'
+    delay: 2
+    conditions:
+        match:
+            Event: 'BridgeEnter'
+            Channel: 'Local/invalid at default-.{8};2'
+
+hangup-bridged:
+    type: 'headermatch'
+    delay: 2
+    conditions:
+        match:
+            Event: 'VarSet'
+            Variable: 'BRIDGEPEER'
+            Value: 'Local/invalid at default-.*'
 
 cdr-config-12:
     -
@@ -247,12 +285,32 @@
                 lastapp: 'Dial'
                 disposition: 'FAILED'
                 amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'invalid'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/invalid at default-.{8};2'
+                dchannel: 'Local/target at default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                dcontext: 'default'
+                lastapp: 'Echo'
+            -
+                dcontext: 'default'
+                lastapp: 'Echo'
 
 properties:
-    minversion: '1.8.0.0'
+    minversion: ['1.8.0.0', '11.0.0', '13.2.0']
     dependencies:
         - python : 'twisted'
         - python : 'starpy'
+        - asterisk: 'app_dial'
+        - asterisk: 'app_echo'
+        - asterisk: 'app_stack'
+        - asterisk: 'app_userevent'
     tags:
         - dial
         - CDR

Modified: asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf?view=diff&rev=6333&r1=6332&r2=6333
==============================================================================
--- asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf Wed Jan 21 07:23:55 2015
@@ -42,6 +42,10 @@
  same => n,UserEvent(Jump, result: failed)
  same => n,Hangup()
 
+exten => invalid,1,NoOp()
+ same => n,Dial(Local/target,,M(mid_call^BLAH))
+ same => n,Hangup()
+
 exten => target,1,NoOp()
  same => n,Answer()
  same => n,Echo()

Modified: asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/test-config.yaml?view=diff&rev=6333&r1=6332&r2=6333
==============================================================================
--- asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/test-config.yaml Wed Jan 21 07:23:55 2015
@@ -22,7 +22,14 @@
         minversion: '12.0.0'
         config-section: cdr-config-12
         typename: 'cdr.CDRModule'
-
+      -
+        config-section: 'hangup-bridged'
+        typename: 'pluggable_modules.AMIChannelHangup'
+        maxversion: '12.0.0'
+      -
+        config-section: 'hangup-bridged-12'
+        typename: 'pluggable_modules.AMIChannelHangup'
+        minversion: '12.0.0'
 
 test-config:
   spawn-after-hangup: True
@@ -47,6 +54,9 @@
     -
       channel: 'Local/goto_full at default'
       application: 'Echo'
+    -
+      channel: 'Local/invalid at default'
+      application: 'Echo'
 
 ami-config:
   -
@@ -55,7 +65,7 @@
       match:
           Event: 'UserEvent'
           UserEvent: 'MidCall'
-    count: '6'
+    count: '7'
   -
     type: 'headermatch'
     conditions:
@@ -122,6 +132,33 @@
     requirements:
         DestChannel: 'Local/target-.{8};1'
         DialStatus: 'GOTO:goto_full_context,goto_full_jump,1'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/invalid at default-.{8};2'
+      requirements:
+        DestChannel: 'Local/target at default-.{8};1'
+        DialStatus: 'ANSWER'
+    count: '1'
+
+hangup-bridged-12:
+    type: 'headermatch'
+    delay: 2
+    conditions:
+        match:
+            Event: 'BridgeEnter'
+            Channel: 'Local/invalid at default-.{8};2'
+
+hangup-bridged:
+    type: 'headermatch'
+    delay: 2
+    conditions:
+        match:
+            Event: 'VarSet'
+            Variable: 'BRIDGEPEER'
+            Value: 'Local/invalid at default-.*'
 
 cdr-config-12:
     -
@@ -247,12 +284,32 @@
                 lastapp: 'Dial'
                 disposition: 'FAILED'
                 amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'invalid'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/invalid at default-.{8};2'
+                dchannel: 'Local/target at default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                dcontext: 'default'
+                lastapp: 'Echo'
+            -
+                dcontext: 'default'
+                lastapp: 'Echo'
 
 properties:
-    minversion: '1.8.0.0'
+    minversion: ['1.8.0.0', '11.0.0', '13.2.0']
     dependencies:
         - python : 'twisted'
         - python : 'starpy'
+        - asterisk: 'app_dial'
+        - asterisk: 'app_echo'
+        - asterisk: 'app_macro'
+        - asterisk: 'app_userevent'
     tags:
         - dial
         - CDR




More information about the asterisk-commits mailing list