<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/2634/">https://reviewboard.asterisk.org/r/2634/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On June 24th, 2013, 10:09 p.m. UTC, <b>Matt Jordan</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Just to double check, what happens to the called channel if the caller hangs up? Does it remain in Stasis, or is it automatically hung up as well?</pre>
 </blockquote>




 <p>On June 25th, 2013, 6:58 p.m. UTC, <b>Jason Parker</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The called channel was never in Stasis.  It gets hung up.</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This may be okay for now, but I can see someone wanting the ability to &#39;own&#39; the called channel from a Stasis application.

Here&#39;s one use case.

* Caller calls in and gets bridged with an Agent&#39;s channel
* Caller accidentally hangs up
* Agent presses some DTMF key (or a widget on a UI) that says &quot;hey, they weren&#39;t supposed to hang up yet, dial them back&quot; (they may have asked for the person&#39;s number so they can dial them back if disconnected, etc.)
* We perform a Dial from the Agent to the caller&#39;s resource/tech
* Agent decides they want to pass the called channel (who was the caller) to another Agent

Since Stasis doesn&#39;t &#39;own&#39; the channel, I&#39;m not sure we can remove that channel from the bridge and pass it off to another bridge in Stasis. An attempt to do so will probably result in the REST API coming back with a &#39;you don&#39;t own this&#39; error.

I suspect that isn&#39;t what people would want.</pre>
<br />










<p>- Matt</p>


<br />
<p>On June 25th, 2013, 6:58 p.m. UTC, Jason Parker 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.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By Jason Parker.</div>


<p style="color: grey;"><i>Updated June 25, 2013, 6:58 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-21620">ASTERISK-21620</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;">Implement the dial action on channels.  This creates a new outbound leg, which upon answer, gets bridged with an existing channel sitting in Stasis.</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;">The bridge gets created.  The channels can talk to each other.  The bridge disappears once the caller hangs up.  The caller remains in Stasis and can still be acted upon.</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>/trunk/res/stasis/control.c <span style="color: grey">(392855)</span></li>

 <li>/trunk/include/asterisk/stasis_app.h <span style="color: grey">(392855)</span></li>

 <li>/trunk/res/res_stasis_http_channels.c <span style="color: grey">(392855)</span></li>

 <li>/trunk/rest-api/api-docs/channels.json <span style="color: grey">(392855)</span></li>

 <li>/trunk/res/stasis_http/resource_channels.h <span style="color: grey">(392855)</span></li>

 <li>/trunk/res/stasis_http/resource_channels.c <span style="color: grey">(392855)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/2634/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>