<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/19916">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span></span><br></pre><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_directory: add test for skip call option<br><br>Adds new test for the ability to skip calling the extension when<br>selected from a directory.<br><br>apps/directory/directory_skip<br><br>ASTERISK-30405<br><br>Change-Id: I19e34d52ecbd40c03fc1e74247e6e83aa0f28948<br>---<br>A tests/apps/directory/directory_skip/configs/ast1/extensions.conf<br>A tests/apps/directory/directory_skip/configs/ast1/voicemail.conf<br>A tests/apps/directory/directory_skip/test-config.yaml<br>M tests/apps/directory/tests.yaml<br>4 files changed, 148 insertions(+), 0 deletions(-)<br><br></pre>
<pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/apps/directory/directory_skip/configs/ast1/extensions.conf b/tests/apps/directory/directory_skip/configs/ast1/extensions.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..5d548e1</span><br><span>--- /dev/null</span><br><span>+++ b/tests/apps/directory/directory_skip/configs/ast1/extensions.conf</span><br><span>@@ -0,0 +1,57 @@</span><br><span style="color: hsl(120, 100%, 40%);">+; Confbridge contexts and extensions</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[directory]</span><br><span style="color: hsl(120, 100%, 40%);">+exten => standard,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Directory(,,s)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => select,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,UserEvent(DirectoryEnter)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Directory(,,s)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => exit,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,UserEvent(QueueExit)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => h,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,UserEvent(ExtensionSelect,Status: ${DIRECTORY_EXTEN})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => o,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,UserEvent(OperatorExtension)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => a,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,UserEvent(AssistantExtension)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => 2020,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,UserEvent(DogExtension)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[default]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => 2020,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,goto(directory,2020,1)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => sendDTMF,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,SendDTMF(${DTMF_TO_SEND})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(wait,1)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => sendAudio,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Verbose(1, Sending audio file ${TALK_AUDIO})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Playback(${TALK_AUDIO})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(wait,1)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => sendAudioWithDTMF,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Verbose(1, Sending audio file ${TALK_AUDIO})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Playback(${TALK_AUDIO})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,SendDTMF(${DTMF_TO_SEND})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(wait,1)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => hangup,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Verbose(1, Hanging up)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+exten => wait,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Wait(6000)</span><br><span>diff --git a/tests/apps/directory/directory_skip/configs/ast1/voicemail.conf b/tests/apps/directory/directory_skip/configs/ast1/voicemail.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..0c5eefe</span><br><span>--- /dev/null</span><br><span>+++ b/tests/apps/directory/directory_skip/configs/ast1/voicemail.conf</span><br><span>@@ -0,0 +1,2 @@</span><br><span style="color: hsl(120, 100%, 40%);">+[default]</span><br><span style="color: hsl(120, 100%, 40%);">+2020=2020,Dog Dog,,,,attach=no|saycid=no|envelope=no|delete=no</span><br><span>diff --git a/tests/apps/directory/directory_skip/test-config.yaml b/tests/apps/directory/directory_skip/test-config.yaml</span><br><span>new file mode 100644</span><br><span>index 0000000..ba22548</span><br><span>--- /dev/null</span><br><span>+++ b/tests/apps/directory/directory_skip/test-config.yaml</span><br><span>@@ -0,0 +1,72 @@</span><br><span style="color: hsl(120, 100%, 40%);">+testinfo:</span><br><span style="color: hsl(120, 100%, 40%);">+ summary: 'Test the skip calling directory option'</span><br><span style="color: hsl(120, 100%, 40%);">+ description: |</span><br><span style="color: hsl(120, 100%, 40%);">+ Tests that the directory 's' option sets the selected extension as</span><br><span style="color: hsl(120, 100%, 40%);">+ the channel variable 'DIRECTORY_EXTEN' instead of dialing it.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+test-modules:</span><br><span style="color: hsl(120, 100%, 40%);">+ test-object:</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: test-object-config</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'apptest.AppTest'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+test-object-config:</span><br><span style="color: hsl(120, 100%, 40%);">+ app: 'Directory'</span><br><span style="color: hsl(120, 100%, 40%);">+ scenarios:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ channels:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ channel-id: 'selectchan'</span><br><span style="color: hsl(120, 100%, 40%);">+ channel-name: 'LOCAL/select@directory'</span><br><span style="color: hsl(120, 100%, 40%);">+ context: 'default'</span><br><span style="color: hsl(120, 100%, 40%);">+ exten: 'wait'</span><br><span style="color: hsl(120, 100%, 40%);">+ start-on-create: True</span><br><span style="color: hsl(120, 100%, 40%);">+ events:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ type: 'headermatch'</span><br><span style="color: hsl(120, 100%, 40%);">+ conditions:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ Event: 'UserEvent'</span><br><span style="color: hsl(120, 100%, 40%);">+ UserEvent: 'DirectoryEnter'</span><br><span style="color: hsl(120, 100%, 40%);">+ Channel: 'Local/select@directory-.*'</span><br><span style="color: hsl(120, 100%, 40%);">+ actions:</span><br><span style="color: hsl(120, 100%, 40%);">+ # select user 'dog'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ action-type: 'send-dtmf'</span><br><span style="color: hsl(120, 100%, 40%);">+ delay: '1'</span><br><span style="color: hsl(120, 100%, 40%);">+ dtmf: '364'</span><br><span style="color: hsl(120, 100%, 40%);">+ # choose to direct to selected user</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ action-type: 'send-dtmf'</span><br><span style="color: hsl(120, 100%, 40%);">+ delay: '4'</span><br><span style="color: hsl(120, 100%, 40%);">+ dtmf: '1'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ action-type: 'set-expected-result'</span><br><span style="color: hsl(120, 100%, 40%);">+ expected-result: 'Send DTMF'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ type: 'headermatch'</span><br><span style="color: hsl(120, 100%, 40%);">+ conditions:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ Event: 'UserEvent'</span><br><span style="color: hsl(120, 100%, 40%);">+ UserEvent: 'ExtensionSelect'</span><br><span style="color: hsl(120, 100%, 40%);">+ Status: '2020'</span><br><span style="color: hsl(120, 100%, 40%);">+ actions:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ action-type: 'set-expected-result'</span><br><span style="color: hsl(120, 100%, 40%);">+ expected-result: 'Success'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+properties:</span><br><span style="color: hsl(120, 100%, 40%);">+ tags:</span><br><span style="color: hsl(120, 100%, 40%);">+ - apps</span><br><span style="color: hsl(120, 100%, 40%);">+ - directory</span><br><span style="color: hsl(120, 100%, 40%);">+ dependencies:</span><br><span style="color: hsl(120, 100%, 40%);">+ - buildoption: 'TEST_FRAMEWORK'</span><br><span style="color: hsl(120, 100%, 40%);">+ - python : 'twisted'</span><br><span style="color: hsl(120, 100%, 40%);">+ - python : 'starpy'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : 'app_directory'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : 'app_playback'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : 'app_senddtmf'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : 'app_userevent'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : 'app_verbose'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : 'pbx_config'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>diff --git a/tests/apps/directory/tests.yaml b/tests/apps/directory/tests.yaml</span><br><span>index 1c9ce7a..c9c4ef4 100644</span><br><span>--- a/tests/apps/directory/tests.yaml</span><br><span>+++ b/tests/apps/directory/tests.yaml</span><br><span>@@ -5,3 +5,4 @@</span><br><span> - test: 'directory_attendant_exit'</span><br><span> - test: 'directory_result'</span><br><span> - test: 'directory_file'</span><br><span style="color: hsl(120, 100%, 40%);">+ - test: 'directory_skip'</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/19916">change 19916</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/testsuite/+/19916"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: certified/18.9 </div>
<div style="display:none"> Gerrit-Change-Id: I19e34d52ecbd40c03fc1e74247e6e83aa0f28948 </div>
<div style="display:none"> Gerrit-Change-Number: 19916 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Michael Bradeen <mbradeen@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>