<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/2492/">https://reviewboard.asterisk.org/r/2492/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On May 2nd, 2013, 4:29 p.m. CDT, <b>Mark Michelson</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/2492/diff/1/?file=37114#file37114line53" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/main/endpoints.c</a>
<span style="font-weight: normal;">
(Diff revision 1)
</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">53</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="cm">/*! Max channels for this endpoint. -1 means unlimited or unknown. */</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">54</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="kt">int</span> <span class="n">max_channels</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;">The max_channels on an endpoint doesn't appear to be used to actually restrict the number of channels associated with an endpoint.
Is this being done on purpose or is this an oversight?</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;">On purpose. The idea behind this field is to document any limits there might be on the number of endpoints supported by a channel. But the purpose is not to artificially constrain the number of channels on an endpoint.
I will, however, update the docs.</pre>
<br />
<p>- David</p>
<br />
<p>On May 2nd, 2013, 2:05 p.m. CDT, David Lee 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.</div>
<div>By David Lee.</div>
<p style="color: grey;"><i>Updated May 2, 2013, 2:05 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-21421">ASTERISK-21421</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;">An endpoint is an external device/system that may offer/accept
channels to/from Asterisk. While this is a very useful concept for end
users, it is surprisingly not a core concept within Asterisk itself.
This patch defines ast_endpoint as a separate object, which channel
drivers may use to expose their concept of an endpoint. As the channel
driver creates channels, it can use ast_endpoint_add_channel() to
associate channels to the endpoint. This updated the endpoint
appropriately, and forwards all of the channel's events to the
endpoint's topic.
In order to avoid excessive locking on the endpoint object itself, the
mutable state is not accessible via getters. Instead, you can create a
snapshot using ast_endpoint_snapshot_create() to get a consistent
snapshot of the internal state.
This patch also includes a set of topics and messages associated with
endpoints, and implementations of the endpoint-related RESTful
API. chan_sip was updated to create endpoints with SIP peers, but the
state of the endpoints is not updated with the state of the peer.
Along for the ride in this patch is a Stasis test API. This is a
stasis_message_sink object, which can be subscribed to a Stasis
topic. It has functions for blocking while waiting for conditions in
the message sink to be fulfilled.
(closes issue ASTERISK-21421)
Review: https://reviewboard.asterisk.org/r/2492/</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;">Unit tests!</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>/trunk/channels/chan_sip.c <span style="color: grey">(387290)</span></li>
<li>/trunk/channels/sip/include/sip.h <span style="color: grey">(387290)</span></li>
<li>/trunk/include/asterisk/astobj2.h <span style="color: grey">(387290)</span></li>
<li>/trunk/include/asterisk/endpoints.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/include/asterisk/stasis.h <span style="color: grey">(387290)</span></li>
<li>/trunk/include/asterisk/stasis_endpoints.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/include/asterisk/stasis_test.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/main/asterisk.c <span style="color: grey">(387290)</span></li>
<li>/trunk/main/astobj2.c <span style="color: grey">(387290)</span></li>
<li>/trunk/main/channel_internal_api.c <span style="color: grey">(387290)</span></li>
<li>/trunk/main/endpoints.c <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/main/stasis_cache.c <span style="color: grey">(387290)</span></li>
<li>/trunk/main/stasis_endpoints.c <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/res/res_stasis_http_endpoints.c <span style="color: grey">(387290)</span></li>
<li>/trunk/res/res_stasis_test.c <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/res/res_stasis_test.exports.in <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/res/stasis_http/resource_endpoints.h <span style="color: grey">(387290)</span></li>
<li>/trunk/res/stasis_http/resource_endpoints.c <span style="color: grey">(387290)</span></li>
<li>/trunk/rest-api/api-docs/endpoints.json <span style="color: grey">(387290)</span></li>
<li>/trunk/tests/test_endpoints.c <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/tests/test_stasis_endpoints.c <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2492/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>