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



 <p>Ship it!</p>









<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/3070/diff/5/?file=49661#file49661line530" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/main/bridge.c</a>
    <span style="font-weight: normal;">

     (Diff revision 5)

    </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; ">struct tech_deferred_destroy {</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">530</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="p">.</span><span class="n">uniqueid</span> <span class="o">=</span> <span class="n">bridge</span><span class="o">-></span><span class="n">uniqueid</span><span class="p">,</span></pre></td>
  </tr>

  <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">531</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="p">.</span><span class="n">creator</span> <span class="o">=</span> <span class="n">bridge</span><span class="o">-></span><span class="n">creator</span><span class="p">,</span></pre></td>
  </tr>

  <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">532</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="p">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">bridge</span><span class="o">-></span><span class="n">name</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;">As an optional minor nit.  You could order these the same as the struct definition to improve memory caching usage.</pre>
</div>
<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/3070/diff/5/?file=49661#file49661line1009" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/main/bridge.c</a>
    <span style="font-weight: normal;">

     (Diff revision 5)

    </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 int smart_bridge_operation(struct ast_bridge *bridge)</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">1008</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="p">.</span><span class="n">uniqueid</span> <span class="o">=</span> <span class="n">bridge</span><span class="o">-></span><span class="n">uniqueid</span><span class="p">,</span></pre></td>
  </tr>

  <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">1009</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="p">.</span><span class="n">creator</span> <span class="o">=</span> <span class="n">bridge</span><span class="o">-></span><span class="n">creator</span><span class="p">,</span></pre></td>
  </tr>

  <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">1010</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="p">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">bridge</span><span class="o">-></span><span class="n">name</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;">As an optional minor nit.  You could order these the same as the struct definition to improve memory caching usage.</pre>
</div>
<br />



<p>- rmudgett</p>


<br />
<p>On December 16th, 2013, 10:39 p.m. UTC, Jonathan Rose 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, David Lee, kmoore, Mark Michelson, and rmudgett.</div>
<div>By Jonathan Rose.</div>


<p style="color: grey;"><i>Updated Dec. 16, 2013, 10:39 p.m.</i></p>









<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;">So there has been at least a little bit of clammoring internally about having the need to be able to tell when a bridge belongs to a specific parking lot or app_confbridge conference. This patch provides two new properties to the bridge.

BridgeCreator - Provides the name of a system which is responsible for creating the bridge.  This includes things such as 'AgentPool', 'Parking', 'ConfBridge', 'Stasis', and other systems which can create bridges.

BridgeName - Provides the name given to the bridge to refer to it internally by the creator.

BridgeCreator may be set or it may be unset (in which case it will appear as a zero length string).  BridgeName will only appear when BridgeCreator is also set, but it is also optional. So you have the following possibilities:

neither BridgeCreator nor BridgeName
BridgeCreator but not BridgeName
BridgeCreator and BridgeName</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;">Checked output for Manager events displaying Bridge snapshots

Event: BridgeEnter
Privilege: call,all
BridgeUniqueid: a72735f6-04ac-499b-a2da-bb997d6f99ab
BridgeType: parking
BridgeTechnology: holding_bridge
BridgeCreator: Parking
BridgeName: default
BridgeNumChannels: 1
Channel: PJSIP/pjgold-00000000
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: pjgold
CallerIDName: pjgold
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
AccountCode: 
Context: default
Exten: 700
Priority: 1
Uniqueid: 1386949677.0


Checked output of GET /bridges on ARI in petstore:

[
  {
    "id": "a72735f6-04ac-499b-a2da-bb997d6f99ab",
    "channels": [],
    "technology": "holding_bridge",
    "bridge_creator": "Parking",
    "bridge_class": "parking",
    "bridge_type": "holding",
    "bridge_name": "default"
  },
  {
    "id": "80e19b8f-5a04-464a-885c-4c119764bf83",
    "channels": [
      "1386949828.4"
    ],
    "technology": "holding_bridge",
    "bridge_creator": "BridgeWait",
    "bridge_class": "base",
    "bridge_type": "holding",
    "bridge_name": "testname"
  }
]</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/12/rest-api/api-docs/bridges.json <span style="color: grey">(403725)</span></li>

 <li>/branches/12/res/res_stasis.c <span style="color: grey">(403725)</span></li>

 <li>/branches/12/res/res_ari_bridges.c <span style="color: grey">(403725)</span></li>

 <li>/branches/12/res/parking/parking_bridge.c <span style="color: grey">(403725)</span></li>

 <li>/branches/12/res/ari/resource_bridges.c <span style="color: grey">(403725)</span></li>

 <li>/branches/12/res/ari/resource_bridges.h <span style="color: grey">(403725)</span></li>

 <li>/branches/12/res/ari/ari_model_validators.c <span style="color: grey">(403725)</span></li>

 <li>/branches/12/res/ari/ari_model_validators.h <span style="color: grey">(403725)</span></li>

 <li>/branches/12/main/stasis_bridges.c <span style="color: grey">(403725)</span></li>

 <li>/branches/12/main/manager_bridges.c <span style="color: grey">(403725)</span></li>

 <li>/branches/12/main/bridge_basic.c <span style="color: grey">(403725)</span></li>

 <li>/branches/12/main/bridge.c <span style="color: grey">(403725)</span></li>

 <li>/branches/12/include/asterisk/stasis_bridges.h <span style="color: grey">(403725)</span></li>

 <li>/branches/12/include/asterisk/stasis_app.h <span style="color: grey">(403725)</span></li>

 <li>/branches/12/include/asterisk/bridge_internal.h <span style="color: grey">(403725)</span></li>

 <li>/branches/12/include/asterisk/bridge.h <span style="color: grey">(403725)</span></li>

 <li>/branches/12/doc/appdocsxml.xslt <span style="color: grey">(403725)</span></li>

 <li>/branches/12/apps/app_confbridge.c <span style="color: grey">(403725)</span></li>

 <li>/branches/12/apps/app_bridgewait.c <span style="color: grey">(403725)</span></li>

 <li>/branches/12/apps/app_agent_pool.c <span style="color: grey">(403725)</span></li>

</ul>

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







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








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