<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 />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 30th, 2013, 5:57 p.m. UTC, <b>jrose</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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/2447/diff/3/?file=36521#file36521line121" style="color: black; font-weight: bold; text-decoration: underline;">/team/group/bridge_construction/res/parking/parking_bridge.c</a>
<span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<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">121</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="p">}</span> <span class="k">else</span> <span class="k">if</span> <span class="p">((</span><span class="n">parkingexten</span> <span class="o">=</span> <span class="n">ast_strdupa</span><span class="p">(</span><span class="n">S_OR</span><span class="p">(</span><span class="n">pbx_builtin_getvar_helper</span><span class="p">(</span><span class="n">chan</span><span class="p">,</span> <span class="s">"PARKINGEXTEN"</span><span class="p">),</span> <span class="s">""</span><span class="p">))))</span> <span class="p">{</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">getvar is a problem here too.</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This one changed a good bit.
        } else {
                ast_channel_lock(chan);
                if ((parkingexten = pbx_builtin_getvar_helper(chan, "PARKINGEXTEN"))) {
                        parkingexten = ast_strdupa(parkingexten);
                }
                ast_channel_unlock(chan);
                if (!ast_strlen_zero(parkingexten)) {
                        if (sscanf(parkingexten, "%30d", &preferred_space) != 1 || preferred_space <= 0) {
                                ast_log(LOG_WARNING, "PARKINGEXTEN='%s' is not a valid parking space.\n", parkingexten);
                                ao2_ref(new_parked_user, -1);
                                return NULL;
                        }
                }
        }
</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 30th, 2013, 5:57 p.m. UTC, <b>jrose</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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/2447/diff/3/?file=36521#file36521line217" style="color: black; font-weight: bold; text-decoration: underline;">/team/group/bridge_construction/res/parking/parking_bridge.c</a>
<span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<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">217</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="n">blind_transfer</span> <span class="o">=</span> <span class="n">S_OR</span><span class="p">(</span><span class="n">pbx_builtin_getvar_helper</span><span class="p">(</span><span class="n">bridge_channel</span><span class="o">-></span><span class="n">chan</span><span class="p">,</span> <span class="s">"BLINDTRANSFER"</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">218</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="n">ast_channel_name</span><span class="p">(</span><span class="n">bridge_channel</span><span class="o">-></span><span class="n">chan</span><span class="p">));</span></pre></td>
</tr>
</tbody>
</table>
<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 one is also a little awkward.
</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"> ast_channel_lock(bridge_channel->chan);
blind_transfer = S_OR(pbx_builtin_getvar_helper(bridge_channel->chan, "BLINDTRANSFER"),
ast_channel_name(bridge_channel->chan));
if (blind_transfer) {
blind_transfer = ast_strdupa(blind_transfer);
}
ast_channel_unlock(bridge_channel->chan);</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 30th, 2013, 5:57 p.m. UTC, <b>jrose</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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/2447/diff/3/?file=36523#file36523line250" style="color: black; font-weight: bold; text-decoration: underline;">/team/group/bridge_construction/res/parking/parking_controller.c</a>
<span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<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">250</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">blindtransfer</span> <span class="o">=</span> <span class="n">pbx_builtin_getvar_helper</span><span class="p">(</span><span class="n">chan</span><span class="p">,</span> <span class="s">"BLINDTRANSFER"</span><span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Not threadsafe. Changing. It's rather awkward here too.</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">        ast_channel_lock(chan);
        if ((blindtransfer = pbx_builtin_getvar_helper(chan, "BLINDTRANSFER"))) {
                blindtransfer = ast_strdupa(blindtransfer);
        }
        ast_channel_unlock(chan);</pre>
<br />
<p>- jrose</p>
<br />
<p>On April 26th, 2013, 10:45 p.m. UTC, jrose 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, David Lee, kmoore, Matt Jordan, Mark Michelson, and rmudgett.</div>
<div>By jrose.</div>
<p style="color: grey;"><i>Updated April 26, 2013, 10:45 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-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'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't get tangled into a giant morass within features.c
Parking configuration works somewhat differently now and extensions aren't necessarily automatically generated (it's optional and hasn'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'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't currently doing anything, namely parkext and hints.
To do list:
* Dialplan generation for parking lots with parkext (included 'Park' and 'ParkedCall' applications)
* Dialplan generation for comebacktoorigin (park-dial extensions)
* Hints
* Implement 'Park' 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'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> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/team/group/bridge_construction/CHANGES <span style="color: grey">(386687)</span></li>
<li>/team/group/bridge_construction/bridges/bridge_builtin_features.c <span style="color: grey">(386687)</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">(386687)</span></li>
<li>/team/group/bridge_construction/include/asterisk/config_options.h <span style="color: grey">(386687)</span></li>
<li>/team/group/bridge_construction/include/asterisk/features.h <span style="color: grey">(386687)</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">(386687)</span></li>
<li>/team/group/bridge_construction/main/bridging_roles.c <span style="color: grey">(386687)</span></li>
<li>/team/group/bridge_construction/main/config_options.c <span style="color: grey">(386687)</span></li>
<li>/team/group/bridge_construction/main/features.c <span style="color: grey">(386687)</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">(386687)</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>