<p>Kevin Harwell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/13221">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">rest_api/bridges/softmix_unhold - add test<br><br>Add a test to make sure a channel is taken off of hold when it enters a<br>softmix bridge.<br><br>ASTERISK-28618<br><br>Change-Id: I5aa63dd3474429eadce756dd9a4715ef89f89e12<br>---<br>A tests/rest_api/bridges/softmix_unhold/configs/ast1/extensions.conf<br>A tests/rest_api/bridges/softmix_unhold/test-config.yaml<br>M tests/rest_api/bridges/tests.yaml<br>3 files changed, 144 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/21/13221/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/rest_api/bridges/softmix_unhold/configs/ast1/extensions.conf b/tests/rest_api/bridges/softmix_unhold/configs/ast1/extensions.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..59c7f03</span><br><span>--- /dev/null</span><br><span>+++ b/tests/rest_api/bridges/softmix_unhold/configs/ast1/extensions.conf</span><br><span>@@ -0,0 +1,6 @@</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 => s,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,Echo()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span>diff --git a/tests/rest_api/bridges/softmix_unhold/test-config.yaml b/tests/rest_api/bridges/softmix_unhold/test-config.yaml</span><br><span>new file mode 100644</span><br><span>index 0000000..a85b119</span><br><span>--- /dev/null</span><br><span>+++ b/tests/rest_api/bridges/softmix_unhold/test-config.yaml</span><br><span>@@ -0,0 +1,137 @@</span><br><span style="color: hsl(120, 100%, 40%);">+testinfo:</span><br><span style="color: hsl(120, 100%, 40%);">+ summary: 'Test channel unhold when bridge transitions to softmix'</span><br><span style="color: hsl(120, 100%, 40%);">+ description: |</span><br><span style="color: hsl(120, 100%, 40%);">+ This tests that a channel on hold is taken off hold if the bridge</span><br><span style="color: hsl(120, 100%, 40%);">+ it's currently in transitions to softmix.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ Add two channels to a mixing bridge. Then put one channel on hold.</span><br><span style="color: hsl(120, 100%, 40%);">+ Lastly, add a third channel to the bridge, and make sure the</span><br><span style="color: hsl(120, 100%, 40%);">+ appropriate unhold events are raised signifying that the channel</span><br><span style="color: hsl(120, 100%, 40%);">+ was take off of hold.</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%);">+ dependencies:</span><br><span style="color: hsl(120, 100%, 40%);">+ - python : autobahn.websocket</span><br><span style="color: hsl(120, 100%, 40%);">+ - python : requests</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 : res_ari_channels</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : app_echo</span><br><span style="color: hsl(120, 100%, 40%);">+ tags:</span><br><span style="color: hsl(120, 100%, 40%);">+ - ARI</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</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: ari.AriBaseTestObject</span><br><span style="color: hsl(120, 100%, 40%);">+ modules:</span><br><span style="color: hsl(120, 100%, 40%);">+ - typename: pluggable_modules.EventActionModule</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: event-actions</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+test-object:</span><br><span style="color: hsl(120, 100%, 40%);">+ reactor-timeout: 15</span><br><span style="color: hsl(120, 100%, 40%);">+ subscribe-all: True</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+event-actions:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ ari-start:</span><br><span style="color: hsl(120, 100%, 40%);">+ ari-requests:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ # Make sure we have a bridge to put everyone in</span><br><span style="color: hsl(120, 100%, 40%);">+ method: 'post'</span><br><span style="color: hsl(120, 100%, 40%);">+ uri: 'bridges/lebridge'</span><br><span style="color: hsl(120, 100%, 40%);">+ params:</span><br><span style="color: hsl(120, 100%, 40%);">+ app: 'testsuite'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ # Go ahead and originate alice</span><br><span style="color: hsl(120, 100%, 40%);">+ method: 'post'</span><br><span style="color: hsl(120, 100%, 40%);">+ uri: 'channels'</span><br><span style="color: hsl(120, 100%, 40%);">+ params:</span><br><span style="color: hsl(120, 100%, 40%);">+ app: 'testsuite'</span><br><span style="color: hsl(120, 100%, 40%);">+ endpoint: 'Local/s@default'</span><br><span style="color: hsl(120, 100%, 40%);">+ channelId: 'alice'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ # Go ahead and originate bob</span><br><span style="color: hsl(120, 100%, 40%);">+ method: 'post'</span><br><span style="color: hsl(120, 100%, 40%);">+ uri: 'channels'</span><br><span style="color: hsl(120, 100%, 40%);">+ params:</span><br><span style="color: hsl(120, 100%, 40%);">+ app: 'testsuite'</span><br><span style="color: hsl(120, 100%, 40%);">+ endpoint: 'Local/s@default'</span><br><span style="color: hsl(120, 100%, 40%);">+ channelId: 'bob'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ ari-events:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ type: 'StasisStart'</span><br><span style="color: hsl(120, 100%, 40%);">+ application: 'testsuite'</span><br><span style="color: hsl(120, 100%, 40%);">+ channel:</span><br><span style="color: hsl(120, 100%, 40%);">+ id: 'alice|bob'</span><br><span style="color: hsl(120, 100%, 40%);">+ count: 2</span><br><span style="color: hsl(120, 100%, 40%);">+ ari-requests:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ method: 'post'</span><br><span style="color: hsl(120, 100%, 40%);">+ uri: 'bridges/lebridge/addChannel'</span><br><span style="color: hsl(120, 100%, 40%);">+ params:</span><br><span style="color: hsl(120, 100%, 40%);">+ channel: '{channel.id}'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ ari-events:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ type: 'ChannelEnteredBridge'</span><br><span style="color: hsl(120, 100%, 40%);">+ channel:</span><br><span style="color: hsl(120, 100%, 40%);">+ id: 'alice'</span><br><span style="color: hsl(120, 100%, 40%);">+ count: 1</span><br><span style="color: hsl(120, 100%, 40%);">+ ari-requests:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ # Once alice is in the bridge apply the hold</span><br><span style="color: hsl(120, 100%, 40%);">+ method: 'post'</span><br><span style="color: hsl(120, 100%, 40%);">+ uri: 'channels/alice/hold'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ ami-events:</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: 'MusicOnHoldStart'</span><br><span style="color: hsl(120, 100%, 40%);">+ Uniqueid: 'alice'</span><br><span style="color: hsl(120, 100%, 40%);">+ count: 1</span><br><span style="color: hsl(120, 100%, 40%);">+ ari-requests:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ method: 'post'</span><br><span style="color: hsl(120, 100%, 40%);">+ uri: 'channels'</span><br><span style="color: hsl(120, 100%, 40%);">+ params:</span><br><span style="color: hsl(120, 100%, 40%);">+ app: 'testsuite'</span><br><span style="color: hsl(120, 100%, 40%);">+ endpoint: 'Local/s@default'</span><br><span style="color: hsl(120, 100%, 40%);">+ channelId: 'charlie'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ ari-events:</span><br><span style="color: hsl(120, 100%, 40%);">+ match:</span><br><span style="color: hsl(120, 100%, 40%);">+ type: 'StasisStart'</span><br><span style="color: hsl(120, 100%, 40%);">+ application: 'testsuite'</span><br><span style="color: hsl(120, 100%, 40%);">+ channel:</span><br><span style="color: hsl(120, 100%, 40%);">+ id: 'charlie'</span><br><span style="color: hsl(120, 100%, 40%);">+ count: 1</span><br><span style="color: hsl(120, 100%, 40%);">+ ari-requests:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ # Adding charlie will switch the bridging tech to softmix</span><br><span style="color: hsl(120, 100%, 40%);">+ method: 'post'</span><br><span style="color: hsl(120, 100%, 40%);">+ uri: 'bridges/lebridge/addChannel'</span><br><span style="color: hsl(120, 100%, 40%);">+ params:</span><br><span style="color: hsl(120, 100%, 40%);">+ channel: '{channel.id}'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ ami-events:</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: 'MusicOnHoldStop'</span><br><span style="color: hsl(120, 100%, 40%);">+ Uniqueid: 'alice'</span><br><span style="color: hsl(120, 100%, 40%);">+ count: 1</span><br><span style="color: hsl(120, 100%, 40%);">+ ari-requests:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ method: 'delete'</span><br><span style="color: hsl(120, 100%, 40%);">+ uri: 'channels/alice'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ method: 'delete'</span><br><span style="color: hsl(120, 100%, 40%);">+ uri: 'channels/bob'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ method: 'delete'</span><br><span style="color: hsl(120, 100%, 40%);">+ uri: 'channels/charlie'</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ method: 'delete'</span><br><span style="color: hsl(120, 100%, 40%);">+ uri: 'bridges/lebridge'</span><br><span style="color: hsl(120, 100%, 40%);">+ stop_test:</span><br><span>diff --git a/tests/rest_api/bridges/tests.yaml b/tests/rest_api/bridges/tests.yaml</span><br><span>index 791faad..9a3f1de 100644</span><br><span>--- a/tests/rest_api/bridges/tests.yaml</span><br><span>+++ b/tests/rest_api/bridges/tests.yaml</span><br><span>@@ -11,4 +11,5 @@</span><br><span> - test: 'id_propagate'</span><br><span> - test: 'no_id_propagate'</span><br><span> - dir: 'playback'</span><br><span style="color: hsl(120, 100%, 40%);">+ - test: 'softmix_unhold'</span><br><span> - test: 'video'</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/13221">change 13221</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/+/13221"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I5aa63dd3474429eadce756dd9a4715ef89f89e12 </div>
<div style="display:none"> Gerrit-Change-Number: 13221 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>