Hi Folks,<div><br></div><div>I have a problem with the hiding of my topology. Topoh module works great. THX for that. However SDP is not processed by this module. I suppose that mediaproxy should be the one who should care about this.</div>
<div><br></div><div>Owner(o) part of the body holds original IP of the sender, even thou Creator(c) part was modified using engage_media_proxy(). Actually this was reported as a mediaproxy bug, but till now unresolved.</div>
<div><br></div><div>After engage_mediaproxy(): (mind the &quot;o=&quot; and &quot;c=&quot;)</div><div><div><br></div><div>v=0 </div><div>o=- 102971 102971 IN IP4 192.168.0.5</div><div>s=- </div><div>c=IN IP4 8.8.8.8</div>
<div>t=0 0 </div><div>.</div><div>.</div><div>.</div><div><br></div></div><div>So I tried fix_nated_sdp(&quot;8&quot;,&quot;8.8.8.8&quot;). &quot;o&quot; part is OK now but oldmediaip attribute was added at the bottom of the body. Addition of this attribute was added to nathelper back in the 2003 for debuging purposes. Unfortunately this ruins a whole idea of the topology hiding.</div>
<div><br></div><div>After fix_nated_contact(): (mid the &quot;o=&quot;, &quot;c=&quot; and last &quot;a=&quot;)</div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div>v=0 </div>
<div>o=- 102971 102971 IN IP4 8.8.8.8</div><div>s=- </div><div>c=IN IP4 8.8.8.8</div><div>t=0 0 </div><div>m=audio 35008 RTP/AVP 0 2 4 8 18 96 97 98 101 </div><div>a=rtpmap:0 PCMU/8000 </div><div>.</div><div>.</div><div>.</div>
<div>a=rtpmap:101 telephone-event/8000 </div><div>a=oldmediaip:192.168.0.5</div></div></div><div><br></div><div><br></div><div>The only &quot;nice&quot; solution I was able to do was changing the source of the nathelper module. </div>
<div><div><br></div><div>.</div><div>.</div><div>body2.s = oldip.s + oldip.len;</div><div>body2.len = bodylimit - body2.s;</div><div>if (alter_mediaip(msg, &amp;body1, &amp;oldip, pf, &amp;newip, pf,1) == -1) {</div><div>
  LM_ERR(&quot;can&#39;t alter &#39;%s&#39; IP\n&quot;,line);</div><div>  return -1;</div></div><div>.</div><div>.</div><div><br></div><div>On the line 1326(alter_mediaip above) in the file kamailio_k/nathelper.c I changed last argument from 1 to 0. This attribute is called preserve and adds mentioned &quot;oldmediaip&quot; attribute to the body. Simple changing it to 0 solved the problem.</div>
<div><br></div><div>So I can live with this solution but it would be much more better to have it from the git repo.</div><div><br></div><div>Do I phantom it wrong or this might be considered as a bug? Shouldn&#39;t it be better to have option to configure it?</div>
<div><br></div><div>Tested using last night build of the kamailio.</div><div><br></div><div>Thanks for the answer.</div><div><br></div><div>Regards,</div><div><br></div><div>Efelin</div><div><br></div>