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




<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.</div>
<div>By Matt Jordan.</div>


<p style="color: grey;"><i>Updated June 30, 2014, 5:14 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Addressed the first round of findings.</pre>
  </td>
 </tr>
</table>







<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;">This patch started out as an attempt to fix the BUGBUGs left over packetization calls into rtp_engine; it got a little bit bigger. Things now compile and work (see Testing), so this is a good place to stop before the renaming effort.

Primarily, this patch does the following:
(1) Removes ast_rtp_codecs_packetization_set. This call was effectively a NoOp with res_rtp_asterisk/res_rtp_multicast. The various channel drivers now call ast_rtp_codecs_set_framing where appropriate.
(2) A major overhaul of ast_rtp_codec was done. This includes:
    (a) Storing the framing on the structure. This allows for the smoother in res_rtp_asterisk to easily get the framing specified without having to do major gyrations.
    (b) Payload types (which are ao2 ref counted objects) are no longer stored in an ao2_container. This container had two patterns of usage: lookups by an integer key value and iteration. Vectors work well for this type of access and - for relatively small numbers of items (which is generally the case for payload types), are much faster on both counts.
(3) The 'use_ptime' setting in res_pjsip_sdp_rtp now works. Packetization is also handled a little bit better, as both the RTP engine and format_cap API already do the job of managing the framing.

A variety of ref leaks were cleaned up as well along the way.</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;">Back in February, I wrote a number of single audio stream tests for the PJSIP channel driver. Eventually these will get posted up for review, but the tests cover:
 * Basic Offer/Answer of different sets of codecs (using a variety of patterns, including allow=all (ew))
 * Packetization, including use_ptime=yes|no.
 * AVPF
 * Preferred codec only (by only specifying a single supported codec), subsets of offers, etc.

These tests will eventually get put up on another review, but they gave some confidence that the mucking around in the rtp_engine that is done on this patch works.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/team/group/media_formats-reviewed-trunk/tests/test_voicemail_api.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/tests/test_format_cap.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/tests/test_format_api.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/tests/test_core_format.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/tests/test_config.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_stasis_snoop.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_stasis.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_speech.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_rtp_asterisk.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_pjsip_sdp_rtp.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_pjsip/pjsip_configuration.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_fax.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_clioriginate.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_calendar.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_agi.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/parking/parking_applications.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/ari/resource_channels.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/ari/resource_bridges.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/pbx/pbx_spool.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/translate.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/sorcery.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/rtp_engine.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/media_index.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/manager.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/frame.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/format_compatibility.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/format_cap.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/format_cache.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/format.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/file.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/dial.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/core_local.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/config_options.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/cli.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/channel.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/ccss.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/bridge_basic.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/bridge.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/astobj2_container.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/astobj2.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/asterisk.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/vector.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/slin.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/rtp_engine.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/frame.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/format_compatibility.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/format_cap.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/format_cache.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/format.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/funcs/func_channel.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/formats/format_h264.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/formats/format_h263.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/contrib/scripts/refcounter.py <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/codecs/ex_ulaw.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/codecs/ex_gsm.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/codecs/ex_alaw.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/codecs/ex_adpcm.h <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/pjsip/dialplan_functions.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/dahdi/bridge_native_dahdi.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_unistim.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_skinny.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_sip.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_pjsip.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_phone.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_oss.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_nbs.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_multicast_rtp.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_motif.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_misdn.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_mgcp.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_jingle.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_iax2.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_h323.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_gtalk.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_dahdi.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_console.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_bridge_media.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_alsa.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/bridges/bridge_softmix.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/bridges/bridge_simple.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/bridges/bridge_native_rtp.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/bridges/bridge_holding.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/confbridge/conf_chan_record.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/app_voicemail.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/app_originate.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/app_meetme.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/app_dumpchan.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/app_confbridge.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/addons/ooh323cDriver.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/addons/chan_ooh323.c <span style="color: grey">(417661)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/addons/chan_mobile.c <span style="color: grey">(417661)</span></li>

</ul>

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







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




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