<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/1083/">https://reviewboard.asterisk.org/r/1083/</a>
     </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 2nd, 2011, 4:37 p.m., <b>Terry Wilson</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/1083/diff/3/?file=15404#file15404line1075" style="color: black; font-weight: bold; text-decoration: underline;">/include/asterisk/rtp_engine.h</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; ">void ast_rtp_codecs_payloads_unset(struct ast_rtp_codecs *codecs, struct ast_rtp_instance *instance, int payload);</pre></td>

  </tr>
 </tbody>






 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1069</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * ast_rtp_codecs_payload_Formats(&amp;codecs, &amp;astformats, &amp;nonastformats);</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1075</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * ast_rtp_codecs_payload_Formats(&amp;codecs, &amp;astformats, &amp;nonastformats);</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;">s/F/f/</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;">fixed</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 2nd, 2011, 4:37 p.m., <b>Terry Wilson</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/1083/diff/3/?file=15404#file15404line1089" style="color: black; font-weight: bold; text-decoration: underline;">/include/asterisk/rtp_engine.h</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; ">void ast_rtp_codecs_payloads_unset(struct ast_rtp_codecs *codecs, struct ast_rtp_instance *instance, int payload);</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1083</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * \param asterisk_format Non-zero if the given <span class="hl">code is an A</span>sterisk format <span class="hl">value</span></span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1089</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * \param asterisk_format Non-zero if the given <span class="hl">a</span>sterisk format <span class="hl">is present</span></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;">s/asterisk/Asterisk/</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;">fixed</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 2nd, 2011, 4:37 p.m., <b>Terry Wilson</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/1083/diff/3/?file=15408#file15408line38" style="color: black; font-weight: bold; text-decoration: underline;">/include/asterisk/translate.h</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; ">extern &quot;C&quot; {</pre></td>

  </tr>
 </tbody>






 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">38</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="c1">// </span><span class="cs">XXX</span><span class="c1"> #include &quot;asterisk/module.h&quot;</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">35</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="c1">// </span><span class="cs">XXX</span><span class="c1"> #include &quot;asterisk/module.h&quot;</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 yours, but C++-style comment</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;">fixed</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 2nd, 2011, 4:37 p.m., <b>Terry Wilson</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/1083/diff/3/?file=15408#file15408line56" style="color: black; font-weight: bold; text-decoration: underline;">/include/asterisk/translate.h</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; ">extern &quot;C&quot; {</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">53</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * between performance and quality.  With this table direct</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="cm"> * translation paths between two formats always takes precedence</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">55</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * over multi step paths, lossless intermediate steps are always</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">56</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * chosen over lossy intermediate steps, and preservation of</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">57</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * sample rate across the translation will always have precedence</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">58</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * over a path that involves any re-sampling.</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;"></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;">re-worded this so it doesn&#39;t sound weird</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 2nd, 2011, 4:37 p.m., <b>Terry Wilson</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/1083/diff/3/?file=15408#file15408line70" style="color: black; font-weight: bold; text-decoration: underline;">/include/asterisk/translate.h</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; ">extern &quot;C&quot; {</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">67</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">AST_TRANS_COST_LL_LY_ORIGSAMP</span> <span class="o">=</span> <span class="mi">600000</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;">What is the reasoning for the specific numbers chosen? Is the number order all that is important or is arithmetic done on them at some point?</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;">For the most part it is the number order that matters, but there is one rule.  Two translation costs in the table can never equal less than the most expensive single cost in the table.  That is why the first two costs are 400000 and 600000 which equals 1000000.  The highest single cost is 985000.  This guarantees that a single translation path will always beat a multi-step translation path no matter what.  Other than that, the exact numbers mean nothing other than one type of translation is preferred over another.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 2nd, 2011, 4:37 p.m., <b>Terry Wilson</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/1083/diff/3/?file=15410#file15410line746" style="color: black; font-weight: bold; text-decoration: underline;">/main/app.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; ">static int __ast_play_and_record(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, int beep, int silencethreshold, int maxsilence, const char *path, int prepend, const char *acceptdtmf, const char *canceldtmf)</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">744</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="kt">int</span> <span class="n">rfmt</span> <span class="o">=</span> <span class="mi">0</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">745</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="k">struct</span> <span class="n">ast_format</span> <span class="n">rfmt</span> <span class="o">=</span> <span class="p">{</span> <span class="mi">0</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;">ast_format_clear</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;">fixed</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 2nd, 2011, 4:37 p.m., <b>Terry Wilson</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/1083/diff/3/?file=15417#file15417line5563" style="color: black; font-weight: bold; text-decoration: underline;">/main/channel.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; ">static int set_security_requirements(const struct ast_channel *requestor, struct ast_channel *out)</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">5426</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="p">(</span><span class="n">c</span> <span class="o">=</span> <span class="n">chan</span><span class="o">-&gt;</span><span class="n">tech</span><span class="o">-&gt;</span><span class="n">requester</span><span class="p">(</span><span class="n">type</span><span class="p">,</span> <span class="n">capabilities</span> <span class="o">|</span> <span class="n">videoformat</span> <span class="o">|</span> <span class="n">textformat</span><span class="p">,</span> <span class="n">requestor</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">cause</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">5544</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="cm">/* </span><span class="cs">XXX</span><span class="cm"> Only the audio format calculated as being the best for translation</span></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">5545</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">                 * purposes is used for the request. This needs to be re-evaluated.  It may be</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">5546</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">                 * a better choice to send all the audio formats capable of being translated</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">5547</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">                 * during the request and allow the channel drivers to pick the best one. */</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;">I may be misunderstanding, but it seems like we should send everything capable of being translated.

