<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 />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On December 13th, 2013, 7:21 p.m. CST, <b>rmudgett</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/3070/diff/3/?file=49601#file49601line165" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/main/manager_bridges.c</a>
<span style="font-weight: normal;">
(Diff revision 3)
</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 ast_str *ast_manager_build_bridge_state_string_prefix(</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">165</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">prefix</span><span class="p">,</span> <span class="n">ast_strlen_zero</span><span class="p">(</span><span class="n">snapshot</span><span class="o">-></span><span class="n">creator</span><span class="p">)</span> <span class="o">?</span> <span class="s">"<none>"</span><span class="o">:</span> <span class="n">snapshot</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">166</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">prefix</span><span class="p">,</span> <span class="n">ast_strlen_zero</span><span class="p">(</span><span class="n">snapshot</span><span class="o">-></span><span class="n">name</span><span class="p">)</span> <span class="o">?</span> <span class="s">"<none>"</span><span class="o">:</span> <span class="n">snapshot</span><span class="o">-></span><span class="n">name</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;">Many other places use <unknown> instead.</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;">Well, I guess I can use that. I'm not sure if it's better or worse.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On December 13th, 2013, 7:21 p.m. CST, <b>rmudgett</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/3070/diff/3/?file=49606#file49606line607" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/res/res_stasis.c</a>
<span style="font-weight: normal;">
(Diff revision 3)
</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 ast_bridge *stasis_app_bridge_create(const char *type)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">607</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="n">bridge</span> <span class="o">=</span> <span class="n">ast_bridge_base_new</span><span class="p">(</span><span class="n">capabilities</span><span class="p">,</span> <span class="n">flags</span><span class="p">);</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">607</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb"> </span><span class="n">bridge</span> <span class="o">=</span> <span class="n">ast_bridge_base_new</span><span class="p">(</span><span class="n">capabilities</span><span class="p">,</span> <span class="n">flags</span><span class="p"><span class="hl">,</span></span><span class="hl"> </span><span class="s"><span class="hl">"Stasis"</span></span><span class="p"><span class="hl">,</span></span><span class="hl"> </span><span class="nb"><span class="hl">NULL</span></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;">Stasis could give a name to the bridges it creates. This could aleviate some creation identification issues being discussed.</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;">Alrighty, I've cooked something up to go with this that should be in the next diff.</pre>
<br />
<p>- Jonathan</p>
<br />
<p>On December 13th, 2013, 3:40 p.m. CST, 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. 13, 2013, 3:40 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/parking/parking_bridge.c <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/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>