<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/4285/">https://reviewboard.asterisk.org/r/4285/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By Mark Michelson.</div>
<p style="color: grey;"><i>Updated Jan. 6, 2015, 10:21 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Added same error message to origination as well.</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-24412">ASTERISK-24412</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">See /r/4101 for the initial review uploaded by Nir Simionivich to understand the need for the ability to originate/continue to a labeled dialplan priority.
When writing the tests in /r/4284 for continuation/origination, I ran into some problems, and so I have updated the original patch to fix these issues. Here are the modifications to the original patch:
* In continuation code, we get a channel snapshot from the stasis_app_control instead of getting an actual channel instance. This is because pbx_findlabel_extension doesn't actually use the channel for anything, so the channel isn't necessary.
* In both continuation and origination code, do not pass the input context to pbx_findlabel_extension. If no context is specified, this causes a crash. Instead, determine the intended context beforehand and pass that context into pbx_findlabel_extension.
* This is not a fault of the previous patch, but there were code paths that resulted in some unexpected behavior in continuation. Since continuation states that context, extension, priority, and label are all optional, but didn't really do anything to make sense of what should happen when one or more are omitted, the code has been updated to make sure that a sane default is used when one or more of these are omitted.
* I have updated the apiVersion in rest-api/resources.json to "1.7.0" since this change introduces backwards-compatible new functionality. QUESTION: Is this version bump required in other .json files as well?
* I have updated CHANGES to indicate the new functionality</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">See /r/4284 for tests.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/13/rest-api/resources.json <span style="color: grey">(430178)</span></li>
<li>/branches/13/rest-api/api-docs/channels.json <span style="color: grey">(430178)</span></li>
<li>/branches/13/res/res_ari_channels.c <span style="color: grey">(430178)</span></li>
<li>/branches/13/res/ari/resource_channels.c <span style="color: grey">(430178)</span></li>
<li>/branches/13/res/ari/resource_channels.h <span style="color: grey">(430178)</span></li>
<li>/branches/13/CHANGES <span style="color: grey">(430178)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/4285/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>