<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/2447/">https://reviewboard.asterisk.org/r/2447/</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.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers, David Lee, kmoore, Matt Jordan, Mark Michelson, and rmudgett.</div>
<div>By jrose.</div>


<p style="color: grey;"><i>Updated April 15, 2013, 9:07 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;">Addresses Kinsey&#39;s review as well as some of my own findings. Also addresses some finding noted commented by Richard via email since reviewboard was acting up for him earlier. The contents of and responses to that review are as follows:

&gt; features.h:
&gt;
&gt; line 195
&gt; The changes to features.h for this prototype are moved to the
&gt; bridging_basic.h header file. Also you will not need to call this
&gt; function. Instead you would need to call ast_bridge_features_ds_set() and
&gt; possibly ast_bridge_features_ds_get() if you need to read-modify-write.

HOLD since this relies on https://reviewboard.asterisk.org/r/2446
 

&gt; parking.h:
&gt; line 74
&gt; What a long line. Ever hear of breaking long lines?

CHECK

&gt; bridging.c:
&gt; line 3140-3142
&gt; This should not be done here. The clear roles should be moved into the
&gt; pull and the establish roles should be moved into the push. The only
&gt; thing you should worry about when pulling a channel from a bridge and
&gt; pushing it into a new bridge is pointing the channel to the new bridge.
&gt; Otherwise, this must be done by the merge as well.

CHECK
 

&gt; parking.c:
&gt; line 141
&gt; This should be a WARNING at least since they tried to park a call and the
&gt; module is not loaded.

I&#39;m going to disagree on this one on the basis of precedent. This is similar to how
the voicemail installable functions work which also use verbose messages in this exact
same manner. See ast_app_has_voicemail in app.c and the functions below for examples.


&gt; res_parking.c:
&gt; line 51
&gt; There is not much difference between struct parking_lot_state and struct
&gt; parking_lot_cfg. This is not good because any new config options need to
&gt; be added to both structs.

HOLD (Changing this is going to require a somewhat large scale effort. Since it isn&#39;t critical, this should wait until the initial merger is finished)
 

&gt; line 70
&gt; This struct member should just be parked_users and not state that the
&gt; container is a list.

CHECK


&gt; line 77
&gt; This is the name of the parking lot. Describing it as a state name is
&gt; misleading.

HOLD (This should be changed along with the change to store configuration within the parking lot objects rather than duplicating configuration. I also like it this way for the time being since searching for parking_lot_state is easier than searching for parking_lot when parking_lot_cfg structs are present in the file as well)


&gt; line 213-235
&gt; Since the container is sorted, this function should just be:
&gt; return CMP_MATCH;
&gt; The sort function above has already filtered the matches.

CHECK


&gt; parking/parking_applications.c:
&gt; line 238-254
&gt; Find the parking lot name then find the parking lot. Your error messages
&gt; will also benefit. Look at the current parking code.
&gt; You have done this code differently in another place when there is no need.

CHECK

 
&gt; line 263-380
&gt; Same. Find parking lot name first then find parking log.

CHECK</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-21059">ASTERISK-21059</a>, 

 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-21272">ASTERISK-21272</a>, 

 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-21353">ASTERISK-21353</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;">As a result of all the new bridging changes, certain applications such as parking, queues, confbridge, and a few others require significant reworking within Asterisk to make usable.
Parking was less than salvagable, so I&#39;ve rebuilt it from the ground up to use a lot of new stuff including config hooks, the new bridging architecture, stasis, and just generally to
be an independent module with its own scope that doesn&#39;t get tangled into a giant morass within features.c

Parking configuration works somewhat differently now and extensions aren&#39;t necessarily automatically generated (it&#39;s optional and hasn&#39;t been implemented), but the intention with the final result is that if you were using parking before without too much additional dialplan manipulation, that should all just work once your parking lots are migrated to the new configuration file.

Currently supported:
parking from the PBX with the Park application (all arguments are supported)
parking within a call using the one touch parking feature
parking within a call using DTMF blind transfers (attended transfers work, but it&#39;s basically just like they called the application itself).
Picking up parked calls using the PBX
Multiple parking lots
All options available to parking lots are currently configurable. Some aren&#39;t currently doing anything, namely parkext and hints.

To do list:
* Dialplan generation for parking lots with parkext (included &#39;Park&#39; and &#39;ParkedCall&#39; applications)
* Dialplan generation for comebacktoorigin (park-dial extensions)
* Hints
* Implement &#39;Park&#39; manager action
* Dynamic parking lots and the default parking lot
* Scraping the greasy remnants of parking out of features.c
* CEL events
* Unit tests and testsuite tests</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;">This is currently being tested as it&#39;s developed and breaks in minor ways frequently. Unit tests and testsuite tests are on the to do list.</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>/team/group/bridge_construction/CHANGES <span style="color: grey">(385818)</span></li>

 <li>/team/group/bridge_construction/bridges/bridge_builtin_features.c <span style="color: grey">(385818)</span></li>

 <li>/team/group/bridge_construction/configs/res_parking.conf.sample <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/team/group/bridge_construction/include/asterisk/bridging.h <span style="color: grey">(385818)</span></li>

 <li>/team/group/bridge_construction/include/asterisk/config_options.h <span style="color: grey">(385818)</span></li>

 <li>/team/group/bridge_construction/include/asterisk/features.h <span style="color: grey">(385818)</span></li>

 <li>/team/group/bridge_construction/include/asterisk/parking.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/team/group/bridge_construction/main/bridging.c <span style="color: grey">(385818)</span></li>

 <li>/team/group/bridge_construction/main/bridging_roles.c <span style="color: grey">(385818)</span></li>

 <li>/team/group/bridge_construction/main/config_options.c <span style="color: grey">(385818)</span></li>

 <li>/team/group/bridge_construction/main/features.c <span style="color: grey">(385818)</span></li>

 <li>/team/group/bridge_construction/main/parking.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/team/group/bridge_construction/res/Makefile <span style="color: grey">(385818)</span></li>

 <li>/team/group/bridge_construction/res/parking/parking_applications.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/team/group/bridge_construction/res/parking/parking_bridge.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/team/group/bridge_construction/res/parking/parking_bridge_features.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/team/group/bridge_construction/res/parking/parking_controller.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/team/group/bridge_construction/res/parking/parking_manager.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/team/group/bridge_construction/res/parking/parking_ui.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/team/group/bridge_construction/res/parking/res_parking.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/team/group/bridge_construction/res/res_parking.c <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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







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




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