<div>
<style type="text/css">
.successful a, .successful a:visited, .successful a:link, .successful a:hover,.successful  a:active {color:#393}
.failed a, .failed a:visited, .failed a:link, .failed a:hover,.failed  a:active {color:#d62829}
.notexecuted a, .notexecuted a:visited, .notexecuted a:link, .notexecuted a:hover,.notexecuted  a:active {color:#ffcc66}
td a, td a:link, td a:visited, td a:hover, td a:active {background:transparent;font-family: Arial, sans-serif;text-decoration:underline;}
td a:link {color:#369;}
td a:visited {color:#444;}
td a:hover, td a:active {color:#036;}
td a:hover {text-decoration:none;}
</style>
<font size="2" color="black" face="Arial, Helvetica, sans-serif" style="font-family: Arial, sans-serif;font-size: 13px;color:#000">
<table align="center" border="0" cellpadding="5" cellspacing="0" width="98%">

<tr>
        <td style="vertical-align:top">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-color:#e4f5e3;border-top:1px solid #b4e2b4;border-bottom:1px solid #b4e2b4;color:#393;">
                        <tr>
                                <td width="20" style="vertical-align:top;padding:5px 0 5px 10px">
                                        <img src="http://bamboo.asterisk.org/images/jt/icn_plan_passed.gif" width="15" height="15">
                                </td>
                                <td width="100%" style="font-family: Arial, sans-serif; font-size: 13px; color:#393;padding:5px 10px">
      <a href="http://bamboo.asterisk.org/browse/AST/" style="font-family: Arial, sans-serif; font-size: 15px; font-weight:bold; color:#393">Asterisk</a> &gt;
      <a href="http://bamboo.asterisk.org/browse/AST-16232/" style="font-family: Arial, sans-serif; font-size: 15px; font-weight:bold; color:#393">1.6.2 - Linux - i686</a> &gt;
      <a href="http://bamboo.asterisk.org/browse/AST-16232-73/" style="font-family: Arial, sans-serif; font-size: 15px; font-weight:bold; color:#393">#73</a>
                                        <span class="successful" style="font-family: Arial, sans-serif; font-size: 14px;"> was successful.</span>
                    <span class="successful" style="font-family: Arial, sans-serif; font-size: 13px;">
                    <br/>Code has been updated by <a href="http://bamboo.asterisk.org/browse/user/russell">Russell Bryant</a>.
                          <br/><strong>8</strong> tests in total.
                    </span>
                </td>
                        </tr>
        </table>
                <br>
  <table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-color:#ecf1f7;border-top:1px solid #bbd0e5;border-bottom:1px solid #bbd0e5;color:#036;">
        <tr>
            <td width="60%" style="font-family: Arial, sans-serif;text-align:left;font-size:16px;font-weight:bold;color:#036;padding:5px 10px">
                <a href="http://bamboo.asterisk.org/browse/AST-16232-73/commit/" style="text-decoration: none; font-family: Arial, sans-serif;text-align:left;font-size:16px;font-weight:bold;color:#036" >Code Changes</a>
            </td>
            <td width="40%" style="font-family: Arial, sans-serif;text-align:right;font-size:13px;color:#036;padding:5px 10px">
                <a href="http://bamboo.asterisk.org/browse/AST-16232-73/commit/" style="font-family: Arial, sans-serif; font-size: 13px; color:#036">See full change details</a><img src="http://bamboo.asterisk.org/images/icons/more.gif" width="15" height="15" style="vertical-align:middle;padding:2px">
            </td>
        </tr>
   </table>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr><td width="20" style="vertical-align:top;padding:10px 0 0px 10px">
                        <img src="http://bamboo.asterisk.org/images/icons/businessman.gif" width="15" height="15">
                    </td>
                    <td width="100%" style="font-family: Arial, sans-serif; font-size: 13px; color:#000;vertical-align:top;padding:10px 10px 0px 10px">
                        <a href="http://bamboo.asterisk.org/browse/user/russell" style="font-family: Arial, sans-serif; font-size: 13px; font-weight:bold; color:#000">
                           Russell Bryant</a><br>
                        Merged revisions 296000 via svnmerge from <br/>
<a href="https://origsvn.digium.com/svn/asterisk/branches/1.4">https://origsvn.digium.com/svn/asterisk/branches/1.4</a><br/>
<br/>
........<br/>
&nbsp;&nbsp;r296000 | russell | 2010-11-24 10:48:39 -0600 (Wed, 24 Nov 2010) | 38 lines<br/>
&nbsp;&nbsp;<br/>
&nbsp;&nbsp;Handle failures building translation paths more effectively.<br/>
&nbsp;&nbsp;<br/>
&nbsp;&nbsp;The problem scenario occurred on a heavily loaded system that was using the<br/>
&nbsp;&nbsp;codec_dahdi module and exceeded the hardware transcoding capacity.&nbsp; The failure<br/>
&nbsp;&nbsp;mode at that point was not good.&nbsp; The report came in to us as an Asterisk<br/>
&nbsp;&nbsp;lock-up.&nbsp; The &quot;core show locks&quot; shows a ton of threads locked up (but no<br/>
&nbsp;&nbsp;obvious deadlock).&nbsp; Upon deeper investigation, when the system is in this<br/>
&nbsp;&nbsp;state, the CPU was maxed out.&nbsp; The CPU was being consumed by the Asterisk<br/>
&nbsp;&nbsp;logger spewing messages on every audio frame for calls set up after transcoder<br/>
&nbsp;&nbsp;capacity was reached.<br/>
&nbsp;&nbsp;<br/>
&nbsp;&nbsp;The purpose of this patch is to make Asterisk handle failures to create a<br/>
&nbsp;&nbsp;translation path in a more graceful manner.&nbsp; If we can't translate, then the<br/>
&nbsp;&nbsp;call just needs to be dropped, as it's not going to work.&nbsp; These are the<br/>
&nbsp;&nbsp;changes:<br/>
&nbsp;&nbsp;<br/>
&nbsp;&nbsp;1) In set_format() of channel.c (which is called by set_read_format() and<br/>
&nbsp;&nbsp;set_write_format()), it was ignoring if ast_translator_build_path() failed and<br/>
&nbsp;&nbsp;returned NULL.&nbsp; It now pays attention to that case and returns a result<br/>
&nbsp;&nbsp;reflecting failure.&nbsp; With this change in place, the bridging code will<br/>
&nbsp;&nbsp;immediately detect a failure and end the bridge instead of proceeding to try to<br/>
&nbsp;&nbsp;bridge frames that can't be translated and making channel drivers freak out by<br/>
&nbsp;&nbsp;sending them frames in a format they weren't expecting.<br/>
&nbsp;&nbsp;<br/>
&nbsp;&nbsp;2) In ast_indicate_data() of channel.c, failure of ast_playtones_start() was<br/>
&nbsp;&nbsp;ignored.&nbsp; It is now reflected in the return value of the function.&nbsp; This didn't<br/>
&nbsp;&nbsp;turn out to have any affect on the bug, but seemed like a good change to leave<br/>
&nbsp;&nbsp;in.<br/>
&nbsp;&nbsp;<br/>
&nbsp;&nbsp;3) In app_dial(), when only sending a call to a single endpoint, it will<br/>
&nbsp;&nbsp;attempt to do some bridging of its own of early audio.&nbsp; It uses<br/>
&nbsp;&nbsp;make_compatible() when it's going to do this.&nbsp; However, it ignored failure from<br/>
&nbsp;&nbsp;make compatible.&nbsp; So, even with the fix from #1, if there was early audio going<br/>
&nbsp;&nbsp;through app_dial, there would still be a period of invalid frames passing<br/>
&nbsp;&nbsp;through.&nbsp; After detecting failure here, Dial() exits.<br/>
&nbsp;&nbsp;<br/>
&nbsp;&nbsp;ABE-2658<br/>
........<br/>

                    </td>
                    <td width="60" style="font-family: Arial, sans-serif; font-size: 13px; ;color:#036;vertical-align:top;padding:10px 10px 0px 10px">
                         (296001)
                    </td></tr>
    </table><br>

    </td>
    <td width="150" style="vertical-align:top">
    <table width="150" border="0" cellpadding="0" cellspacing="0" style="background-color:#ecf1f7;border-top:1px solid #bbd0e5;border-bottom:1px solid #bbd0e5;color:#036;">
        <tr>
            <td style="font-family: Arial, sans-serif;text-align:left;font-size:16px;font-weight:bold;color:#036;vertical-align:top;padding:5px 10px">
                Actions
            </td>
        </tr>
    </table>
    <table width="150" border="0" cellpadding="0" cellspacing="0" style="background-color:#f5f9fc;border-bottom:1px solid #bbd0e5;">
        <tr>
            <td style="font-family: Ariel, sans-serif; font-size: 13px; color:#036;vertical-align:top;padding:5px 10px;line-height:1.7">
    <a href="http://bamboo.asterisk.org/browse/AST-16232-73" style="font-family: Arial, sans-serif; font-size: 13px; color:#036">View Online</a>
    <br>
    <a href="http://bamboo.asterisk.org/browse/AST-16232-73?commentMode=true" style="font-family: Arial, sans-serif; font-size: 13px; color:#036">Add Comments</a>
    <br>
            </td>
        </tr>
    </table>
    </td>
</tr>
<tr>
    <td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr><td colspan="2" align="center" style="font-family: Arial, sans-serif;text-align:center;font-size:11px;font-weight:bold;color:#999;vertical-align:top;padding:20px">
        Email generated by <a href="http://bamboo.asterisk.org" style="font-family: Arial, sans-serif; font-size: 11px; color:#999">Atlassian Bamboo</a> - if you wish to stop receiving these emails edit your  <a href="http://bamboo.asterisk.org/profile/userNotifications.action" style="font-family: Arial, sans-serif; font-size: 11px; color:#999">user profile</a> or <a href="http://bamboo.asterisk.org/viewAdministrators.action" style="font-family: Arial, sans-serif; font-size: 11px; color:#999">notify your administrator</a>
    </td>
    </tr>
</table>
    </td>
</tr>
</table>
</font>
</div>