<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 26, 2014 at 11:15 AM, Kinsey Moore <span dir="ltr"><<a href="mailto:kmoore@digium.com" target="_blank">kmoore@digium.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span></span><a></a><span></span><div><div>Hello everyone,<br></div>I'd like to get some feedback from the community regarding the current operation of bridge creation and bridge subscriptions.<br>
<br></div><div>Recently, a fix for a bridge subscription leak was committed which caused two tests to fail. These tests were expecting to have a persistent subscription to the bridge for its entire lifetime which isn't entirely unreasonable but is not the way that the API is currently designed.<br>
<br></div><div>Currently, the API is designed such that a user of the API must first create a bridge and then subscribe to it if it wants additional information as events via websocket during the lifetime of the bridge. The review[1] to fix these two failings tests assumes this is the correct way to do things and modifies subscriptions during the lifetime of the bridge accordingly. One downside of this is that between creation and subscription, some other entity could alter the state of the bridge without its creator or subscriber(s) knowing.<br>
<br></div><div>An alternative fix for these broken tests would be to add a parameter to the POST that creates the bridge to allow automatic creation of subscriptions for one or more Stasis applications. This solution would prevent modification of the bridge's state without the creator or other designated application knowing about it.<br>
<br></div></div></blockquote><div><br></div><div>I think that's the best approach.<br><br></div><div>One thing we need to document soon is the relationship between the WebSocket connection and a Stasis application and the RESTful ARI interface. That part is where things got a bit confusing in this issue.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div>Are there other solutions worth considering?<br><br></div><div>[1] <a href="https://reviewboard.asterisk.org/r/3398/" target="_blank">https://reviewboard.asterisk.org/r/3398/</a><span class="HOEnZb"><font color="#888888"><br>
</font></span><br clear="all"></div></div></blockquote></div><br></div><div class="gmail_extra">For now, I'd say commit the fix to the tests, along with a note in the UPGRADE file noting the difference in behaviour. It should note that it was really a bug fix, but is still a behavioural change.<br>
</div><div class="gmail_extra"><br>-- <br><div dir="ltr"><div>Matthew Jordan<br></div><div>Digium, Inc. | Engineering Manager</div><div>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA</div><div>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></div>
</div>
</div></div>