[SR-Users] Kamailio server behind NAT

Tihomir Culjaga tculjaga at gmail.com
Wed Feb 9 17:13:23 CET 2022


Hi all


I'm wondering what is best practice to configure kamailio for a setup shown
below. Carriers only support interconnection over a private network so I
need to terminate every separate network on kamailio machine (and on
RTPEngine) . That will turn very quickly into an administration nightmare
as we add more and more carriers.
My plan is to terminate carrier private networks on a router and NAT the
traffic to kamailio where it leads me to a kamailio behind NAT setup. Well,
in theory set_advertised_address and set_advertised_port per message can do
the trick... at least I hope.
Also, some carriers require a SIP registration to activate SIP trunks. I do
that using UAC module (remote registration) but here again I got a problem
with contact address as you can set only one contact address
(modparam("uac", "reg_contact_addr", "10.1.1.11:5060")).

                    /--RTP 10000-19999-- RTPEngine1 -----RTP------+-- IPPBX1
carrier1 --- NAT ---|                       |                     |
                    |                       |                     |
carrier2 --- NAT ---+-----SIP 5060------ kamailio ----SIP---- Dispatcher
                    |                       |                     |
carrier3 --- NAT ---|                       |                     |
                    \--RTP 20000-29999-- RTPEngine2 -----RTP------+-- IPPBX2


So bottom line, I'm wondering what would be the best practice for such a
scenario ?
That would spare me from hitting many pitfalls.

Would really appreciate a hint.

Regards,
Tihomir.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220209/de08fda9/attachment.htm>


More information about the sr-users mailing list