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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On May 11th, 2012, 9:55 a.m., <b>Olle E Johansson</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 a short note &quot;ConfbridgeActionExec&quot; is too complex as a name. &quot;ConfbridgeAction&quot; or &quot;ConfbridgeExec&quot; - but not a hybrid, please :-)

/O</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;">I was going to change this to ConfbridgeAction last night, but this morning I thought about it some more.  Typically, names of AMI Actions that involve an application include the application name and some verb indicating the action to be taken, e.g., ConfbridgeListRooms, MeetmeMute, QueueAdd, etc.  There are, of course, exceptions to this rule, but in general this approach seems to make sense from the perspective that an AMI action *does* something, as opposed to it representing an object (which would take a noun form).

Where this is all going is that neither ConfbridgeAction nor ConfbridgeExec tell you what the action is doing.  ConfbridgeAction implies an object as opposed to an action that is performed.  ConfbridgeExec does imply that something is performed, but not what.  I&#39;ll admit that ConfbridgeActionExec doesn&#39;t provide a lot more information, but at least the concept of actions exist in the ConfBridge application, and since this command - by definition - is generic, there&#39;s only so much information that can be conveyed.

As far as the issue of name complexity goes, looking at our current AMI actions, this is not the most egregious example of a long AMI action name (that prize goes to ConfbridgeSetSingleVideoSrc).  While I&#39;m not a proponent of continuing bad practices on the basis of historical precedent, I&#39;m not convinced this is a bad practice - at the very least, the action name tells you exactly what it does.

So - I&#39;m inclined to keep it as ConfbridgeActionExec, unless there is a compelling reason that I&#39;m missing or sufficient outcry.</pre>
<br />








<p>- Matt</p>


<br />
<p>On May 5th, 2012, 11:50 p.m., Matt Jordan wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/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 and Joshua Colp.</div>
<div>By Matt Jordan.</div>


<p style="color: grey;"><i>Updated May 5, 2012, 11:50 p.m.</i></p>




<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;">Currently, most actions that are executed upon a channel in a conference (increasing/decreasing listening volume, playing back a sound on a channel, etc.) are handled via DTMF menus associated with a user profile.  While this suffices for scenarios where a user initiates an action upon themselves, it does not account for scenarios where a third party application wants to interact with the channels in a ConfBridge.  While there are a handful of AMI commands that allow for external interaction with the channels in the conference, they are currently limited to a subset of the defined actions.

Rather then add individual AMI commands for each confbridge action, this patch adds a single new AMI command for ConfBridge, ConfbridgeActionExec.  The command lets you execute any of the ConfBridge actions on a channel in the conference.

In order to facilitate this, a new mechanism has been added to the bridging layer to allow for a callback function to be executed at the next convenient moment on a bridged channel&#39;s thread.  This lets a user of the bridging layer defer execution of some function until such a time that the bridging layer determines that it is safe to execute that action on the channel&#39;s thread.

Example Usage:

Action: ConfbridgeActionExec
Conference: 1
Channel: Local/blah@foo
Actions: increase_listening_volume,playback(tt-monkeys)

This would playback monkeys to the offending channel.  Very loudly.</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;">Initial testing using a test in the Asterisk Test Suite verified proper behavior of the AMI command.  The channel was properly suspended from the bridging layer, the playback confbridge action was executed, and the channel was placed back into the bridging layer.  All of this was similar to what would occur if the same action was triggered using a DTMF menu.

Note that a test case is being written to handle the various actions, but will be posted under a separate review.</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/CHANGES <span style="color: grey">(364579)</span></li>

 <li>/trunk/apps/app_confbridge.c <span style="color: grey">(364788)</span></li>

 <li>/trunk/main/bridging.c <span style="color: grey">(364579)</span></li>

 <li>/trunk/apps/confbridge/conf_config_parser.c <span style="color: grey">(364579)</span></li>

 <li>/trunk/apps/confbridge/include/confbridge.h <span style="color: grey">(364579)</span></li>

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

</ul>

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




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








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