<p>Michael Bradeen has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/19907">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_senddtmf: add test for option to answer channel<br><br>adds a test for the 'a' option to make sure that both the new<br>feature works (channel is answered when set) and the existing<br>functionality (do not answer when not set) is maintained<br><br>ASTERISK-30422<br><br>Change-Id: I3f76b047e97e52e362e5475711c08bb4053b67b3<br>---<br>A tests/apps/senddtmf/configs/ast1/extensions.conf<br>A tests/apps/senddtmf/test-config.yaml<br>M tests/apps/tests.yaml<br>3 files changed, 100 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/07/19907/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/apps/senddtmf/configs/ast1/extensions.conf b/tests/apps/senddtmf/configs/ast1/extensions.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..17347cf</span><br><span>--- /dev/null</span><br><span>+++ b/tests/apps/senddtmf/configs/ast1/extensions.conf</span><br><span>@@ -0,0 +1,20 @@</span><br><span style="color: hsl(120, 100%, 40%);">+[default]</span><br><span style="color: hsl(120, 100%, 40%);">+exten => noanswer,1,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Dial(Local/noanswer@send-dtmf/n,4,G(default^fail^1))</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(default,pass,1)</span><br><span style="color: hsl(120, 100%, 40%);">+exten => answer,1,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Dial(Local/answer@send-dtmf/n,4,G(default^pass^1))</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(default,fail,1)</span><br><span style="color: hsl(120, 100%, 40%);">+exten => fail,1,UserEvent(SendDtmfNoAnswer,Result: Fail,Reason: ${DIALSTATUS})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => pass,1,UserEvent(SendDtmfNoAnswer,Result: Pass)</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%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[send-dtmf]</span><br><span style="color: hsl(120, 100%, 40%);">+exten => noanswer,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,SendDTMF(1#)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => answer,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,SendDTMF(1#,,,,a)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span>\ No newline at end of file</span><br><span>diff --git a/tests/apps/senddtmf/test-config.yaml b/tests/apps/senddtmf/test-config.yaml</span><br><span>new file mode 100644</span><br><span>index 0000000..7395c75</span><br><span>--- /dev/null</span><br><span>+++ b/tests/apps/senddtmf/test-config.yaml</span><br><span>@@ -0,0 +1,64 @@</span><br><span style="color: hsl(120, 100%, 40%);">+testinfo:</span><br><span style="color: hsl(120, 100%, 40%);">+ summary: 'Ensure that Senddtmf no answer option works as expected'</span><br><span style="color: hsl(120, 100%, 40%);">+ description: |</span><br><span style="color: hsl(120, 100%, 40%);">+ 'We expect that a call to senddtmf by default will not be</span><br><span style="color: hsl(120, 100%, 40%);">+ answered while calls to senddtmf with the 'a' = answer flag</span><br><span style="color: hsl(120, 100%, 40%);">+ should.'</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: 'test_case.TestCaseModule'</span><br><span style="color: hsl(120, 100%, 40%);">+ modules:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: noanswer-originator</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'pluggable_modules.Originator'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: answer-originator</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'pluggable_modules.Originator'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: hangup-monitor</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'pluggable_modules.HangupMonitor'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: ami-config</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'ami.AMIEventModule'</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%);">+ connect-ami: True</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+noanswer-originator:</span><br><span style="color: hsl(120, 100%, 40%);">+ channel: 'Local/noanswer@default'</span><br><span style="color: hsl(120, 100%, 40%);">+ application: 'Echo'</span><br><span style="color: hsl(120, 100%, 40%);">+ trigger: 'ami_connect'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+answer-originator:</span><br><span style="color: hsl(120, 100%, 40%);">+ channel: 'Local/answer@default'</span><br><span style="color: hsl(120, 100%, 40%);">+ application: 'Echo'</span><br><span style="color: hsl(120, 100%, 40%);">+ trigger: 'ami_connect'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+hangup-monitor:</span><br><span style="color: hsl(120, 100%, 40%);">+ ids: '0'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ami-config:</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: 'SendDtmfNoAnswer'</span><br><span style="color: hsl(120, 100%, 40%);">+ requirements:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ Result: 'Pass'</span><br><span style="color: hsl(120, 100%, 40%);">+ count: 2</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%);">+ - senddtmf</span><br><span style="color: hsl(120, 100%, 40%);">+ - apps</span><br><span style="color: hsl(120, 100%, 40%);">+ dependencies:</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_dial'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk: 'app_userevent'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk: 'app_originate'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk: 'app_read'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk: 'pbx_config'</span><br><span>diff --git a/tests/apps/tests.yaml b/tests/apps/tests.yaml</span><br><span>index 8ce8fac..92a93e2 100644</span><br><span>--- a/tests/apps/tests.yaml</span><br><span>+++ b/tests/apps/tests.yaml</span><br><span>@@ -31,3 +31,4 @@</span><br><span> - test: 'read'</span><br><span> - test: 'if'</span><br><span> - test: 'signal'</span><br><span style="color: hsl(120, 100%, 40%);">+ - test: 'senddtmf'</span><br><span>\ No newline at end of file</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/19907">change 19907</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/+/19907"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 20 </div>
<div style="display:none"> Gerrit-Change-Id: I3f76b047e97e52e362e5475711c08bb4053b67b3 </div>
<div style="display:none"> Gerrit-Change-Number: 19907 </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-MessageType: newchange </div>