<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 />
<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/1/?file=49565#file49565line159" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/main/manager_bridges.c</a>
<span style="font-weight: normal;">
(Diff revision 1)
</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">159</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="s">"%sBridgeCreator: %s</span><span class="se">\r\n</span><span class="s">"</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">160</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="s">"%sBridgeName: %s</span><span class="se">\r\n</span><span class="s">"</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;">Currently, for bridges created through ast_bridge_basic_new(), this is going to result in these two fields being empty in the event. Agent Pool and Stasis bridges will have an empty BridgeName field.
Rather than having blank fields, I'd suggest populating the field with something like "None" to indicate that there is intentionally no name and/or creator in these situations.</pre>
</div>
<br />
<p>- Mark Michelson</p>
<br />
<p>On December 13th, 2013, 7:54 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. 13, 2013, 7:54 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>