<div dir="auto">You won't see proper $mb after rtpengine changes in that way. $mb will be rewritten on the latest stage of packet processing. See sngrep or wireshark or either use read_sdp_pv / write_sdp_pv<div dir="auto"><br></div><div dir="auto">Also our can use apply_message_changes before log, but I would not recommend to do so if this is a production under load.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 2 Jul 2021, 10:28 Paul Smith, <<a href="mailto:paul.smith@claritytele.com">paul.smith@claritytele.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div>
<p>Hi,</p>
<p>[Note I posted this yesterday from the wrong email address.]<br>
</p>
<p><br>
</p>
<p>I am struggling to see why my SDP is not being set correctly on the INVITE to my supplier with Proxy-Authentication when I use uac_auth().</p>
<p>The initial INVITE to my supplier has correct SDP set by rtpengine_manage. Then supplier replies with a 407.  My failure route correctly handles the Auth, and also calls NATMANAGE again... but this time the SDP is unchanged and the private IP and original
 media information from the original device is relayed to my supplier. <br>
<br>
kamailio.cfg isbased on the default config.  Running kamailio 5.4.6 and using example from uac module for uac_auth.</p>
<p>My failure route calls NATMANAGE.  Is there anything special about uac_auth?  Do I need some extra magic to apply the message body changes after I have run rtpengine_manage().</p>
<p><br>
</p>
<p>I can see that the NATMANAGEr test for nat_uac_test("8") is true, and rtpengine_manage() s being called.  But the outgoing SDP is not changed.<br>
</p>
<p><br>
</p>
<p>Thanks for any hints!</p>
<p>Paul<br>
</p>
<p><br>
</p>
<p>====================<br>
</p>
<p>Extract of kamailio.cfg<br>
</p>
<blockquote><br>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">failure_route[TRUNKAUTH] {</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">    if (t_is_canceled()) {</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">        exit;</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">    }</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">    route(NATMANAGE);</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">    xlog("L_INFO","In failure route, just finshed NATMANAGE and now body is $mb");</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">    if(t_check_status("401|407")) {</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">        # $avp(auser) = "test";</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">        # $avp(apass) = "test";</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">        # $avp(apass) = "36d0a02793542b4961e8348347236dbf";</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">        if (uac_auth()) {</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">                t_relay();</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">        }</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">        exit;</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">    }</span></pre>
<span style="font-family:"Courier New",monospace"></span>
<pre><span style="font-family:"Courier New",monospace">}</span></pre>
</blockquote>
<br>
<div id="m_1544334846620880764Signature">
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<table style="width:474.0pt" width="632">
<tbody>
<tr>
<td style="width:160.5pt;padding:.75pt .75pt .75pt .75pt" width="214"><br>
</td>
<td style="width:291.0pt;padding:.75pt .75pt .75pt .75pt" width="388"><br>
</td>
</tr>
<tr>
<td colspan="3" style="padding:.75pt .75pt .75pt .75pt"><br>
</td>
</tr>
<tr>
<td colspan="3" style="padding:.75pt .75pt .75pt .75pt"><br>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
</div>
</div>
</div>

__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>