<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 />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/4285/diff/1/?file=69924#file69924line134" style="color: black; font-weight: bold; text-decoration: underline;">/branches/13/res/ari/resource_channels.c</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static struct stasis_app_control *find_control(</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">134</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="tb"> </span><span class="tb"> </span><span class="n">ast_log</span><span class="p">(</span><span class="n">AST_LOG_ERROR</span><span class="p">,</span> <span class="s">"Priority 0 is illegal at extension %s in context: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">exten</span><span class="p">,</span> <span class="n">context</span><span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I don't think this is the correct message to put here. They didn't request priority 0, it just so happens that what they provided yielded us to having a priority of 0. I could see something being confused if they saw this.</pre>
</div>
<br />
<p>- Joshua Colp</p>
<br />
<p>On December 19th, 2014, 5:15 p.m. UTC, Mark Michelson wrote:</p>
<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 Dec. 19, 2014, 5:15 p.m.</i></p>
<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> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/13/rest-api/resources.json <span style="color: grey">(429698)</span></li>
<li>/branches/13/rest-api/api-docs/channels.json <span style="color: grey">(429698)</span></li>
<li>/branches/13/res/res_ari_channels.c <span style="color: grey">(429698)</span></li>
<li>/branches/13/res/ari/resource_channels.c <span style="color: grey">(429698)</span></li>
<li>/branches/13/res/ari/resource_channels.h <span style="color: grey">(429698)</span></li>
<li>/branches/13/CHANGES <span style="color: grey">(429698)</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>