<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/16006">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_confbridge: Tests for user answer_channel<br><br>This tests the operation of the new answer_channel<br>user option and ensures that the default behavior<br>has not changed.<br><br>ASTERISK-29440<br><br>Change-Id: Ib150939cd806c842c49dbc4be5b56d0fb5e962d4<br>---<br>A tests/apps/confbridge/confbridge_noanswer/configs/ast1/confbridge.conf<br>A tests/apps/confbridge/confbridge_noanswer/configs/ast1/extensions.conf<br>A tests/apps/confbridge/confbridge_noanswer/test-config.yaml<br>M tests/apps/confbridge/tests.yaml<br>4 files changed, 114 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/apps/confbridge/confbridge_noanswer/configs/ast1/confbridge.conf b/tests/apps/confbridge/confbridge_noanswer/configs/ast1/confbridge.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..8883ccc</span><br><span>--- /dev/null</span><br><span>+++ b/tests/apps/confbridge/confbridge_noanswer/configs/ast1/confbridge.conf</span><br><span>@@ -0,0 +1,16 @@</span><br><span style="color: hsl(120, 100%, 40%);">+[user_noanswer]</span><br><span style="color: hsl(120, 100%, 40%);">+type=user</span><br><span style="color: hsl(120, 100%, 40%);">+answer_channel=no</span><br><span style="color: hsl(120, 100%, 40%);">+timeout=5</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[user_answer]</span><br><span style="color: hsl(120, 100%, 40%);">+type=user</span><br><span style="color: hsl(120, 100%, 40%);">+answer_channel=yes</span><br><span style="color: hsl(120, 100%, 40%);">+timeout=5</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[default_user]</span><br><span style="color: hsl(120, 100%, 40%);">+type=user</span><br><span style="color: hsl(120, 100%, 40%);">+timeout=5</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[default_bridge]</span><br><span style="color: hsl(120, 100%, 40%);">+type=bridge</span><br><span>diff --git a/tests/apps/confbridge/confbridge_noanswer/configs/ast1/extensions.conf b/tests/apps/confbridge/confbridge_noanswer/configs/ast1/extensions.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..07232ae</span><br><span>--- /dev/null</span><br><span>+++ b/tests/apps/confbridge/confbridge_noanswer/configs/ast1/extensions.conf</span><br><span>@@ -0,0 +1,25 @@</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@conf/n,4,g)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,GotoIf($["${DIALSTATUS}"="NOANSWER"]?pass,1:fail,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@conf/n,4,g)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,GotoIf($["${DIALSTATUS}"="ANSWER"]?pass,1:fail,1)</span><br><span style="color: hsl(120, 100%, 40%);">+exten => default,1,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Dial(Local/default@conf/n,4,g)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,GotoIf($["${DIALSTATUS}"="ANSWER"]?pass,1:fail,1)</span><br><span style="color: hsl(120, 100%, 40%);">+exten => fail,1,UserEvent(ConfBridgeNoAnswer,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(ConfBridgeNoAnswer,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%);">+[conf]</span><br><span style="color: hsl(120, 100%, 40%);">+exten => noanswer,1,Progress()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ConfBridge(test,,user_noanswer)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => answer,1,Progress()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ConfBridge(test,,user_answer)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => default,1,Progress()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,ConfBridge(test)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span>diff --git a/tests/apps/confbridge/confbridge_noanswer/test-config.yaml b/tests/apps/confbridge/confbridge_noanswer/test-config.yaml</span><br><span>new file mode 100644</span><br><span>index 0000000..7bccdd7</span><br><span>--- /dev/null</span><br><span>+++ b/tests/apps/confbridge/confbridge_noanswer/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: 'Ensure that Confbridge user 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%);">+ 'This test configures ConfBridge user profiles with all combinations of</span><br><span style="color: hsl(120, 100%, 40%);">+ answer_channel options. We expect that a call to noanswer will not</span><br><span style="color: hsl(120, 100%, 40%);">+ be answered and calls to answer and default will be answered. We also</span><br><span style="color: hsl(120, 100%, 40%);">+ test that the default behavior remains unchanged.'</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: '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: default-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%);">+default-originator:</span><br><span style="color: hsl(120, 100%, 40%);">+ channel: 'Local/default@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: 'ConfBridgeNoAnswer'</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: 3</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%);">+properties:</span><br><span style="color: hsl(120, 100%, 40%);">+ tags:</span><br><span style="color: hsl(120, 100%, 40%);">+ - confbridge</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_confbridge'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk: 'app_userevent'</span><br><span>diff --git a/tests/apps/confbridge/tests.yaml b/tests/apps/confbridge/tests.yaml</span><br><span>index ccf2505..8d65c7a 100644</span><br><span>--- a/tests/apps/confbridge/tests.yaml</span><br><span>+++ b/tests/apps/confbridge/tests.yaml</span><br><span>@@ -4,6 +4,7 @@</span><br><span> - test: 'confbridge_end_marked'</span><br><span> - test: 'confbridge_marked'</span><br><span> - test: 'confbridge_marked_unmarked'</span><br><span style="color: hsl(120, 100%, 40%);">+ - test: 'confbridge_noanswer'</span><br><span> - test: 'confbridge_nominal'</span><br><span> - test: 'confbridge_recording'</span><br><span> - test: 'confbridge_result'</span><br><span></span><br></pre><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/16006">change 16006</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/+/16006"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: Ib150939cd806c842c49dbc4be5b56d0fb5e962d4 </div>
<div style="display:none"> Gerrit-Change-Number: 16006 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.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-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>