[asterisk-commits] bridge: Add test for confirming hangup after feature timeout (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 24 17:16:03 CDT 2015


Mark Michelson has submitted this change and it was merged.

Change subject: bridge: Add test for confirming hangup after feature timeout
......................................................................


bridge: Add test for confirming hangup after feature timeout

This test creates a chain of Local channels and sets up a
scenario where DTMF is sent that causes a feature timeout to
occur. When the DTMF is received at the far end the channel is
hung up. All channels are confirmed to have been hung up when
this happens.

ASTERISK-25341 #close

Change-Id: Icfa456ea9de7b452c57fa91919ca03c56120d523
---
A tests/bridge/feature_timeout_hangup/configs/ast1/extensions.conf
A tests/bridge/feature_timeout_hangup/configs/ast1/features.conf
A tests/bridge/feature_timeout_hangup/test-config.yaml
M tests/bridge/tests.yaml
4 files changed, 92 insertions(+), 0 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, approved; Verified
  Ashley Sanders: Looks good to me, but someone else must approve



diff --git a/tests/bridge/feature_timeout_hangup/configs/ast1/extensions.conf b/tests/bridge/feature_timeout_hangup/configs/ast1/extensions.conf
new file mode 100644
index 0000000..06f67a5
--- /dev/null
+++ b/tests/bridge/feature_timeout_hangup/configs/ast1/extensions.conf
@@ -0,0 +1,15 @@
+[collect_context]
+exten => collect,1,Answer()
+exten => collect,2,Read(TACOS,demo-congrats,1)
+exten => h,1,UserEvent(CollectResult,result:pass)
+
+[outgoing_context]
+exten => playback,1,Dial(Local/collect at collect_context,,tT)
+exten => h,1,UserEvent(OutgoingResult,result:pass)
+
+[dtmf_context]
+exten => dtmf,1,Answer
+exten => dtmf,2,Wait(2)
+exten => dtmf,3,SendDTMF(3)
+exten => dtmf,4,Wait(36)
+exten => h,1,UserEvent(DTMFResult,result:pass)
diff --git a/tests/bridge/feature_timeout_hangup/configs/ast1/features.conf b/tests/bridge/feature_timeout_hangup/configs/ast1/features.conf
new file mode 100644
index 0000000..6b59cbd
--- /dev/null
+++ b/tests/bridge/feature_timeout_hangup/configs/ast1/features.conf
@@ -0,0 +1,4 @@
+[featuremap]
+blindxfer => #2
+atxfer => #1
+
diff --git a/tests/bridge/feature_timeout_hangup/test-config.yaml b/tests/bridge/feature_timeout_hangup/test-config.yaml
new file mode 100644
index 0000000..16d504b
--- /dev/null
+++ b/tests/bridge/feature_timeout_hangup/test-config.yaml
@@ -0,0 +1,72 @@
+testinfo:
+    summary:     'Test that feature timeout does not cause a hangup to get dropped'
+    description: |
+        'This test creates a small chain of Local channels with the DTMF based transfer
+         features enabled. The features are configured to require a # DTMF and a digit in
+         order to trigger the transfers. Once the chain is answered SendDTMF is used to
+         send a single # which causes a feature timeout to occur. The # DTMF is streamed
+         out to the called dialplan logic. This dialplan logic immediately hangs up when
+         a single DTMF digit is received. This test confirms that all channels involved
+         are hung up when this leg of the chain is hung up.'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'test_case.SimpleTestCase'
+    modules:
+        -
+            typename: 'pluggable_modules.HangupMonitor'
+            config-section: 'hangup-monitor'
+        -
+            typename: 'ami.AMIEventModule'
+            config-section: 'ami-config'
+
+test-object-config:
+    spawn-after-hangup: True
+    test-iterations:
+        -
+            channel: 'Local/playback at outgoing_context'
+            exten: 'dtmf'
+            context: 'dtmf_context'
+            priority: '1'
+
+hangup-monitor:
+    ids: '0'
+
+ami-config:
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'UserEvent'
+                UserEvent: 'OutgoingResult'
+        requirements:
+            match:
+                Result: 'pass'
+        count: 1
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'UserEvent'
+                UserEvent: 'DTMFResult'
+        requirements:
+            match:
+                Result: 'pass'
+        count: 1
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'UserEvent'
+                UserEvent: 'CollectResult'
+        requirements:
+            match:
+                Result: 'pass'
+        count: 1
+
+properties:
+    minversion: '13.6.0'
+    tags:
+        - bridge
+
diff --git a/tests/bridge/tests.yaml b/tests/bridge/tests.yaml
index dfcfdf1..1557301 100644
--- a/tests/bridge/tests.yaml
+++ b/tests/bridge/tests.yaml
@@ -23,3 +23,4 @@
     - test: 'bridge_action'
     - test: 'atxfer_threeway_nominal'
     - test: 'atxfer_retries'
+    - test: 'feature_timeout_hangup'

-- 
To view, visit https://gerrit.asterisk.org/1134
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icfa456ea9de7b452c57fa91919ca03c56120d523
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list