[asterisk-commits] apps/dial/privacy/screening: Add a test for the 'go away' me... (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 9 11:27:51 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: apps/dial/privacy/screening: Add a test for the 'go away' menu option
......................................................................
apps/dial/privacy/screening: Add a test for the 'go away' menu option
This patch adds a test for the screening (p) option for the Dial application,
in which the callee decides to send the caller to a 'go away' menu. The test
verifies that the caller is ejected with the appropriate DIALSTATUS.
ASTERISK-25691
Change-Id: Ia631dbab467b76b18d51643c0cbffc4d4ffc3963
---
A tests/apps/dial/privacy/screening/go-away/test-config.yaml
M tests/apps/dial/privacy/screening/tests.yaml
2 files changed, 169 insertions(+), 0 deletions(-)
Approvals:
George Joseph: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/tests/apps/dial/privacy/screening/go-away/test-config.yaml b/tests/apps/dial/privacy/screening/go-away/test-config.yaml
new file mode 100644
index 0000000..4c2b141
--- /dev/null
+++ b/tests/apps/dial/privacy/screening/go-away/test-config.yaml
@@ -0,0 +1,168 @@
+testinfo:
+ summary: 'Test Screening where the calling party is banished away'
+ description: |
+ 'This test covers the screening option (p) where the called
+ party chooses to send the calling party away.
+ The test verifies some basic properties of the
+ Screening mode, including the recording of the name of the caller,
+ along with the resulting DIALSTATUS.'
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: apptest.AppTest
+ modules:
+ -
+ config-section: asterisk-config
+ typename: pluggable_modules.AsteriskConfigModule
+
+asterisk-config:
+ -
+ src: 'tests/apps/dial/privacy/configs/extensions.conf'
+ dst: 'extensions.conf'
+
+test-object-config:
+ app: 'Dial'
+ scenarios:
+ -
+ channels:
+ -
+ channel-id: 'Test-User'
+ channel-name: 'Local/test_screening at default'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Newexten'
+ Context: 'default'
+ Extension: 'wait'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Message: 'beep'
+ actions:
+ -
+ action-type: 'stream-audio-with-dtmf'
+ sound-file: 'agent-loginok'
+ dtmf: '#'
+ dtmf-delay: 4
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Message: 'vm-dialout'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Dial out commencing and announced'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ Channel: 'Local/test_screening at default-00000000;2'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'Bridge of test_screening half occurred when they should have gone to VM'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'DialStatus'
+ Result: 'DONTCALL'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'DIALSTATUS is DONTCALL'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Hangup'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Channel test_privacy hungup'
+ -
+ action-type: 'start-call'
+ channel-id: 'Test-User2'
+ -
+ # This channel is dialed; as a result, we don't control
+ # it when it goes into an application. Instead, channel
+ # variables set in the dialplan will inform apptest that
+ # it can be controlled
+ channel-id: 'Farend'
+ channel-name: 'Local/farend at default'
+ testuniqueid: 'farend'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Message: 'priv-callerintros/5551234.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Calling party name played to called party'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Message: 'screen-callee-options'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Options played to far end'
+ -
+ action-type: 'send-dtmf'
+ delay: 1
+ dtmf: '4'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ Channel: 'Local/farend at default-00000001;1'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'Bridge of farend half occurred when it should have hung up'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Hangup'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Channel farend hungup'
+
+
+properties:
+ minversion: '13.12.0'
+ tags:
+ - apps
+ - dial
+ dependencies:
+ - buildoption: 'TEST_FRAMEWORK'
+ - python : 'twisted'
+ - python : 'starpy'
+ - asterisk : 'app_senddtmf'
+ - asterisk : 'app_dial'
+ - asterisk : 'app_playback'
+
diff --git a/tests/apps/dial/privacy/screening/tests.yaml b/tests/apps/dial/privacy/screening/tests.yaml
index 3c66c7a..ad08c24 100644
--- a/tests/apps/dial/privacy/screening/tests.yaml
+++ b/tests/apps/dial/privacy/screening/tests.yaml
@@ -1,3 +1,4 @@
# Enter tests here in the order they should be considered for execution:
tests:
- test: 'connect-call'
+ - test: 'go-away'
--
To view, visit https://gerrit.asterisk.org/3818
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia631dbab467b76b18d51643c0cbffc4d4ffc3963
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list