<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/2894/">https://reviewboard.asterisk.org/r/2894/</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/2894/diff/1/?file=46940#file46940line1467" style="color: black; font-weight: bold; text-decoration: underline;">/branches/1.8/main/rtp_engine.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; ">done:</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1467</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="n">ast_rtp_codecs_payloads_copy</span><span class="p">(</span><span class="o">&</span><span class="n">instance<span class="hl">0</span></span><span class="o">-></span><span class="n">codecs</span><span class="p">,</span> <span class="o">&</span><span class="n">instance<span class="hl">1</span></span><span class="o">-></span><span class="n">codecs</span><span class="p">,</span> <span class="n">instance<span class="hl">1</span></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">1467</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="n">ast_rtp_codecs_payloads_copy</span><span class="p">(</span><span class="o">&</span><span class="n">instance<span class="hl">_src</span></span><span class="o">-></span><span class="n">codecs</span><span class="p">,</span> <span class="o">&</span><span class="n">instance<span class="hl">_dst</span></span><span class="o">-></span><span class="n">codecs</span><span class="p">,</span> <span class="n">instance<span class="hl">_dst</span></span><span class="p">);</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;">Just to double check the logic change here:

Noting that ast_rtp_codecs_payloads_copy has the following signature:

void ast_rtp_codecs_payloads_copy(struct ast_rtp_codecs *src, struct ast_rtp_codecs *dest, struct ast_rtp_instance *instance);

The original method calls copies the codecs from instance0 to instance1.

In your updated version, instance0 in the destination; instance1 is the source.

So the method cal now copies the codecs from the source (instance1) to the destination (instance0).

Is this what fixed the payload copy issue?</pre>
</div>
<br />



<p>- Matt</p>


<br />
<p>On September 30th, 2013, 11:02 p.m. UTC, Scott Griepentrog 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 Scott Griepentrog.</div>


<p style="color: grey;"><i>Updated Sept. 30, 2013, 11:02 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-21464">ASTERISK-21464</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;">Testing for Issue 21464 (thanks Kevin!) turned up some odd behavior on codec negotiation, including loss of codec payloads.  The arguments to ast_rtp_instance_early_bridge_make_compatible were not clearly indicating source and destination channel for the copy of codecs, which made it non-obvious that the arguments to ast_rtp_codecs_payloads_copy() were reversed.  The result is that an offer containing 119 telephone event would be converted to 101 telephone event, for both directrtpsetup=yes and no.</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;">Tested with 1.8 to prove that telephone-event payload code 119 is now being passed again (as it was in Asterisk versions prior to 1.8).</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/1.8/include/asterisk/rtp_engine.h <span style="color: grey">(400206)</span></li>

 <li>/branches/1.8/main/rtp_engine.c <span style="color: grey">(400206)</span></li>

</ul>

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







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








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