[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-commits
Subject:    [asterisk-commits] mjordan: testsuite/asterisk/trunk r4642 - in /asterisk/trunk/tests/apps/dial:...
From:       SVN commits to the Asterisk project <asterisk-commits () lists ! digium ! com>
Date:       2014-01-31 23:05:44
Message-ID: mailman.24578.1391209098.10514.asterisk-commits () lists ! digium ! com
[Download RAW message or body]

Author: mjordan
Date: Fri Jan 31 17:05:42 2014
New Revision: 4642

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4642
Log:
dial: Add tests for post-dial/mid-call actions/events

Mid-call events, the 'h' extension, and moving channels around during/after a
Dial operation can cause lots of strange dialplan execution. For systems that
base their state partially on this dialplan execution (such as CDRs), this
can be tricky to handle. These tests verify the dialplan execution for these
options.

These tests include:

 * Mid-call events (GoSub/Macro): ensure that we don't get extra CDR records;
   that the application is still Dial after dialplan execution in the final
   record; and that the dial status afterwards is the result of the
   GoSub/Macro evaluation
 * After-bridge actions: This includes the F,G, and g option. Some of these
   are after-bridge, some prevent the bridge from happening in the first
   place. The tests verify that the correct dialplan actions take place, and
   for Asterisk 12 and later, that the expected CDR entries are created.
 * 'h' extension execution of the peer. This should not only happen, but
   not create an extra CDR.

(issue ASTERISK-23164)

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

Added:
    asterisk/trunk/tests/apps/dial/action_post_answer/
    asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/
    asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/configs/
    asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/configs/ast1/
  asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/configs/ast1/extensions.conf \
(with props)  asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml \
(with props)  asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/
    asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/configs/
    asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/configs/ast1/
    asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/configs/ast1/extensions.conf \
(with props)  asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml \
(with props)  asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/
    asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/
    asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/
    asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf \
(with props)  asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml \
(with props)  asterisk/trunk/tests/apps/dial/action_post_answer/tests.yaml   (with \
props)  asterisk/trunk/tests/apps/dial/mid_call_events/
    asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/
    asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/
    asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/ast1/
    asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/ast1/extensions.conf \
(with props)  asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/test-config.yaml \
(with props)  asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/
    asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/
    asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/
    asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf \
(with props)  asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/test-config.yaml \
(with props)  asterisk/trunk/tests/apps/dial/mid_call_events/tests.yaml   (with \
props)  asterisk/trunk/tests/apps/dial/peer_h_exten/
    asterisk/trunk/tests/apps/dial/peer_h_exten/configs/
    asterisk/trunk/tests/apps/dial/peer_h_exten/configs/ast1/
    asterisk/trunk/tests/apps/dial/peer_h_exten/configs/ast1/extensions.conf   (with \
props)  asterisk/trunk/tests/apps/dial/peer_h_exten/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/apps/dial/tests.yaml

Added: asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/configs/ast1/extensions.conf
                
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/configs/ast1/extensions.conf?view=auto&rev=4642
 ==============================================================================
--- asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/configs/ast1/extensions.conf \
                (added)
+++ asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/configs/ast1/extensions.conf \
Fri Jan 31 17:05:42 2014 @@ -1,0 +1,27 @@
+
+[default]
+
+exten => priority,1,NoOp()
+ same => n,Set(TIMEOUT(absolute)=2)
+ same => n,Dial(Local/target,,F)
+ same => n,UserEvent(Continue, result: passed)
+ same => n,Wait(1)
+ same => n,Hangup()
+
+exten => transfer,1,NoOp()
+ same => n,Set(TIMEOUT(absolute)=2)
+ same => n,Dial(Local/target,,F(other^jump^1))
+ same => n,UserEvent(Continue, result: failed)
+ same => n,Hangup()
+
+exten => target,1,NoOp()
+ same => n,Set(CDR_PROP(disable)=True)
+ same => n,Answer()
+ same => n,Echo()
+
+[other]
+
+exten => jump,1,NoOp()
+ same => n,UserEvent(Continue, result: passed)
+ same => n,Wait(1)
+ same => n,Hangup()

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/configs/ast1/extensions.conf
                
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/configs/ast1/extensions.conf
                
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml
                
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml?view=auto&rev=4642
 ==============================================================================
--- asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml \
                (added)
+++ asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml \
Fri Jan 31 17:05:42 2014 @@ -1,0 +1,106 @@
+testinfo:
+    summary: 'Test the F option for the Dial application (called party continue)'
+    description: |
+        This test covers two scenarios:
+        (1) It verifies that if the F option is specified to the Dial application,
+            that the called party continues on in the dialplan at priority + 1 after
+            the caller hangs up.
+        (2) It verifies that if the F option is specified with a parseable goto
+            provided to it, that the called party is transferred to that extension
+            after the caller hangs up.
+
+test-modules:
+    test-object:
+        config-section: test-config
+        typename: 'test_case.SimpleTestCase'
+    modules:
+      -
+        config-section: 'ami-config'
+        typename: 'ami.AMIEventModule'
+      -
+        minversion: '12.0.0'
+        config-section: cdr-config-12
+        typename: 'cdr.CDRModule'
+
+test-config:
+  spawn-after-hangup: True
+  expected_events: 0
+  ignore-originate-failures: True
+  test-iterations:
+    -
+      channel: 'Local/priority@default'
+      context: 'default'
+      exten: 'target'
+      priority: '1'
+    -
+      channel: 'Local/transfer@default'
+      context: 'default'
+      exten: 'target'
+      priority: '1'
+
+ami-config:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'Continue'
+          Channel: 'Local/target@default-.{8};1'
+    requirements:
+      match:
+          result: 'passed'
+    count: '2'
+
+cdr-config-12:
+    -
+        file: 'Master'
+        lines:
+            -
+                accountcode: ''
+                destination: 'priority'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/priority@default-.{8};2'
+                dchannel: 'Local/target@default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'priority'
+                dcontext: 'default'
+                callerid: '"" <priority>'
+                channel: 'Local/target@default-.{8};1'
+                dchannel: ''
+                lastapp: 'Hangup'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'transfer'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/transfer@default-.{8};2'
+                dchannel: 'Local/target@default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'jump'
+                dcontext: 'other'
+                callerid: '"" <transfer>'
+                channel: 'Local/target@default-.{8};1'
+                dchannel: ''
+                lastapp: 'Hangup'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+
+
+properties:
+    minversion: '1.8.0.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+    tags:
+        - dial

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml
                
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml
                
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml
                
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/configs/ast1/extensions.conf
                
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/configs/ast1/extensions.conf?view=auto&rev=4642
 ==============================================================================
--- asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/configs/ast1/extensions.conf \
                (added)
+++ asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/configs/ast1/extensions.conf \
Fri Jan 31 17:05:42 2014 @@ -1,0 +1,18 @@
+
+[default]
+
+exten => set_timeout,1,NoOp()
+ same => n,Set(TIMEOUT(absolute)=2)
+ same => n,Return()
+
+exten => continue,1,NoOp()
+ same => n,Dial(Local/target,,gb(default^set_timeout^1))
+ same => n,UserEvent(Continue, result: passed)
+ same => n,Wait(1)
+ same => n,Hangup()
+
+exten => target,1,NoOp()
+ same => n,Set(CDR_PROP(disable)=True)
+ same => n,Answer()
+ same => n,Echo()
+

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/configs/ast1/extensions.conf
                
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/configs/ast1/extensions.conf
                
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml
                
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml?view=auto&rev=4642
 ==============================================================================
--- asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml \
                (added)
+++ asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml \
Fri Jan 31 17:05:42 2014 @@ -1,0 +1,78 @@
+testinfo:
+    summary: 'Test the g option for the Dial application (caller continue)'
+    description: |
+        This test verifies that providing the 'g' option to the Dial application
+        will result in the caller continuing on in the dialplan if the called
+        party hangs up.
+
+test-modules:
+    test-object:
+        config-section: test-config
+        typename: 'test_case.SimpleTestCase'
+    modules:
+      -
+        config-section: 'ami-config'
+        typename: 'ami.AMIEventModule'
+      -
+        minversion: '12.0.0'
+        config-section: cdr-config-12
+        typename: 'cdr.CDRModule'
+
+
+test-config:
+  spawn-after-hangup: True
+  expected_events: 0
+  ignore-originate-failures: True
+  test-iterations:
+    -
+      channel: 'Local/continue@default'
+      context: 'default'
+      exten: 'target'
+      priority: '1'
+
+ami-config:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'Continue'
+          Channel: 'Local/continue@default-.{8};2'
+    requirements:
+      match:
+          result: 'passed'
+    count: '1'
+
+cdr-config-12:
+    -
+        file: 'Master'
+        lines:
+            -
+                accountcode: ''
+                destination: 'continue'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/continue@default-.{8};2'
+                dchannel: 'Local/target@default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'continue'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/continue@default-.{8};2'
+                dchannel: ''
+                lastapp: 'Hangup'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+
+
+properties:
+    minversion: '1.8.0.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+    tags:
+        - dial

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml
                
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml
                
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml
                
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf
                
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf?view=auto&rev=4642
 ==============================================================================
--- asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf \
                (added)
+++ asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf \
Fri Jan 31 17:05:42 2014 @@ -1,0 +1,31 @@
+
+[default]
+
+exten => transfer,1,NoOp()
+ same => n,Dial(Local/target,,G(other^jump^1))
+ same => n,UserEvent(Jump, result: failed)
+ same => n,Hangup()
+
+exten => target,1,NoOp()
+ same => n,Set(CDR_PROP(disable)=True)
+ same => n,Answer()
+ same => n,Echo()
+
+[other]
+
+exten => jump,1,Goto(jump_caller,1)
+ same => n,Goto(jump_callee,1)
+ same => n,UserEvent(Jump, result: failed)
+ same => n,Hangup()
+
+exten => jump_caller,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(2)
+ same => n,UserEvent(Jump, result: passed)
+ same => n,Hangup()
+
+exten => jump_callee,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(1)
+ same => n,UserEvent(Jump, result: passed)
+ same => n,Hangup()

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf
                
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf
                
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml
                
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml?view=auto&rev=4642
 ==============================================================================
--- asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml \
                (added)
+++ asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml \
Fri Jan 31 17:05:42 2014 @@ -1,0 +1,102 @@
+testinfo:
+    summary: 'Test the G option for the Dial application (party disperse)'
+    description: |
+        This test verifies what is probably the weirdest option in Dial:
+        the dreaded 'G' option. This option causes the caller/callee to not
+        be bridged, but instead transfers both parties to different locations
+        in the dialplan. In the case of the caller, it is transferred to the
+        parseable goto location provided with the G option; in the case of the
+        called party, it is transferred to the priority + 1 of the same location.
+
+test-modules:
+    test-object:
+        config-section: test-config
+        typename: 'test_case.SimpleTestCase'
+    modules:
+      -
+        config-section: 'ami-config'
+        typename: 'ami.AMIEventModule'
+      -
+        minversion: '12.0.0'
+        config-section: cdr-config-12
+        typename: 'cdr.CDRModule'
+
+test-config:
+  spawn-after-hangup: True
+  expected_events: 0
+  ignore-originate-failures: True
+  test-iterations:
+    -
+      channel: 'Local/transfer@default'
+      context: 'default'
+      exten: 'target'
+      priority: '1'
+
+ami-config:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'Jump'
+          Exten: 'jump_caller'
+    requirements:
+      match:
+          result: 'passed'
+    count: '1'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'Jump'
+          Exten: 'jump_callee'
+    requirements:
+      match:
+          result: 'passed'
+    count: '1'
+
+
+cdr-config-12:
+    -
+        file: 'Master'
+        lines:
+            -
+                accountcode: ''
+                destination: 'jump_callee'
+                dcontext: 'other'
+                callerid: '"" <transfer>'
+                channel: 'Local/target@default-.{8};1'
+                dchannel: ''
+                lastapp: 'Hangup'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'jump'
+                dcontext: 'other'
+                callerid: '"" <>'
+                channel: 'Local/transfer@default-.{8};2'
+                dchannel: 'Local/target@default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'jump_caller'
+                dcontext: 'other'
+                callerid: '"" <>'
+                channel: 'Local/transfer@default-.{8};2'
+                dchannel: ''
+                lastapp: 'Hangup'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+
+
+properties:
+    minversion: '1.8.0.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+    tags:
+        - dial

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml
                
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml
                
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml
                
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/dial/action_post_answer/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/action_post_answer/tests.yaml?view=auto&rev=4642
 ==============================================================================
--- asterisk/trunk/tests/apps/dial/action_post_answer/tests.yaml (added)
+++ asterisk/trunk/tests/apps/dial/action_post_answer/tests.yaml Fri Jan 31 17:05:42 \
2014 @@ -1,0 +1,6 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'called_party_continue'
+    - test: 'caller_continue'
+    - test: 'party_transfer'
+

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/tests.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/tests.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/dial/action_post_answer/tests.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=auto&rev=4642
 ==============================================================================
--- asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/ast1/extensions.conf \
                (added)
+++ asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/ast1/extensions.conf \
Fri Jan 31 17:05:42 2014 @@ -1,0 +1,56 @@
+[mid_call]
+
+exten => s,1,NoOp()
+ same => n,Set(GOSUB_RESULT=${LOCAL(ARG1)})
+ same => n,UserEvent(MidCall, result: ${GOSUB_RESULT})
+ same => n,Return()
+
+[mid_call_goto_full]
+
+exten => s,1,NoOp()
+ same => n,Set(GOSUB_RESULT=GOTO:goto_full_context^goto_full_jump^1)
+ same => n,UserEvent(MidCall, result: ${GOSUB_RESULT})
+ same => n,Return()
+
+[default]
+
+exten => abort,1,NoOp()
+ same => n,Dial(Local/target,,U(mid_call^ABORT))
+ same => n,Hangup()
+
+exten => congestion,1,NoOp()
+ same => n,Dial(Local/target,,U(mid_call^CONGESTION))
+ same => n,Hangup()
+
+exten => busy,1,NoOp()
+ same => n,Dial(Local/target,,U(mid_call^BUSY))
+ same => n,Hangup()
+
+exten => continue,1,NoOp()
+ same => n,Dial(Local/target,,U(mid_call^CONTINUE))
+ same => n,UserEvent(Continue)
+ same => n,Hangup()
+
+exten => goto,1,NoOp()
+ same => n,Dial(Local/target,,U(mid_call^GOTO:jump))
+ same => n,UserEvent(Jump, result: failed)
+ same => n,Hangup()
+ same => n(jump),NoOp()
+ same => n,UserEvent(Jump, result: passed)
+ same => n,Hangup()
+
+exten => goto_full,1,NoOp()
+ same => n,Dial(Local/target,,U(mid_call_goto_full))
+ same => n,UserEvent(Jump, result: failed)
+ same => n,Hangup()
+
+exten => target,1,NoOp()
+ same => n,Answer()
+ same => n,Echo()
+
+[goto_full_context]
+
+exten => goto_full_jump,1,NoOp()
+ same => n,UserEvent(Jump, result: passed)
+ same => n,Hangup()
+

Propchange: asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/ast1/extensions.conf
                
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/configs/ast1/extensions.conf
                
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=auto&rev=4642
 ==============================================================================
--- asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/test-config.yaml \
                (added)
+++ asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/test-config.yaml Fri \
Jan 31 17:05:42 2014 @@ -1,0 +1,257 @@
+testinfo:
+    summary: 'Test mid-call GoSub execution during a dial'
+    description: |
+        This test verifies mid-call GoSub execution using the U option
+        on the calling channel during a dial. Execution occurs after the
+        called channel has answered but before bridging. The test verifies
+        that the result of the GoSub affects the overall result of the Dial.
+
+test-modules:
+    test-object:
+        config-section: test-config
+        typename: 'test_case.SimpleTestCase'
+    modules:
+      -
+        config-section: 'ami-config'
+        typename: 'ami.AMIEventModule'
+      -
+        config-section: 'dial-events-12'
+        typename: 'ami.AMIEventModule'
+        minversion: '12.0.0'
+      -
+        minversion: '12.0.0'
+        config-section: cdr-config-12
+        typename: 'cdr.CDRModule'
+
+
+test-config:
+  spawn-after-hangup: True
+  expected_events: 0
+  ignore-originate-failures: True
+  test-iterations:
+    -
+      channel: 'Local/abort@default'
+      application: 'Echo'
+    -
+      channel: 'Local/busy@default'
+      application: 'Echo'
+    -
+      channel: 'Local/congestion@default'
+      application: 'Echo'
+    -
+      channel: 'Local/continue@default'
+      application: 'Echo'
+    -
+      channel: 'Local/goto@default'
+      application: 'Echo'
+    -
+      channel: 'Local/goto_full@default'
+      application: 'Echo'
+
+ami-config:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'MidCall'
+    count: '6'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'Jump'
+    requirements:
+      match:
+          result: 'pass'
+    count: '2'
+
+dial-events-12:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/abort-.{8};2'
+    requirements:
+        DestChannel: 'Local/target-.{8};1'
+        DialStatus: 'ABORT'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/busy-.{8};2'
+    requirements:
+        DestChannel: 'Local/target-.{8};1'
+        DialStatus: 'BUSY'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/congestion-.{8};2'
+    requirements:
+        DestChannel: 'Local/target-.{8};1'
+        DialStatus: 'CONGESTION'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/continue-.{8};2'
+    requirements:
+        DestChannel: 'Local/target-.{8};1'
+        DialStatus: 'CONTINUE'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/goto-.{8};2'
+    requirements:
+        DestChannel: 'Local/target-.{8};1'
+        DialStatus: 'GOTO:jump'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/goto_full-.{8};2'
+    requirements:
+        DestChannel: 'Local/target-.{8};1'
+        DialStatus: 'GOTO:goto_full_context,goto_full_jump,1'
+
+cdr-config-12:
+    -
+        file: 'Master'
+        lines:
+            -
+                accountcode: ''
+                destination: 'target'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/target@default-.{8};2'
+                dchannel: ''
+                lastapp: 'Answer'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'abort'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/abort@default-.{8};2'
+                dchannel: 'Local/target@default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'FAILED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'target'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/target@default-.{8};2'
+                dchannel: ''
+                lastapp: 'Answer'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'busy'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/busy@default-.{8};2'
+                dchannel: 'Local/target@default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'BUSY'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'target'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/target@default-.{8};2'
+                dchannel: ''
+                lastapp: 'Answer'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'congestion'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/congestion@default-.{8};2'
+                dchannel: 'Local/target@default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'FAILED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'target'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/target@default-.{8};2'
+                dchannel: ''
+                lastapp: 'Answer'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'continue'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/continue@default-.{8};2'
+                dchannel: 'Local/target@default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'FAILED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'target'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/target@default-.{8};2'
+                dchannel: ''
+                lastapp: 'Answer'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'goto'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/goto@default-.{8};2'
+                dchannel: 'Local/target@default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'FAILED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'target'
+                dcontext: 'default'
+                callerid: '"" <>'
+                channel: 'Local/target@default-.{8};2'
+                dchannel: ''
+                lastapp: 'Answer'
+                disposition: 'ANSWERED'
+                amaflags: 'DOCUMENTATION'
+            -
+                accountcode: ''
+                destination: 'goto_full_jump'
+                dcontext: 'goto_full_context'
+                callerid: '"" <>'
+                channel: 'Local/goto_full@default-.{8};2'
+                dchannel: 'Local/target@default-.{8};1'
+                lastapp: 'Dial'
+                disposition: 'FAILED'
+                amaflags: 'DOCUMENTATION'
+
+properties:
+    minversion: '1.8.0.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+    tags:
+        - dial

Propchange: asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/test-config.yaml
                
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/test-config.yaml
                
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/dial/mid_call_events/dial_gosub/test-config.yaml
                
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=auto&rev=4642
 ==============================================================================
--- asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf \
                (added)
+++ asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf \
Fri Jan 31 17:05:42 2014 @@ -1,0 +1,54 @@
+[macro-mid_call]
+
+exten => s,1,NoOp()
+ same => n,Set(MACRO_RESULT=${ARG1})
+ same => n,UserEvent(MidCall, result: ${MACRO_RESULT})
+
+[macro-mid_call_goto_full]
+
+exten => s,1,NoOp()
+ same => n,Set(MACRO_RESULT=GOTO:goto_full_context^goto_full_jump^1)
+ same => n,UserEvent(MidCall, result: ${MACRO_RESULT})
+
+[default]
+
+exten => abort,1,NoOp()
+ same => n,Dial(Local/target,,M(mid_call^ABORT))
+ same => n,Hangup()
+
+exten => congestion,1,NoOp()
+ same => n,Dial(Local/target,,M(mid_call^CONGESTION))
+ same => n,Hangup()
+
+exten => busy,1,NoOp()
+ same => n,Dial(Local/target,,M(mid_call^BUSY))
+ same => n,Hangup()
+
+exten => continue,1,NoOp()
+ same => n,Dial(Local/target,,M(mid_call^CONTINUE))
+ same => n,UserEvent(Continue)
+ same => n,Hangup()
+
+exten => goto,1,NoOp()
+ same => n,Dial(Local/target,,M(mid_call^GOTO:jump))
+ same => n,UserEvent(Jump, result: failed)
+ same => n,Hangup()
+ same => n(jump),NoOp()
+ same => n,UserEvent(Jump, result: passed)
+ same => n,Hangup()
+
+exten => goto_full,1,NoOp()
+ same => n,Dial(Local/target,,M(mid_call_goto_full))
+ same => n,UserEvent(Jump, result: failed)
+ same => n,Hangup()
+
+exten => target,1,NoOp()
+ same => n,Answer()
+ same => n,Echo()
+
+[goto_full_context]
+
+exten => goto_full_jump,1,NoOp()
+ same => n,UserEvent(Jump, result: passed)
+ same => n,Hangup()
+

Propchange: asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf
                
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/configs/ast1/extensions.conf
                
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=auto&rev=4642
 ==============================================================================
--- asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/test-config.yaml \
                (added)
+++ asterisk/trunk/tests/apps/dial/mid_call_events/dial_macro/test-config.yaml Fri \
Jan 31 17:05:42 2014 @@ -1,0 +1,257 @@
+testinfo:
+    summary: 'Test mid-call Macro execution during a dial'
+    description: |
+        This test verifies mid-call Macro execution using the M option
+        on the calling channel during a dial. Execution occurs after the
+        called channel has answered but before bridging. The test verifies
+        that the result of the Macro affects the overall result of the Dial.
+
+test-modules:
+    test-object:
+        config-section: test-config
+        typename: 'test_case.SimpleTestCase'
+    modules:
+      -
+        config-section: 'ami-config'
+        typename: 'ami.AMIEventModule'
+      -
+        config-section: 'dial-events-12'
+        typename: 'ami.AMIEventModule'
+        minversion: '12.0.0'
+      -
+        minversion: '12.0.0'
+        config-section: cdr-config-12
+        typename: 'cdr.CDRModule'
+
+
+test-config:
+  spawn-after-hangup: True
+  expected_events: 0
+  ignore-originate-failures: True
+  test-iterations:
+    -
+      channel: 'Local/abort@default'
+      application: 'Echo'
+    -
+      channel: 'Local/busy@default'
+      application: 'Echo'
+    -
+      channel: 'Local/congestion@default'
+      application: 'Echo'
+    -
+      channel: 'Local/continue@default'
+      application: 'Echo'
+    -
+      channel: 'Local/goto@default'
+      application: 'Echo'
+    -
+      channel: 'Local/goto_full@default'
+      application: 'Echo'
+
+ami-config:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'MidCall'
+    count: '6'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'Jump'
+    requirements:
+      match:
+          result: 'pass'
+    count: '2'
+
+dial-events-12:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/abort-.{8};2'
+    requirements:
+        DestChannel: 'Local/target-.{8};1'
+        DialStatus: 'ABORT'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/busy-.{8};2'
+    requirements:
+        DestChannel: 'Local/target-.{8};1'
+        DialStatus: 'BUSY'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/congestion-.{8};2'
+    requirements:
+        DestChannel: 'Local/target-.{8};1'
+        DialStatus: 'CONGESTION'
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+        Event: 'DialEnd'
+        Channel: 'Local/continue-.{8};2'
+    requirements:
+        DestChannel: 'Local/target-.{8};1'
+        DialStatus: 'CONTINUE'
+  -
+    type: 'headermatch'

[... 329 lines stripped ...]

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic