<div><br></div><div><div dir="auto">You shouldn’t need to</div><div dir="auto">I suppose kamailio is behind nat. If so all you should need to do is set the listen address to something like</div><div dir="auto"><br></div><div dir="auto">listen=udp:<a href="http://192.168.1.10:5060">192.168.1.10:5060</a> ADVERTISE <a href="http://100.100.100.100:5060">100.100.100.100:5060</a> </div><div dir="auto"><br></div><div dir="auto">Where wow.168.1.10 is your private and 100.100.100.100 is your public up.</div><div dir="auto"><br></div><div dir="auto">When sending locally, kamailio should detect this and not use the advertised public ip.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 30 Jan 2020 at 07:21, vinod mn <<a href="mailto:vinodmn.dbit@gmail.com">vinodmn.dbit@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr">Hi ,<div>I have a cloud server, when I make call from a sip phone (registered with kamailio),</div><div>in the INVITE header I am seeing the <span>via</span> header with public IP, is there any way that I can <span>modify</span> <span>via</span> header to send only the private IP.</div><div>Please let me know, is it possible to replace.<br></div><div><br></div><div><div><img src="cid:ii_k60ekz1n0" alt="image.png" style="width: 696px; max-width: 100%; background-color: rgba(0, 0, 0, 0) !important; border-color: rgb(255, 255, 255) !important; color: rgb(255, 255, 255) !important;"><br></div></div><div>the via headers that kamailio is sending to sip-gateway is </div><div>sip-phone ip:192.168.113.112</div><div><br></div><div>Via: SIP/2.0/UDP <b><a href="http://221.20.20.12:5060" target="_blank">221.20.20.12:5060</a></b>;branch=z9hG4bKaa6a.14c65f5675077ae7b0df70b02516979b.0<br>Via: SIP/2.0/UDP 

192.168.113.112 :50386;received=

192.168.113.112

;branch=z9hG4bK-d87543-550b984016109617-1--d87543-;rport=50386<br></div><div><br></div><div>how to modify the first via header to have private-IP instead of public-IP..</div><div><br></div><div>I tried all the replace functions but it is not working.</div></div><div dir="ltr"><div><br></div>-- <br><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr">Thanks and regards <div>Vinod.M.N</div></div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>