<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 />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is an architectural review of the changes to the IAX2 stack, only.
The basic idea of the IAX2 protocol is a non-lossy transmit of the internals of one server to another. This is merely shoehorning the new media architecture into the 64-bit bitfield, which isn't even that old. I'd like to see the versioned value of the FORMAT2 and CAPABILITY2 fields leveraged, such that we can expect this lossless transmit of codec parameters between Asterisk servers.
One considerable problem with the loss-less transmit is that of the mini-frames, due to the problem of packing this information into a single byte value. In earlier versions, this was done in a creative way, by using the MSB to encode whether the remaining 7 bits were considered a literal bit-value or the expression of the base2-log of the codec number. This was sufficient to encode up to 128 + 7 different values, which exceeded even the demands of the 64-bit bitfield conversion. One way to deal with this would be to use some of the as-yet unused values, along with a full frame, denoting which of the negotiated codecs will be encoded as which byte value (all with the top two bits set for the codec value). This would be done per-call, on a demand basis. Most calls proceed with only a single codec anyway, and the probability that there will ever be a practical need for more than the available values is extremely low, other than for pure test cases.</pre>
<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/1083/diff/1/?file=14965#file14965line5225" style="color: black; font-weight: bold; text-decoration: underline;">/channels/chan_iax2.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; ">static int iax2_call(struct ast_channel *c, char *dest, int timeout)</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">5224</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">iax_ie_append_versioned_uint64</span><span class="p">(</span><span class="o">&</span><span class="n">ied</span><span class="p">,</span> <span class="n">IAX_IE_FORMAT2</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">iax2_tmpfmt</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;">What I did with the FORMAT2 field was to apply a version number, knowing that there would be a future need to change how codecs are encoded, in order to prevent using another IE value. This may be a good opportunity to advance the version number and send an encoded string with the format preferences, instead of a 64-bit bitfield. Or, depending upon the expressiveness of the codec negotiation, we may need to allocate more IE values, anyway.</pre>
</div>
<br />
<p>- Tilghman</p>
<br />
<p>On January 21st, 2011, 1:52 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-21 13:52:50</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>/configure <span style="color: grey">(UNKNOWN)</span></li>
<li>/trunk/CHANGES <span style="color: grey">(303283)</span></li>
<li>/trunk/addons/chan_mobile.c <span style="color: grey">(303283)</span></li>
<li>/trunk/addons/chan_ooh323.h <span style="color: grey">(303283)</span></li>
<li>/trunk/addons/chan_ooh323.c <span style="color: grey">(303283)</span></li>
<li>/trunk/addons/format_mp3.c <span style="color: grey">(303283)</span></li>
<li>/trunk/addons/ooh323cDriver.h <span style="color: grey">(303283)</span></li>
<li>/trunk/addons/ooh323cDriver.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_alarmreceiver.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_amd.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_chanspy.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_confbridge.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_dahdibarge.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_dial.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_dictate.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_dumpchan.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_echo.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_fax.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_festival.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_followme.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_ices.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_jack.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_meetme.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_milliwatt.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_mixmonitor.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_mp3.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_nbscat.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_originate.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_parkandannounce.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_privacy.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_queue.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_record.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_rpt.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_sms.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_speech_utils.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_talkdetect.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_test.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_voicemail.c <span style="color: grey">(303283)</span></li>
<li>/trunk/apps/app_waitforsilence.c <span style="color: grey">(303283)</span></li>
<li>/trunk/bridges/bridge_multiplexed.c <span style="color: grey">(303283)</span></li>
<li>/trunk/bridges/bridge_simple.c <span style="color: grey">(303283)</span></li>
<li>/trunk/bridges/bridge_softmix.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_agent.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_alsa.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_bridge.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_console.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_dahdi.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_gtalk.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_h323.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_iax2.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_jingle.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_local.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_mgcp.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_misdn.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_multicast_rtp.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_nbs.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_oss.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_phone.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_sip.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_skinny.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_unistim.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_usbradio.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/chan_vpb.cc <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/h323/ast_h323.cxx <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/h323/chan_h323.h <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/iax2-parser.h <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/iax2-parser.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/iax2-provision.c <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/iax2.h <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/sip/include/globals.h <span style="color: grey">(303283)</span></li>
<li>/trunk/channels/sip/include/sip.h <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_a_mu.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_adpcm.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_alaw.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_dahdi.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_g722.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_g726.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_gsm.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_ilbc.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_lpc10.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_resample.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_speex.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/codec_ulaw.c <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/ex_adpcm.h <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/ex_alaw.h <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/ex_g722.h <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/ex_g726.h <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/ex_gsm.h <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/ex_lpc10.h <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/ex_speex.h <span style="color: grey">(303283)</span></li>
<li>/trunk/codecs/ex_ulaw.h <span style="color: grey">(303283)</span></li>
<li>/trunk/configs/extensions.conf.sample <span style="color: grey">(303283)</span></li>
<li>/trunk/configs/queues.conf.sample <span style="color: grey">(303283)</span></li>
<li>/trunk/configure.ac <span style="color: grey">(303283)</span></li>
<li>/trunk/contrib/scripts/install_prereq <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_g719.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_g723.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_g726.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_g729.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_gsm.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_h263.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_h264.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_ilbc.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_jpeg.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_ogg_vorbis.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_pcm.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_siren14.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_siren7.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_sln.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_sln16.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_vox.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_wav.c <span style="color: grey">(303283)</span></li>
<li>/trunk/formats/format_wav_gsm.c <span style="color: grey">(303283)</span></li>
<li>/trunk/funcs/func_channel.c <span style="color: grey">(303283)</span></li>
<li>/trunk/funcs/func_db.c <span style="color: grey">(303283)</span></li>
<li>/trunk/funcs/func_frame_trace.c <span style="color: grey">(303283)</span></li>
<li>/trunk/funcs/func_pitchshift.c <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/abstract_jb.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/astdb.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/astobj2.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/audiohook.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/bridging.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/bridging_technology.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/callerid.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/channel.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/data.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/file.h <span style="color: grey">(303283)</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">(303283)</span></li>
<li>/trunk/include/asterisk/frame_defs.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/image.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/mod_format.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/pbx.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/rtp_engine.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/slin.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/slinfactory.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/speech.h <span style="color: grey">(303283)</span></li>
<li>/trunk/include/asterisk/translate.h <span style="color: grey">(303283)</span></li>
<li>/trunk/main/abstract_jb.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/app.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/asterisk.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/astobj2.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/audiohook.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/bridging.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/callerid.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/ccss.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/channel.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/cli.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/config.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/data.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/dial.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/dsp.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/features.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/file.c <span style="color: grey">(303283)</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">(303283)</span></li>
<li>/trunk/main/image.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/indications.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/manager.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/pbx.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/rtp_engine.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/slinfactory.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/translate.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/udptl.c <span style="color: grey">(303283)</span></li>
<li>/trunk/main/utils.c <span style="color: grey">(303283)</span></li>
<li>/trunk/pbx/pbx_spool.c <span style="color: grey">(303283)</span></li>
<li>/trunk/res/res_adsi.c <span style="color: grey">(303283)</span></li>
<li>/trunk/res/res_agi.c <span style="color: grey">(303283)</span></li>
<li>/trunk/res/res_calendar.c <span style="color: grey">(303283)</span></li>
<li>/trunk/res/res_clioriginate.c <span style="color: grey">(303283)</span></li>
<li>/trunk/res/res_fax.c <span style="color: grey">(303283)</span></li>
<li>/trunk/res/res_fax_spandsp.c <span style="color: grey">(303283)</span></li>
<li>/trunk/res/res_musiconhold.c <span style="color: grey">(303283)</span></li>
<li>/trunk/res/res_rtp_asterisk.c <span style="color: grey">(303283)</span></li>
<li>/trunk/res/res_rtp_multicast.c <span style="color: grey">(303283)</span></li>
<li>/trunk/res/res_speech.c <span style="color: grey">(303283)</span></li>
<li>/trunk/res/res_timing_timerfd.c <span style="color: grey">(303283)</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>