[SR-Users] modifying via header from public IP to private IP

David Villasmil david.villasmil.work at gmail.com
Thu Jan 30 08:40:20 CET 2020


You shouldn’t need to
I suppose kamailio is behind nat. If so all you should need to do is set
the listen address to something like

listen=udp:192.168.1.10:5060 ADVERTISE 100.100.100.100:5060

Where wow.168.1.10 is your private and 100.100.100.100 is your public up.

When sending locally, kamailio should detect this and not use the
advertised public ip.

On Thu, 30 Jan 2020 at 07:21, vinod mn <vinodmn.dbit at gmail.com> wrote:

> Hi ,
> I have a cloud server, when I make call from a sip phone (registered with
> kamailio),
> in the INVITE header I am seeing the via header with public IP, is there
> any way that I can modify via header to send only the private IP.
> Please let me know, is it possible to replace.
>
> [image: image.png]
> the via headers that kamailio is sending to sip-gateway is
> sip-phone ip:192.168.113.112
>
> Via: SIP/2.0/UDP *221.20.20.12:5060 <http://221.20.20.12:5060>*
> ;branch=z9hG4bKaa6a.14c65f5675077ae7b0df70b02516979b.0
> Via: SIP/2.0/UDP 192.168.113.112 :50386;received= 192.168.113.112
> ;branch=z9hG4bK-d87543-550b984016109617-1--d87543-;rport=50386
>
> how to modify the first via header to have private-IP instead of
> public-IP..
>
> I tried all the replace functions but it is not working.
>
> --
> Thanks and regards
> Vinod.M.N
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200130/de3ccf8f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 11953 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200130/de3ccf8f/attachment.png>


More information about the sr-users mailing list