<p>We upgraded a system from 4.4.2 to 4.4.3 last week. After that, the uac_auth() function didn't do what it was supposed to do anymore.</p>

<p>This is the failure route in the config file:</p>

<pre><code>failure_route[TRUNKAUTH] {
    if (t_is_canceled()) {
        exit;
    }

    if ($T_reply_code == 401 or $T_reply_code == 407) {
        xlog("L_NOTICE", "[$pr:$si:$sp] [$cs $rm cid: $ci  Status: $rs $rr F:$fU T:$tU R:$rU] Remote asked for authentication");
        uac_auth();
        t_relay();
        exit;
    }
}
</code></pre>

<p>In Kamailio 4.4.2 this works perfectly. In 4.4.3 when this code triggers, we get the following messages in our log:</p>

<pre><code>Sep 23 12:25:41 eustatius /usr/sbin/kamailio[13249]: NOTICE: <script>: [udp:1.2.3.4:5060] [102 INVITE cid: asdasdalsjdalsdaskjdlak  Status: <null> <null> F:11111111 T:00491234567890 R:01234567890] Remote asked for authentication
Sep 23 12:25:41 eustatius /usr/sbin/kamailio[13249]: ERROR: <core> [msg_translator.c:417]: clen_builder(): no message body found (missing crlf?)
Sep 23 12:25:41 eustatius /usr/sbin/kamailio[13249]: ERROR: <core> [msg_translator.c:1963]: build_req_buf_from_sip_req(): Error while adjusting Content-Length
Sep 23 12:25:41 eustatius /usr/sbin/kamailio[13249]: ERROR: tm [t_fwd.c:462]: prepare_new_uac(): could not build request
Sep 23 12:25:41 eustatius /usr/sbin/kamailio[13249]: ERROR: tm [t_fwd.c:1723]: t_forward_nonack(): ERROR: t_forward_nonack: failure to add branches
Sep 23 12:25:41 eustatius /usr/sbin/kamailio[13249]: ERROR: tm [tm.c:1415]: _w_t_relay_to(): ERROR: w_t_relay_to: t_relay_to failed
</code></pre>

<p>After downgrading to 4.4.2, everything works again.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/797">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZdBMgf5e3BmGceIPDXdIo_ynw6X5ks5qt5eagaJpZM4KGV1J">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZRLfWyBffwOY5Gqr8RmIDi1L3OdAks5qt5eagaJpZM4KGV1J.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/797"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"uac_auth() function broken in 4.4.3 (#797)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/797"}}}</script>