What if we determine the best codec to be a codec that isn&#39;t available in the destination channel due to a peer config? Say the requestor supports ulaw and g729 and we determine that ulaw is the best. We then send the call to a SIP device that is configured in sip.conf to only allow g729. In this case, wouldn&#39;t we do an unnecessary transcode since jointcaps for the peer/pvt in chan_sip would be empty when it might not have been if we had sent everything?</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 appears to be true to me as well.  I put this comment in while I was doing the project.  My plan is to re-evaluate this when I work on improving how we handle initial call setup across Asterisk.</pre>
<br />




<p>- David</p>


<br />
<p>On January 24th, 2011, 3:25 p.m., David Vossel wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.orgrb/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 Vossel.</div>


<p style="color: grey;"><i>Updated 2011-01-24 15:25:45</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;">This patch is the foundation of an entire new way of looking at media in Asterisk.  The code present in this review is everything required to complete phase1 of my Media Architecture proposal.

For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal</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;">Below are the major areas I tested during development.  I will continue testing as this patch is being reviewed.
-Local Channel + IAX2 channel load testing
-SIP Calls with and without video
-IAX2 Calls
-AudioHooks and apps using audiohooks
-Masquerades
-DTMF Attended Transfers
-SIP Transfers
-Gtalk
</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/addons/chan_mobile.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/addons/chan_ooh323.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/addons/chan_ooh323.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/addons/format_mp3.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/addons/ooh323cDriver.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/addons/ooh323cDriver.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_alarmreceiver.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_amd.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_chanspy.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_confbridge.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_dahdibarge.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_dictate.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_dumpchan.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_echo.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_fax.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_festival.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_followme.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_ices.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_jack.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_meetme.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_milliwatt.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_mixmonitor.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_mp3.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_nbscat.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_originate.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_parkandannounce.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_record.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_rpt.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_sms.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_speech_utils.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_talkdetect.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_test.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_voicemail.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/apps/app_waitforsilence.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/bridges/bridge_multiplexed.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/bridges/bridge_simple.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/bridges/bridge_softmix.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_agent.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_alsa.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_bridge.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_console.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_dahdi.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_gtalk.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_h323.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_iax2.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_jingle.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_local.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_mgcp.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_misdn.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_multicast_rtp.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_nbs.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_oss.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_phone.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_sip.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_skinny.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_unistim.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_usbradio.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/chan_vpb.cc <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/h323/ast_h323.cxx <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/h323/chan_h323.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/iax2-parser.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/iax2-parser.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/iax2-provision.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/iax2.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/sip/include/globals.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/channels/sip/include/sip.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_a_mu.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_adpcm.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_alaw.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_dahdi.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_g722.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_g726.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_gsm.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_ilbc.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_lpc10.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_resample.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_speex.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/codec_ulaw.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/ex_adpcm.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/ex_alaw.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/ex_g722.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/ex_g726.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/ex_gsm.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/ex_lpc10.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/ex_speex.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/codecs/ex_ulaw.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_g719.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_g723.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_g726.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_g729.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_gsm.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_h263.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_h264.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_ilbc.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_jpeg.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_ogg_vorbis.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_pcm.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_siren14.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_siren7.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_sln.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_sln16.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_vox.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_wav.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/formats/format_wav_gsm.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/funcs/func_channel.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/funcs/func_frame_trace.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/funcs/func_pitchshift.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/abstract_jb.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/astobj2.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/audiohook.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/bridging.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/bridging_technology.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/callerid.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/channel.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/data.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/file.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/format.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/include/asterisk/format_cap.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/include/asterisk/format_pref.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/include/asterisk/frame.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/frame_defs.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/image.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/mod_format.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/pbx.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/rtp_engine.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/slin.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/slinfactory.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/speech.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/include/asterisk/translate.h <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/abstract_jb.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/app.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/asterisk.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/astobj2.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/audiohook.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/bridging.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/callerid.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/ccss.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/channel.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/cli.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/data.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/dial.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/dsp.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/features.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/file.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/format.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/main/format_cap.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/main/format_pref.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/main/frame.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/image.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/indications.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/manager.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/pbx.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/rtp_engine.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/slinfactory.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/translate.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/main/udptl.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/pbx/pbx_spool.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/res/res_adsi.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/res/res_agi.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/res/res_calendar.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/res/res_clioriginate.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/res/res_fax.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/res/res_fax_spandsp.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/res/res_musiconhold.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/res/res_rtp_asterisk.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/res/res_rtp_multicast.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/res/res_speech.c <span style="color: grey">(303557)</span></li>

 <li>/trunk/tests/test_format_api.c <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/1083/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>