<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/2293/">https://reviewboard.asterisk.org/r/2293/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On January 28th, 2013, 12:39 p.m., <b>rmudgett</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Systems compiled with LOW_MEMORY have similar problems with the 2048 callno value. The way TRUNK_CALL_START is used in a bit test does not work on the 2048 callno value because the tested bit is not set.
The only reason I can find that IAX_MAX_CALLS needs to be a power of 2 is when defining TRUNK_CALL_START and the use of it in a bit test in make_trunk(). Changing make_trunk() to use a compare operator instead of a bit test should remove all requirements that IAX_MAX_CALLS be a power of two. It should be recommended that IAX_MAX_CALLS be a power of two for ease of distinguishing normal/trunk calls in IAX traces but not required.
TRUNK_CALL_START should also have insulating parentheses around the definition to avoid unexpected operator precedence issues.
</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">> Systems compiled with LOW_MEMORY have similar problems with the 2048 callno value. The way TRUNK_CALL_START
> is used in a bit test does not work on the 2048 callno value because the tested bit is not set.
If LOW_MEMORY is defined, IAX_MAX_CALLS will be 2048, TRUNK_CALL_START will be 1024 (0x400). So other than the parentheses, is any other change needed?</pre>
<br />
<p>- Sean</p>
<br />
<p>On January 26th, 2013, 12:41 p.m., Sean Bright wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/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 Sean Bright.</div>
<p style="color: grey;"><i>Updated Jan. 26, 2013, 12:41 p.m.</i></p>
<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;">While populating the list of available call numbers in IAX2 when LOW_MEMORY is not defined, we use every number between 2 and 32768 (inclusive). 32768 is a 16 bit number (a 1 followed by 15 0s). According to the IAX2 RFC, call numbers are 15 bit values, making 32768 invalid.
This patch reduces the number of allocated call numbers by 1 so that the are all 15 bits.
I intend to commit this change to Asterisk versions 1.8, 11, and trunk.
I have another patch to replace the ao2_container usage for call number selection almost ready for RB as well.</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;">Ran thousands of test calls (both trunked and non-trunked) between 3 Asterisk servers.</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_iax2.c <span style="color: grey">(380158)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2293/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>